Directories
¶
| Path | Synopsis |
|---|---|
|
Package cards imports all card set packages to register every card.
|
Package cards imports all card set packages to register every card. |
|
cmd
|
|
|
cardart
command
Package cardart generates unique deterministic pixel art for Magic: The Gathering cards.
|
Package cardart generates unique deterministic pixel art for Magic: The Gathering cards. |
|
fetchcatalog
command
fetchcatalog fetches card metadata from the Scryfall API for all sets from Alpha through Onslaught block and writes per-set JSON files to data/catalog/.
|
fetchcatalog fetches card metadata from the Scryfall API for all sets from Alpha through Onslaught block and writes per-set JSON files to data/catalog/. |
|
fetchset
command
fetchset fetches all cards in an MTG set from the Scryfall API and writes a JSON array to stdout.
|
fetchset fetches all cards in an MTG set from the Scryfall API and writes a JSON array to stdout. |
|
forge
command
cmd/forge generates complete, balanced Magic: The Gathering card sets.
|
cmd/forge generates complete, balanced Magic: The Gathering card sets. |
|
gametest
command
Command gametest runs two AI players against each other, printing the game state at the start of each turn and every decision each AI makes along with the choices it had available.
|
Command gametest runs two AI players against each other, printing the game state at the start of each turn and every decision each AI makes along with the choices it had available. |
|
genset
command
genset generates stub Go files for a card set from its JSON data.
|
genset generates stub Go files for a card set from its JSON data. |
|
oracle-replay
command
oracle-replay reads an XMage SelfPlayJsonRecorder JSONL file and replays the game in mage-go, validating state at every recorded priority point.
|
oracle-replay reads an XMage SelfPlayJsonRecorder JSONL file and replays the game in mage-go, validating state at every recorded priority point. |
|
pylib
command
Package main exposes the mage engine as a C shared library for use from Python (via cffi) or any other language with a C FFI.
|
Package main exposes the mage engine as a C shared library for use from Python (via cffi) or any other language with a C FFI. |
|
scenarioanalyze
command
Command scenarioanalyze reads JSONL output from scenariotest and flags potential engine bugs.
|
Command scenarioanalyze reads JSONL output from scenariotest and flags potential engine bugs. |
|
scenariotest
command
Command scenariotest runs batches of AI vs AI games using Shandalar rogue decks and emits structured JSONL results for analysis.
|
Command scenariotest runs batches of AI vs AI games using Shandalar rogue decks and emits structured JSONL results for analysis. |
|
server
command
|
|
|
tui
command
|
|
|
wasm
command
Command wasm builds the mage engine as a WebAssembly module, exposing game-loop functions to JavaScript via syscall/js.
|
Command wasm builds the mage engine as a WebAssembly module, exposing game-loop functions to JavaScript via syscall/js. |
|
internal
|
|
|
scenario
Package scenario provides types and utilities for running AI vs AI scenario tests using Shandalar rogue decks.
|
Package scenario provides types and utilities for running AI vs AI scenario tests using Shandalar rogue decks. |
|
pkg
|
|
|
catalog
Package catalog provides a Scryfall-sourced card metadata catalog covering sets from Alpha through Onslaught block.
|
Package catalog provides a Scryfall-sourced card metadata catalog covering sets from Alpha through Onslaught block. |
|
mage
Package mage implements the two-player Magic: The Gathering rules engine.
|
Package mage implements the two-player Magic: The Gathering rules engine. |
|
mage/core
Package core defines the fundamental value types, enums, and constants used throughout the MTG game engine.
|
Package core defines the fundamental value types, enums, and constants used throughout the MTG game engine. |
|
mage/dsl
Package dsl is the card-author-facing surface of the mage engine.
|
Package dsl is the card-author-facing surface of the mage engine. |
|
mage/interactive
Package interactive provides the interactive player layer for the MTG engine: human players driven by a TUI over channels, computer players driven by pluggable heuristic strategies, position evaluation, and game-loop runners for both single-player (human vs.
|
Package interactive provides the interactive player layer for the MTG engine: human players driven by a TUI over channels, computer players driven by pluggable heuristic strategies, position evaluation, and game-loop runners for both single-player (human vs. |
|
mage/interactive/ai
Package ai provides computer-controlled players with pluggable strategies for the MTG engine.
|
Package ai provides computer-controlled players with pluggable strategies for the MTG engine. |
|
mage/interactive/ai/combatsolver
Package combatsolver computes joint-optimal combat decisions for the AI: which attackers to declare, which blocks to assign, and which combat-eligible instants and activated abilities to fire in the post-blockers response window.
|
Package combatsolver computes joint-optimal combat decisions for the AI: which attackers to declare, which blocks to assign, and which combat-eligible instants and activated abilities to fire in the post-blockers response window. |
|
mage/interactive/ai/heuristic
Package heuristic implements a fast, personality-driven AI strategy that makes decisions via local heuristics (without search).
|
Package heuristic implements a fast, personality-driven AI strategy that makes decisions via local heuristics (without search). |
|
mage/interactive/ai/search
Package search implements a full-turn minimax AI strategy.
|
Package search implements a full-turn minimax AI strategy. |
|
mage/interactive/eval
Package eval provides position evaluation and scoring for the MTG engine.
|
Package eval provides position evaluation and scoring for the MTG engine. |
Click to show internal directories.
Click to hide internal directories.