Add headless simulation and terminal gameplay - #11627
Draft
rrnewton wants to merge 2 commits into
Draft
Conversation
Extract the desktop simulator into a reusable headless Maven module, retain the desktop compatibility facade, and provide terminal, random, and zero controllers. Preserve current upstream seed and AI-profile options while fixing direct file-path deck loading. Test Results Summary: - mvn -pl forge-headless -am test: 11 tests passed (3 forge-game, 8 forge-headless), 0 failed - packaged headless assembly successfully - seeded two-game simulation repeated with identical normalized SHA-256 output - random-controller launcher smoke completed with a winner
Give the headless launcher conventional top-level help, readable simulation options and examples, clean terminal help, caller-relative deck paths, and quiet process replacement without shell timing noise. Test Results Summary: - mvn -pl forge-headless -am test: 13 tests passed (3 forge-game, 10 forge-headless), 0 failed - mvn -pl forge-headless -am package -DskipTests: passed - ./headless.sh --help, sim --help, and tui --help: passed
rrnewton
force-pushed
the
rrn-headless-rebased
branch
from
August 16, 2026 15:28
64051e1 to
642e1f1
Compare
Contributor
|
This is less "Add headless simulation" and more "Move headless simulation into its own package"? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Forge can now run games without starting the desktop or mobile application. A new
forge-headlessMaven module provides automated AI simulation and interactive terminal gameplay, with a repository-levelheadless.shlauncher.The launcher provides top-level command discovery, command-specific help, examples, conventional exit codes, and deck paths resolved relative to the caller's working directory.
Capabilities
simruns one or more games between normal Forge AI players.tuilets a person play or observe a game from an interactive terminal..dckpaths are accepted.The random controller deliberately handles only its supported legal-action subset and skips spells that require targets. It is intended for benchmarks, not strategic play. Tournament mode continues to use normal Forge AI; random-controller mode cannot be combined with tournaments or AI profiles.
Compatibility
The existing desktop
forge.view.SimulateMatchentry point remains available as a deprecated facade and delegates to the new module. Existing simulation options for seeds, formats, tournaments, timeouts, AI profiles, quiet output, and match size remain available.Validation
mvn -pl forge-headless -am test: 13 tests passed (3forge-game, 10forge-headless), 0 failures.mvn -pl forge-headless -am package -DskipTests: passed and produced the assembled launcher JAR../headless.sh --help,sim --help, andtui --help: passed against the packaged JAR.