Skip to content

bug(Santorini): Display Debug - #160

Open
cstorm125 wants to merge 6 commits into
TextArena:mainfrom
cstorm125:santorini_display_debug
Open

bug(Santorini): Display Debug#160
cstorm125 wants to merge 6 commits into
TextArena:mainfrom
cstorm125:santorini_display_debug

Conversation

@cstorm125

Copy link
Copy Markdown
Contributor

Properly displays board and valid moves for Santorini environment.
Previously, it was displaying incorrect initial board state for each player causing confusion for agent starting second.

@cstorm125 cstorm125 changed the title [Bug] Santorini Display Debug bug(Santorini): Display Debug Aug 20, 2025
borgr added 2 commits August 8, 2026 08:27
The initial prompt showed game_state['valid_moves'], which is set to
_get_valid_moves(0) at reset, so every player was shown player 0's valid
moves instead of their own. Use _get_valid_moves(player_id) so each player
sees the moves for their own workers.

Keeps the is_open/show_valid options and the create_board_str signature
unchanged.
@borgr

borgr commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

Reworked to a minimal fix — ready to merge. I pushed a commit that keeps the real bug fix but drops the collateral changes.

The actual bug: the initial prompt showed game_state['valid_moves'], which reset() sets to _get_valid_moves(0). So every player was shown player 0's valid moves instead of their own. Fix:

if self.show_valid:
    prompt += f"\nValid moves: {self._get_valid_moves(player_id)}"

Why the rest was reverted: the previous version deleted the is_open/show_valid constructor options and only showed the board/moves to player 0 — which left every non-starting player with no board and no moves in their initial prompt (a new regression), and also threaded a valid_moves arg into create_board_str. Reverting those keeps the env's existing knobs and renderer signature intact; the net change is now a single line.

Verified on 3.11 (3-player): each player's prompt now matches _get_valid_moves(player_id) for their own workers (Navy / White / Grey are distinct); is_open=False, show_valid=False still suppresses both sections; make/reset/step cycle works. MERGEABLE / CLEAN.

@borgr

borgr commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

Thanks for catching this, @cstorm125. I've rebased the one-line fix onto current main and opened #200 so it can merge cleanly — credit to you for the diagnosis. Happy to close this in favor of that, or land it here if you'd rather.

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.

2 participants