Skip to content

Commit

Permalink
Update time per game as well as increment (#300)
Browse files Browse the repository at this point in the history
  • Loading branch information
bovard authored Nov 6, 2024
1 parent 51f2058 commit 997b0ba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 4 additions & 4 deletions kaggle_environments/envs/chess/chess.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
"agents": [2],
"configuration": {
"episodeSteps": 1000,
"actTimeout": 1,
"actTimeout": 0.1,
"agentTimeout": {
"description": "Obsolete field kept for backwards compatibility, please use observation.remainingOverageTime.",
"type": "number",
"minimum": 0,
"default": 60
"default": 10
}
},
"reward": {
Expand All @@ -31,7 +31,7 @@
"defaults": ["white", "black"],
"enum": ["white", "black"]
},
"remainingOverageTime": 60
"remainingOverageTime": 10
},
"action": {
"description": "Move in UCI notation (e.g., e2e4)",
Expand All @@ -41,4 +41,4 @@
"status": {
"defaults": ["ACTIVE", "INACTIVE"]
}
}
}
2 changes: 2 additions & 0 deletions kaggle_environments/envs/chess/chess.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,9 @@ def interpreter(state, env):
seen_positions = defaultdict(int)
game_start_position = math.floor(random.random() * len(OPENINGS))
state[0].observation.board = OPENINGS[game_start_position]
state[0].observation.remainingOverageTime = 10
state[1].observation.board = OPENINGS[game_start_position]
state[1].observation.remainingOverageTime = 10
return state

if state[0].status == ACTIVE and state[1].status == ACTIVE:
Expand Down

0 comments on commit 997b0ba

Please sign in to comment.