Skip to content

Serve Onitama, Boop, Bug and Rota from GamesmanClassic - #114

Draft
kaiiiichen wants to merge 36 commits into
GamesCrafters:masterfrom
kaiiiichen:fa26-classic-ports-stacked
Draft

kaiiiichen wants to merge 36 commits into
GamesCrafters:masterfrom
kaiiiichen:fa26-classic-ports-stacked

Conversation

@kaiiiichen

@kaiiiichen kaiiiichen commented Nov 30, 2026 •

Copy link
Copy Markdown
Member

Merge only after the GamesmanClassic ports are merged and deployed: Rota GamesCrafters/GamesmanClassic#102, Onitama GamesCrafters/GamesmanClassic#103, Bug GamesCrafters/GamesmanClassic#101 (needs GamesCrafters/GamesmanClassic#100), Boop GamesCrafters/GamesmanClassic#104. Until then these games would fail to load.

Merge order

This PR is built on top of the students' own UWAPI work, merged unchanged (their commits keep their SHAs and authors). Please merge in this order:

  1. Branch onitama (Jonathan Cao, LaurierKe): Onitama image AutoGUI.
  2. Branch fa26-boop (Valentina): Boop image AutoGUI.
  3. Branch fa26-bug (Manlin Zhang, Lachlan Watts-Tobin, Samantha Weiss): Bug image AutoGUI. Two things need fixing before or while merging it; see "Notes on fa26-bug" below.
  4. Add Rota #111 (Sumedh Borkar): Add Rota.
  5. This PR.

Until those are merged, this PR's diff also shows their commits. Those commits are theirs, unchanged. Once they are in master, this PR shrinks to our own changes below.

Our changes

  • Switch to GamesmanClassic. The four games' registrations now use data_provider=GamesmanClassic, backed by the fa26 GamesmanClassic ports (monitama, mboop, mbug, mrota). Those ports produce AutoGUI strings byte-identical to the GamesmanPy modules, so the students' image AutoGUI data is used as it is. Variant keys and names are unchanged; the variant ids become Classic option numbers:
    • Onitama: 3x4 → 1, 3x4_balanced → 2
    • Boop: 4x4 → 1
    • Bug: Regular → 1, Reverse → 2
    • Rota: regular → 1
  • Why switch instead of adding Classic variants next to the Py ones:
    • None of these four games is on GamesmanPy main yet, so nothing currently served changes.
    • The Bug Reverse entry points at Py variant reverse, but the Py module calls it reversed.
    • Bug's and Onitama's state spaces (77M symmetry classes per Bug variant, 17.7M Onitama positions) are expensive to serve from the Python solver's databases.
    • Each switch is a two-line change, easy to revert per game.
  • get_bug_classic(). A thin wrapper around the students' get_bug(). The game's strings (Py and Classic alike) draw player 1 as w, while get_bug() maps r/b, so the wrapper reuses the r tile for w. It can go once the strings and the GUI agree on a character.
  • Restore snakestale and sokoban. See below.

Notes on fa26-bug

  • Line endings. The branch converts games/__init__.py and games/image_autogui_data.py to CRLF line endings (from commit 7fec208), so merging it conflicts with master over the whole of both files. In this PR, the merge commit keeps master's LF endings and takes the branch's content. The two real conflicts are both resolved by keeping both sides: Bug next to the new Breakthrough entries.
  • Dropped entries. The branch also drops the "snakestale" and "sokoban" entries from image_autogui_data_funcs and lists "spinout" twice. A separate commit here puts the two entries back and removes the duplicate.
  • If fa26-bug is merged on its own first, it should be converted back to LF and keep those two entries. Otherwise Snake's Tale and Sokoban lose their image GUI, and this PR conflicts with master across both files.

Testing

