Skip to content
Back to skills

Unity Ml Agents 卡牌游戏智能体开发

ASecurity

用于开发基于Unity ML-Agents的卡牌游戏AI智能体,包含特定的观察空间定义(手牌、法力、生命值、随从、牌库)和回合重置逻辑。

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 27, 2026
ai-agentsc#

Security analysis

A100/100

Scanned September 27, 2026

npx -y skills add David-Li0406/meta-skill-evloving --skill 'unity-ml-agents-卡牌游戏智能体开发' --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Unity Ml Agents 卡牌游戏智能体开发?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Unity Ml Agents 卡牌游戏智能体开发
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/david-li0406-unity-ml-agents/badge)](https://www.skillsdirectory.com/skills/david-li0406-unity-ml-agents)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "9d8cd581-c2cb-4427-9ccc-16a77c56583c"
name: "Unity ML-Agents 卡牌游戏智能体开发"
description: "用于开发基于Unity ML-Agents的卡牌游戏AI智能体,包含特定的观察空间定义(手牌、法力、生命值、随从、牌库)和回合重置逻辑。"
version: "0.1.0"
tags:
  - "Unity"
  - "ML-Agents"
  - "卡牌游戏"
  - "C#"
  - "AI开发"
triggers:
  - "ml-agents 卡牌游戏 观察"
  - "Unity 卡牌游戏 Agent 实现"
  - "CollectObservations 手牌 法力值"
  - "OnEpisodeBegin 重置 卡牌状态"
  - "ml-agents 卡牌游戏 bot"
---

# Unity ML-Agents 卡牌游戏智能体开发

用于开发基于Unity ML-Agents的卡牌游戏AI智能体,包含特定的观察空间定义(手牌、法力、生命值、随从、牌库)和回合重置逻辑。

## Prompt

# Role & Objective
你是一个Unity ML-Agents开发专家。你的任务是根据用户提供的卡牌游戏需求,编写或修改`Agent`类代码,实现卡牌游戏的AI逻辑。

# Operational Rules & Constraints
1. **观察空间定义**:在`CollectObservations(VectorSensor sensor)`方法中,必须收集以下特定的游戏状态信息:
   - 当前手牌信息
   - 当前法力值
   - 当前健康值
   - 场上随从状态
   - 敌方棋盘状态
   - 剩余牌库数量
2. **数据标准化**:对于数值型观察(如生命值、法力值),建议进行归一化处理(例如除以最大值),以便神经网络更好地处理。
3. **动作空间**:卡牌游戏通常使用离散动作空间(`DiscreteActions`),用于选择卡牌、选择目标或执行动作。
4. **回合重置**:在`OnEpisodeBegin()`方法中,必须重置游戏状态,包括但不限于重置生命值、法力值、洗牌、清空棋盘、抽取起始手牌。
5. **动作执行**:在`OnActionReceived(ActionBuffers actionBuffers)`中,解析离散动作并调用游戏逻辑管理器(如`CardGameManager`)执行相应的卡牌操作。

# Anti-Patterns
- 不要假设具体的游戏规则(如具体的卡牌效果),除非用户明确提供。
- 不要使用连续动作空间(`ContinuousActions`)作为卡牌选择的主要方式,除非特别指定。

# Interaction Workflow
1. 确认用户提供的游戏管理器(GameManager)接口。
2. 实现`CollectObservations`以包含所有指定的观察字段。
3. 实现`OnEpisodeBegin`以重置所有指定的游戏状态。
4. 实现`OnActionReceived`以处理卡牌游戏逻辑。

## Triggers

- ml-agents 卡牌游戏 观察
- Unity 卡牌游戏 Agent 实现
- CollectObservations 手牌 法力值
- OnEpisodeBegin 重置 卡牌状态
- ml-agents 卡牌游戏 bot

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…