Skip to content

Observers and Game Saves#357

Open
hopshackle wants to merge 44 commits into
masterfrom
Advisers
Open

Observers and Game Saves#357
hopshackle wants to merge 44 commits into
masterfrom
Advisers

Conversation

@hopshackle

@hopshackle hopshackle commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

This has three main components:

  1. Addition of infrastructure for third-party observers to a game (players.observers package). These build on IGameListener and provide support for agents who are watching (and perhaps intervening in) a game. A new facility is enabled for one of these observers to intercept a move made by a player, and suggest one of its own. There is room to improve this co-ordination (or negotiation) between observer and player; this is a minimal first implementation.

Two advisers are provided. An Underdog adviser that will suggest better moves to players who are currently doing badly; and Tutor that is looking out for one specific player, and will suggest moves to them if they make one that the tutor thinks is particularly awful.

  1. Addition of infrastructure to save a game state, and then restart from this saved state. This will always require game-specific methods in the game state to allow this to be saved to a JSON format and then resurrected from this. Backgammon (and its ancient variants) are implemented as an example in this PR, along with Exploding Kittens and Connect 4.
    Facility has also been added to RunGames to allow a specific JSON state to be specified, and then start all games in the tournament from this specific state.
    Some serialization of Components has be standardised to one of the two conventions used.

  2. Addition of infrastructure to run a game, taking a snapshot of the GUI at each decision point, and of the MCTS search situation. This is encapsulated in a new MCTSDecisionRecorder listener that can be wired in via theRunGames config. This will also save the JSON state of each game state if IToJSON is supported.
    It spits out a dot file of the MCTS tree at each point; anbd will also convert this to a png if Graphviz is locally installed.

Other changes
4) Connect4 now defaults to the standard 6 x 7 board (not 8x8, but this is now fully configurable)

  1. A few GUIs updated to properly hide non-visible information (ongoing confusion about use of humanID as parameter in DeckView).

@hopshackle hopshackle requested review from L0RDR0B, Copilot and rdgain and removed request for Copilot July 1, 2026 15:08
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.

1 participant