Locally: the GamesmanClassic Python bridge, this branch, and GamesmanUni main with the students' Uni branches (onitama, fa26-boop, fa26-bug) and GamesCrafters/GamesmanUni#229 merged in (fa26-boop's localhost gameAPI line dropped).

  • All six variants load with the expected start positions.
  • Each was played to a finished game in a headless browser, with no console errors:
    • Onitama 3x4 and 3x4_balanced, with card-then-arrow moves;
    • Boop 4x4;
    • Bug Regular and Reverse, including multi-tile part-moves;
    • Rota regular, with the students' Rota art.
  • Bug needs its GamesmanClassic process to stay alive with about 1.4 GB of memory. The bridge's default per-process limit (5% of RAM) closes it on machines with less than about 30 GB. Locally the limit was raised for this test; see the Classic Bug PR.

This PR was prepared with assistance from Claude (Anthropic's AI assistant).

manlinzh and others added 30 commits April 29, 2026 12:54
Merges GamesCrafters/GamesCraftersUWAPI branch onitama (c613b7d, by
Jonathan Cao and LaurierKe) unchanged, so that the GamesmanClassic
provider switch below can build on it. Clean merge, no conflicts.

Co-Authored-By: Claude <noreply@anthropic.com>
Merges GamesCrafters/GamesCraftersUWAPI branch fa26-boop (a55b742, by
Valentina) unchanged. Clean merge, no conflicts.

Co-Authored-By: Claude <noreply@anthropic.com>
kaiiiichen and others added 4 commits November 29, 2026 21:29
Merges GamesCrafters/GamesCraftersUWAPI branch fa26-bug (94ceb37, by
Manlin Zhang, Lachlan Watts-Tobin and Samantha Weiss).

Conflict resolution:
- fa26-bug converts games/__init__.py and games/image_autogui_data.py
  to CRLF line endings (from commit 7fec208), so both files conflicted
  as a whole. The merge keeps master's LF endings and takes the branch's
  content changes (merged with CRs stripped).
- The two remaining content conflicts are both "keep both": the Bug
  game entry next to master's new Breakthrough entry in games/__init__.py,
  and "bug" next to "breakthrough" in image_autogui_data_funcs.

The branch also drops the "snakestale" and "sokoban" entries from
image_autogui_data_funcs and lists "spinout" twice; that is taken as is
here and restored in a separate commit.

Co-Authored-By: Claude <noreply@anthropic.com>
The fa26-bug merge dropped "snakestale" and "sokoban" from
image_autogui_data_funcs and listed "spinout" twice. Put the two
entries back and remove the duplicate, so the funcs dict matches master
apart from the new games.

Co-Authored-By: Claude <noreply@anthropic.com>
Merges the head of GamesCrafters#111 (5c17669, by Sumedh Borkar) unchanged. Clean
merge, no conflicts.

Co-Authored-By: Claude <noreply@anthropic.com>
Switch the students' registrations (merged above, unchanged otherwise)
from GamesmanPy to the fa26 GamesmanClassic ports (monitama, mboop,
mbug, mrota), whose AutoGUI strings are byte-identical to the GamesmanPy
modules. Variant keys and names stay the same; the variant ids become
Classic option numbers:

  onitama  3x4 -> 1, 3x4_balanced -> 2
  boop     4x4 -> 1
  bug      Regular -> 1, Reverse -> 2
  rota     regular -> 1

Bug is drawn through get_bug_classic(), a thin wrapper around get_bug():
the game's strings draw player 1 as 'w', while get_bug() maps 'r'/'b',
so the wrapper reuses the 'r' tile for 'w'.

Co-Authored-By: Claude <noreply@anthropic.com>
@egale800
egale800 marked this pull request as ready for review November 30, 2026 18:19
@kaiiiichen
kaiiiichen marked this pull request as draft December 1, 2026 03:11
kaiiiichen and others added 2 commits December 2, 2026 17:58
Co-Authored-By: Claude <noreply@anthropic.com>
Rota and Bug use the tags their GamesmanUni branches already give them
(Rota: Dartboard, Rearranger, Partisan; Bug: Blocking, Partisan).

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants