games-and-configs
Selects, validates, and adapts MuZero General games, MuZeroConfig fields, custom Game wrappers, and optional environment dependencies.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- games-and-configs
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Selects, validates, and adapts MuZero General games, MuZeroConfig fields, custom Game wrappers, and optional environment dependencies.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/configuration-reference.md6.0 KB
- 参考文档references/games-and-configs.md6.3 KB
- 参考文档references/troubleshooting.md4.1 KB
- 脚本scripts/list_builtin_games.py4.2 KB
- 脚本scripts/validate_game_module.py6.5 KB
03 SKILL.md 正文
Games and Configs
Use this sub-skill when the task is to choose a built-in MuZero General game, inspect or modify MuZeroConfig, add a new game wrapper, validate observation/action contracts, troubleshoot optional game dependencies, or explain single-player/two-player game behavior.
Fast route
-
Read games-and-configs.md for the built-in game catalog,
AbstractGamecontract, custom game recipe, and optional dependency map. -
Read configuration-reference.md before editing
MuZeroConfigfields for game shape, self-play, network, training, replay buffer, reanalyse, GPU, or temperature behavior. -
Read troubleshooting.md when imports fail, observations do not match
observation_shape, legal actions are empty/illegal, rendering blocks, or optional dependencies are missing. -
Discover available game modules without training:
python sub-skills/games-and-configs/scripts/list_builtin_games.py --format table -
Validate a selected or custom game wrapper without rendering/training:
python sub-skills/games-and-configs/scripts/validate_game_module.py --module games.tictactoe --json
Scope and boundaries
This sub-skill owns:
games.abstract_game.AbstractGamemethods and expectedGamewrapper behavior.- Built-in game names, player counts, observation shapes, action spaces, network defaults, opponent defaults, and optional package needs.
MuZeroConfigfield groups and how they affect training/search/model construction.- Custom game wrapper authoring and validation steps.
- Dependency handling for Gym classic-control, Box2D LunarLander, Atari/OpenCV/ALE, MiniGrid, and OpenSpiel.
Route elsewhere when the task is primarily about:
- Running training/testing, building CLI commands, Ray workers, or TensorBoard: training-and-cli.
- Debugging model tensor shapes, support transforms, MCTS action masks, or GameHistory stacking: models-and-mcts.
- Loading checkpoints or diagnosing learned dynamics from saved weights: checkpoints-and-diagnostics.
Safe defaults
- Use
tictactoe,connect4,gomoku,twentyone, andcartpolefor dependency-light validation in normal CPU environments. - Skip
render()andhuman_to_action()in automated checks; many wrappers callinput(). - Treat
lunarlander,atari,breakout,gridworld, andspielas optional integrations until their specific dependencies are installed. - Keep action spaces as contiguous integer indexes (
list(range(n))) unless changing MuZero internals, because policy logits and one-hot dynamics use actions as tensor indexes.
Custom game checklist
Before training a custom game:
- For a new editable game, first stage the bundled source with
python scripts/stage_muzero_source.py --dest <workdir>/muzero-general-source; then create a module importable asgames.<name>inside that staged copy and pass--repo-root <workdir>/muzero-general-sourceto validators. - Define
MuZeroConfigwithobservation_shape,action_space,players,network, self-play/training/replay fields, andvisit_softmax_temperature_fn. - Define
Gamewithreset(),step(action),legal_actions(),render(), and optionalto_play(),close(),human_to_action(),expert_agent(),action_to_string(). - Ensure
reset()andstep()return observations exactly shaped likeconfig.observation_shape. - Ensure
legal_actions()is non-empty before search and a subset ofconfig.action_space. - Run
validate_game_module.pyand then the model/MCTS smoke before training. Omit--repo-rootfor bundled built-ins; pass--repo-rootonly for staged custom-game copies.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).