Token导航 LogoToken导航

Agent Skill · 研究检索

autonomous-agent-gaming(自主 Agent 博弈)

autonomous-agent-gaming 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

autonomous-agent-gaming 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为只读;许可证为 MIT,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 25,409。

总安装 3,778周安装 159GitHub Stars 5下载 1,323核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:autonomous-agent-gaming(自主 Agent 博弈)
来源仓库:https://github.com/qodex-ai/ai-agent-skills
仓库路径:skills/autonomous-agent-gaming
安装命令:
npx skills add https://github.com/qodex-ai/ai-agent-skills --skill autonomous-agent-gaming
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/qodex-ai/ai-agent-skills --skill autonomous-agent-gaming

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

autonomous-agent-gaming 用于构建基于强化学习的自主游戏代理,支持棋类游戏、RTS 和视频游戏策略学习。适用于博弈论研究、AI 基准测试和娱乐应用,具备对手适应与长期规划能力。通过 npx skills add 命令从指定 GitHub 仓库安装,需定义游戏接口与状态转换逻辑。

安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/autonomous-agent-gaming

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/qodex-ai/ai-agent-skills --skill autonomous-ag…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它标注为只读,先用只读任务试一次,确认行为符合预期再扩大使用范围。

常见问题

6 条

autonomous-agent-gaming 怎么安装?

在终端执行 npx skills add https://github.com/qodex-ai/ai-agent-skills --skill autonomous-agent-gaming。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

autonomous-agent-gaming 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

autonomous-agent-gaming 需要什么权限?

权限级别是只读。该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

autonomous-agent-gaming 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

autonomous-agent-gaming 用的人多吗?

公开数据是累计安装 3,778 次,近一周安装 159 次,下载 1,323 次,GitHub 5 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

autonomous-agent-gaming 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
autonomous-agent-gaming

自主 Agent 博弈 · 本页

3,7785只读MIT通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Autonomous Agent Gaming

Build sophisticated game-playing agents that learn strategies, adapt to opponents, and master complex games through AI and reinforcement learning.

Overview

Autonomous game agents combine:

  • Game Environment Interface: Connect to game rules and state
  • Decision-Making Systems: Choose optimal actions
  • Learning Mechanisms: Improve through experience
  • Strategy Development: Long-term planning and adaptation

Applications

  • Chess and board game masters
  • Real-time strategy (RTS) game bots
  • Video game autonomous players
  • Game theory research
  • AI testing and benchmarking
  • Entertainment and challenge systems

Quick Start

Run example agents with:

# Rule-based agent
python examples/rule_based_agent.py

# Minimax with alpha-beta pruning
python examples/minimax_agent.py

# Monte Carlo Tree Search
python examples/mcts_agent.py

# Q-Learning agent
python examples/qlearning_agent.py

# Chess engine
python examples/chess_engine.py

# Game theory analysis
python scripts/game_theory_analyzer.py

# Benchmark agents
python scripts/agent_benchmark.py

Game Agent Architectures

1. Rule-Based Agents

Use predefined rules and heuristics. See full implementation in examples/rule_based_agent.py.

Key Concepts:

  • Difficulty levels control strategy depth
  • Evaluation combines material, position, and control factors
  • Fast decision-making suitable for real-time games
  • Easy to customize and understand

Usage Example:

from examples.rule_based_agent import RuleBasedGameAgent

agent = RuleBasedGameAgent(difficulty="hard")
best_move = agent.decide_action(game_state)

2. Minimax with Alpha-Beta Pruning

Optimal decision-making for turn-based games. See examples/minimax_agent.py.

Key Concepts:

  • Exhaustive tree search up to fixed depth
  • Alpha-beta pruning eliminates impossible branches
  • Guarantees optimal play within search depth
  • Evaluation function determines move quality

Performance Characteristics:

  • Time complexity: O(b^(d/2)) with pruning vs O(b^d) without
  • Space complexity: O(b*d)
  • Adjustable depth for speed/quality tradeoff

Usage Example:

from examples.minimax_agent import MinimaxGameAgent

agent = MinimaxGameAgent(max_depth=6)
best_move = agent.get_best_move(game_state)

3. Monte Carlo Tree Search (MCTS)

Probabilistic game tree exploration. Full implementation in examples/mcts_agent.py.

