Skip to content

Commit f62f395

Browse files
committed
Fix robotrumble validation
1 parent 7cb8605 commit f62f395

5 files changed

Lines changed: 6 additions & 6 deletions

File tree

codeclash/games/robotrumble/robotrumble.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,10 @@ def get_results(self, agents: list[Player], round_num: int, stats: RoundStats):
9797
def validate_code(self, agent: Player) -> tuple[bool, str | None]:
9898
if self.submission not in agent.environment.execute("ls")["output"]:
9999
return False, f"There should be a `{self.submission}` file"
100-
if "def robot(state, unit):" not in agent.environment.execute(f"cat {self.submission}")["output"]:
100+
if "function robot(state, unit) {" not in agent.environment.execute(f"cat {self.submission}")["output"]:
101101
return (
102102
False,
103-
f"{self.submission} does not contain the required robot function. It should be defined as 'def robot(state, unit): ...'",
103+
f"{self.submission} does not contain the required robot function. It should be defined as 'function robot(state, unit) {{ ... }}'.",
104104
)
105105
test_run_cmd = f"{self.run_cmd_round} {self.submission} {self.submission} -t 1"
106106
test_run = agent.environment.execute(test_run_cmd)["output"]

configs/pvp/default_vs_more_prescriptive/gpt-5/robotrumble.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ prompts:
2525
The game is played in {{rounds}} rounds. For every round, you (and your competitor) edit program code that controls your bot. This is round {{round}}.
2626
After you and your competitor finish editing your codebases, the game is run automatically.
2727
28-
Your task: improve the bot in `robot.py`, located in {{working_dir}}.
28+
Your task: improve the bot in `robot.js`, located in {{working_dir}}.
2929
{{working_dir}} is your codebase, which contains both your bot and supporting assets.
3030
All of your commands will be executed in the {{working_dir}} directory (see notes below).

configs/pvp/default_vs_more_prescriptive/sonnet-4/robotrumble.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ prompts:
2929
The game is played in {{rounds}} rounds. For every round, you (and your competitor) edit program code that controls your bot. This is round {{round}}.
3030
After you and your competitor finish editing your codebases, the game is run automatically.
3131
32-
Your task: improve the bot in `robot.py`, located in {{working_dir}}.
32+
Your task: improve the bot in `robot.js`, located in {{working_dir}}.
3333
{{working_dir}} is your codebase, which contains both your bot and supporting assets.
3434
All of your commands will be executed in the {{working_dir}} directory (see notes below).

configs/test/players/2/robotrumble.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ prompts:
1717
The game is played in {{rounds}} rounds. For every round, you (and your competitor) edit program code that controls your bot. This is round {{round}}.
1818
After you and your competitor finish editing your codebases, the game is run automatically.
1919
20-
Your task: improve the bot in `robot.py`, located in {{working_dir}}.
20+
Your task: improve the bot in `robot.js`, located in {{working_dir}}.
2121
{{working_dir}} is your codebase, which contains both your bot and supporting assets.

configs/validation/vs_dummy/sonnet4/robotrumble.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ prompts:
2323
The game is played in {{rounds}} rounds. For every round, you (and your competitor) edit program code that controls your bot. This is round {{round}}.
2424
After you and your competitor finish editing your codebases, the game is run automatically.
2525
26-
Your task: improve the bot in `robot.py`, located in {{working_dir}}.
26+
Your task: improve the bot in `robot.js`, located in {{working_dir}}.
2727
{{working_dir}} is your codebase, which contains both your bot and supporting assets.
2828
All of your commands will be executed in the {{working_dir}} directory (see notes below).

0 commit comments

Comments
 (0)