Skip to content

Conversation

@ManuelFay
Copy link
Owner

Motivation

  • Provide a Backgammon implementation analogous to the existing Connect4 codebase to enable MCTS-based play.
  • Offer a pure-MCTS agent baseline to exercise game rules and move-generation before adding neural MCTS.
  • Add a simple pygame-based UI and gameplay loop so the new game can be played and visually inspected.
  • Expose the Backgammon agent from the package so it can be used like other agents.

Description

  • Add BackgammonBoard implementing rules, move generation, dice handling, and legal-action sequencing in alphaconnect4/interfaces/backgammon_board.py.
  • Add BackgammonTree MCTS node wrapper in alphaconnect4/interfaces/backgammon_mcts_interface.py to adapt board states to the existing MCTS engine and provide find_children, find_random_child, and reward.
  • Add BackgammonMCTSAgent in alphaconnect4/agents/backgammon_mcts_agent.py that uses MCTS for move selection and reports ai_confidence.
  • Add UI constants, a pygame visual engine (gameplay/backgammon_visual_engine.py), a gameplay loop (gameplay/backgammon_game.py), and a runnable entrypoint run_backgammon.py, and export the agent from alphaconnect4/agents/__init__.py.

Testing

  • No automated tests were executed as part of this change.
  • The new files were exercised interactively during development (visual/manual checks) but not via CI-run unit tests.
  • No test failures were reported because no test suite was run.
  • Further automated tests (unit tests for move generation and MCTS behavior) are recommended before merging into mainline.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants