Skip to content

Commit

Permalink
opponent remaining overage time (#305)
Browse files Browse the repository at this point in the history
  • Loading branch information
bovard authored Nov 12, 2024
1 parent eacb816 commit fc95d95
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kaggle_environments/envs/chess/chess.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
"defaults": ["white", "black"],
"enum": ["white", "black"]
},
"remainingOverageTime": 20
"remainingOverageTime": 20,
"opponentRemainingOverageTime": 20
},
"action": {
"description": "Move in UCI notation (e.g., e2e4)",
Expand Down
4 changes: 4 additions & 0 deletions kaggle_environments/envs/chess/chess.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,10 @@ def interpreter(state, env):
state[0].observation.board = fen
state[1].observation.board = fen

# Update the opponentRemainingOverageTime
state[0].observation.opponentRemainingOverageTime = state[1].observation.remainingOverageTime
state[1].observation.opponentRemainingOverageTime = state[0].observation.remainingOverageTime

terminal_state = DONE if game_one_complete else ACTIVE
pawn_or_capture_move_count = int(
fen.split(" ")[4]) # fen keeps track of this
Expand Down

0 comments on commit fc95d95

Please sign in to comment.