Key Concepts:

  • Four-phase algorithm: Selection, Expansion, Simulation, Backpropagation
  • UCT (Upper Confidence bounds applied to Trees) balances exploration/exploitation
  • Effective for games with high branching factors
  • Anytime algorithm: more iterations = better decisions

The UCT Formula: UCT = (child_value / child_visits) + c * sqrt(ln(parent_visits) / child_visits)

Usage Example:

from examples.mcts_agent import MCTSAgent

agent = MCTSAgent(iterations=1000, exploration_constant=1.414)
best_move = agent.get_best_move(game_state)

4. Reinforcement Learning Agents

Learn through interaction with environment. See examples/qlearning_agent.py.

Key Concepts:

  • Q-learning: model-free, off-policy learning
  • Epsilon-greedy: balance exploration vs exploitation
  • Update rule: Q(s,a) += α[r + γ*max_a'Q(s',a') - Q(s,a)]
  • Q-table stores state-action value estimates

Hyperparameters:

  • α (learning_rate): How quickly to adapt to new information
  • γ (discount_factor): Importance of future rewards
  • ε (epsilon): Exploration probability

Usage Example:

from examples.qlearning_agent import QLearningAgent

agent = QLearningAgent(learning_rate=0.1, discount_factor=0.99, epsilon=0.1)
action = agent.get_action(state)
agent.update_q_value(state, action, reward, next_state)
agent.decay_epsilon()  # Reduce exploration over time

Game Environments

Standard Interfaces

Create game environments compatible with agents. See examples/game_environment.py for base classes.

Key Methods:

  • reset(): Initialize game state
  • step(action): Execute action, return (next_state, reward, done)
  • get_legal_actions(state): List valid moves
  • is_terminal(state): Check if game is over
  • render(): Display game state

OpenAI Gym Integration

Standard interface for game environments:

import gym

# Create environment
env = gym.make('CartPole-v1')

# Initialize
state = env.reset()

# Run episode
done = False
while not done:
    action = agent.get_action(state)
    next_state, reward, done, info = env.step(action)
    agent.update(state, action, reward, next_state)
    state = next_state

env.close()

Chess with python-chess

Full chess implementation in examples/chess_engine.py. Requires: pip install python-chess

Features:

  • Full game rules and move validation
  • Position evaluation based on material count
  • Move history and undo functionality
  • FEN notation support

Quick Example:

from examples.chess_engine import ChessAgent

agent = ChessAgent()
result, moves = agent.play_game()
print(f"Game result: {result} in {moves} moves")

Custom Game with Pygame

Extend examples/game_environment.py with pygame rendering:

from examples.game_environment import PygameGameEnvironment

class MyGame(PygameGameEnvironment):
    def get_initial_state(self):
        # Return initial game state
        pass

    def apply_action(self, state, action):
        # Execute action, return new state
        pass

    def calculate_reward(self, state, action, next_state):
        # Return reward value
        pass

    def is_terminal(self, state):
        # Check if game is over
        pass

    def draw_state(self, state):
        # Render using pygame
        pass

game = MyGame()
game.render()

Strategy Development

All strategy implementations are in examples/strategy_modules.py.

1. Opening Theory

Pre-computed best moves for game openings. Load from PGN files or opening databases.

OpeningBook Features:

  • Fast lookup using position hashing
  • Load from PGN, opening databases, or create custom books
  • Fallback to other strategies when out of book

Usage:

from examples.strategy_modules import OpeningBook

book = OpeningBook()
if book.in_opening(game_state):
    move = book.get_opening_move(game_state)

2. Endgame Tablebases

Pre-computed endgame solutions with optimal moves and distance-to-mate.

Features:

  • Guaranteed optimal moves in endgame positions
  • Distance-to-mate calculation
  • Lookup by position hash

Usage:

from examples.strategy_modules import EndgameTablebase

tablebase = EndgameTablebase()
if tablebase.in_tablebase(game_state):
    move = tablebase.get_best_endgame_move(game_state)
    dtm = tablebase.get_endgame_distance(game_state)

3. Multi-Stage Strategy

Combine different agents for different game phases using AdaptiveGameAgent.

Strategy Selection:

  • Opening (Material > 30): Use opening book or memorized lines
  • Middlegame (10-30): Use search-based engine (Minimax, MCTS)
  • Endgame (Material < 10): Use tablebase for optimal play

Usage:

from examples.strategy_modules import AdaptiveGameAgent
from examples.minimax_agent import MinimaxGameAgent

agent = AdaptiveGameAgent(
    opening_book=book,
    middlegame_engine=MinimaxGameAgent(max_depth=6),
    endgame_tablebase=tablebase
)

move = agent.decide_action(game_state)
phase_info = agent.get_phase_info(game_state)

4. Composite Strategies

Combine multiple strategies with priority ordering using CompositeStrategy.

Usage:

from examples.strategy_modules import CompositeStrategy

composite = CompositeStrategy([
    opening_strategy,
    endgame_strategy,
    default_search_strategy
])

move = composite.get_move(game_state)
active = composite.get_active_strategy(game_state)

Performance Optimization

All optimization utilities are in scripts/performance_optimizer.py.

1. Transposition Tables

Cache evaluated positions to avoid re-computation. Especially effective with alpha-beta pruning.

How it works:

  • Stores evaluation (score + depth + bound type)
  • Hashes positions for fast lookup
  • Only overwrites if new evaluation is deeper
  • Thread-safe for parallel search

Bound Types:

  • exact: Exact evaluation
  • lower: Evaluation is at least this value
  • upper: Evaluation is at most this value

Usage:

from scripts.performance_optimizer import TranspositionTable

tt = TranspositionTable(max_size=1000000)

# Store evaluation
tt.store(position_hash, depth=6, score=150, flag='exact')

# Lookup
score = tt.lookup(position_hash, depth=6)
hit_rate = tt.hit_rate()

2. Killer Heuristic

Track moves that cause cutoffs at similar depths for move ordering improvement.

Concept:

  • Killer moves are non-capture moves that caused beta cutoffs
  • Likely to be good moves at other nodes of same depth
  • Improves alpha-beta pruning efficiency

Usage:

from scripts.performance_optimizer import KillerHeuristic

killers = KillerHeuristic(max_depth=20)

# When a cutoff occurs
killers.record_killer(move, depth=5)

# When ordering moves
killer_list = killers.get_killers(depth=5)
is_killer = killers.is_killer(move, depth=5)

3. Parallel Search

Parallelize game tree search across multiple threads.

Usage:

from scripts.performance_optimizer import ParallelSearchCoordinator

coordinator = ParallelSearchCoordinator(num_threads=4)

# Parallel move evaluation
scores = coordinator.parallel_evaluate_moves(moves, evaluate_func)

# Parallel minimax
best_move, score = coordinator.parallel_minimax(root_moves, minimax_func)

coordinator.shutdown()

4. Search Statistics

Track and analyze search performance with SearchStatistics.

Metrics:

  • Nodes evaluated / pruned
  • Branching factor
  • Pruning efficiency
  • Cache hit rate

Usage:

from scripts.performance_optimizer import SearchStatistics

stats = SearchStatistics()

# During search
stats.record_node()
stats.record_cutoff()
stats.record_cache_hit()

# Analysis
print(stats.summary())
print(f"Pruning efficiency: {stats.pruning_efficiency():.1f}%")

Game Theory Applications

Full implementation in scripts/game_theory_analyzer.py.

1. Nash Equilibrium Calculation

Find optimal mixed strategy solutions for 2-player games.

Pure Strategy Nash Equilibria: A cell is a Nash equilibrium if it's a best response for both players.

Mixed Strategy Nash Equilibria: Players randomize over actions. For 2x2 games, use indifference conditions.

Usage:

from scripts.game_theory_analyzer import GameTheoryAnalyzer, PayoffMatrix
import numpy as np

# Create payoff matrix
p1_payoffs = np.array([[3, 0], [5, 1]])
p2_payoffs = np.array([[3, 5], [0, 1]])

matrix = PayoffMatrix(
    player1_payoffs=p1_payoffs,
    player2_payoffs=p2_payoffs,
    row_labels=['Strategy A', 'Strategy B'],
    column_labels=['Strategy X', 'Strategy Y']
)

analyzer = GameTheoryAnalyzer()

# Find pure Nash equilibria
equilibria = analyzer.find_pure_strategy_nash_equilibria(matrix)

# Find mixed Nash equilibrium (2x2 only)
p1_mixed, p2_mixed = analyzer.calculate_mixed_strategy_2x2(matrix)

# Expected payoff
payoff = analyzer.calculate_expected_payoff(p1_mixed, p2_mixed, matrix, player=1)

# Zero-sum analysis
if matrix.is_zero_sum():
    minimax = analyzer.minimax_value(matrix)
    maximin = analyzer.maximin_value(matrix)

2. Cooperative Game Analysis

Analyze coalitional games where players can coordinate.

Shapley Value:

  • Fair allocation of total payoff based on marginal contributions
  • Each player receives expected marginal contribution across all coalition orderings

Core:

  • Set of allocations where no coalition wants to deviate
  • Stable outcomes that satisfy coalitional rationality

Usage:

from scripts.game_theory_analyzer import CooperativeGameAnalyzer

coop = CooperativeGameAnalyzer()

# Define payoff function for coalitions
def payoff_func(coalition):
    # Return total value of coalition
    return sum(player_values[p] for p in coalition)

players = ['Alice', 'Bob', 'Charlie']

# Calculate Shapley values
shapley = coop.calculate_shapley_value(payoff_func, players)
print(f"Alice's fair share: {shapley['Alice']}")

# Find core allocation
core = coop.calculate_core(payoff_func, players)
is_stable = coop.is_core_allocation(core, payoff_func, players)

Best Practices

Agent Development

  • ✓ Start with rule-based baseline
  • ✓ Measure performance metrics consistently
  • ✓ Test against multiple opponents
  • ✓ Use version control for agent versions
  • ✓ Document strategy changes

Game Environment

  • ✓ Validate game rules implementation
  • ✓ Test edge cases
  • ✓ Provide easy reset/replay
  • ✓ Log game states for analysis
  • ✓ Support deterministic seeds

Optimization

  • ✓ Profile before optimizing
  • ✓ Use transposition tables
  • ✓ Implement proper time management
  • ✓ Monitor memory usage
  • ✓ Benchmark against baselines

Testing and Benchmarking

Complete benchmarking toolkit in scripts/agent_benchmark.py.

Tournament Evaluation

Run round-robin or elimination tournaments between agents.

Usage:

from scripts.agent_benchmark import GameAgentBenchmark

benchmark = GameAgentBenchmark()

# Run tournament
results = benchmark.run_tournament(agents, num_games=100)

# Compare two agents
comparison = benchmark.head_to_head_comparison(agent1, agent2, num_games=50)
print(f"Win rate: {comparison['agent1_win_rate']:.1%}")

Rating Systems

Calculate agent strength using standard rating systems.

Elo Rating:

  • Based on strength differential
  • K-factor of 32 for normal games
  • Used in chess and many games

Glicko-2 Rating:

  • Accounts for rating uncertainty (deviation)
  • Better for irregular play schedules

Usage:

# Elo ratings
elo_ratings = benchmark.evaluate_elo_rating(agents, num_games=100)

# Glicko-2 ratings
glicko_ratings = benchmark.glicko2_rating(agents, num_games=100)

# Strength relative to baseline
strength = benchmark.rate_agent_strength(agent, baseline_agents, num_games=20)

Performance Profiling

Evaluate agent quality on test positions.

Usage:

# Get performance profile
profile = benchmark.performance_profile(agent, test_positions, time_limit=1.0)
print(f"Accuracy: {profile['accuracy']:.1%}")
print(f"Avg move quality: {profile['avg_move_quality']:.2f}")

Implementation Checklist

  • Choose game environment (Gym, Chess, Custom)
  • Design agent architecture (Rule-based, Minimax, MCTS, RL)
  • Implement game state representation
  • Create evaluation function
  • Implement agent decision-making
  • Set up training/learning loop
  • Create benchmarking system
  • Test against multiple opponents
  • Optimize performance (search depth, eval speed)
  • Document strategy and results
  • Deploy and monitor performance

Resources

Frameworks

Research

平台分布

Claude Code

31.2%
按下载量换算413

trae

24.15%
按下载量换算320

Codex

16.48%
按下载量换算218

Antigravity

12.93%
按下载量换算171

windsurf

7.27%
按下载量换算96

github-copilot

2.99%
按下载量换算40

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

继续浏览同类 Skills