Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix: pass correct from_id to add_observation in WordleEnv.step - #186

Open
wind-wing234 wants to merge 1 commit into
TextArena:mainfrom
wind-wing234:fix/wordle-from-id
Open

fix: pass correct from_id to add_observation in WordleEnv.step#186
wind-wing234 wants to merge 1 commit into
TextArena:mainfrom
wind-wing234:fix/wordle-from-id

Conversation

@wind-wing234

Copy link
Copy Markdown

This PR is a re-submission of #185 .
The previous PR was closed only to move the changes to a dedicated fix branch.
No functional changes compared to the original PR.

Description

Fixed a bug in WordleEnv.step where player actions were incorrectly attributed to the GAME_ID. This caused the observation logs to display [GAME] for player guesses instead of [Player].

Changes

Explicitly pass from_id=player_id in add_observation when recording PLAYER_ACTION.

Comparison

  • Before:

    [GAME] [planets]
    [GAME] You submitted [planets].
    
  • After:

    [Player] [planets]
    [GAME] You submitted [planets].
    

@borgr

borgr commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

Ready to merge. Confirmed the PLAYER_ACTION observation was omitting from_id, so it defaulted to GAME_ID and the guess was logged as [GAME] instead of [Player]. Passing from_id=player_id fixes the attribution. It's a broadcast observation, so there's no gameplay change — logging/attribution only.

Minor nit (non-blocking): the explicit to_id=-1 just restates the existing default.

@borgr

borgr commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Verified. add_observation defaults from_id=GAME_ID (-1), so the player's own guess was being logged as coming from GAME rather than from the player; passing from_id=player_id attributes it correctly, and to_id=-1 matches the existing broadcast default. Correct one-line fix.

LGTM, recommend merge.

Heads-up on overlap: #169 also edits Wordle/env.py (an unrelated constructor redesign toward word_lengths). This attribution fix is orthogonal to that change, so whichever lands second may just need a trivial rebase.

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