bstraehle commited on
Commit
3563a0d
·
verified ·
1 Parent(s): 1d4049e

Update multi_agent.py

Browse files
Files changed (1) hide show
  1. multi_agent.py +4 -4
multi_agent.py CHANGED
@@ -39,8 +39,8 @@ def make_move(move: Annotated[str, "A move in UCI format."]) -> Annotated[str, "
39
  f"{chess.SQUARE_NAMES[move.from_square]} to "\
40
  f"{chess.SQUARE_NAMES[move.to_square]}."
41
 
42
- def game_over():
43
- print("###### game_over")
44
  global game_over
45
 
46
  game_over = True
@@ -101,7 +101,7 @@ def run_multi_agent(llm_white, llm_black, num_moves):
101
  name="Player White",
102
  system_message="You are a chess Grandmaster and you play as white. "
103
  "First call get_legal_moves(), to get a list of legal moves. "
104
- "If there is no legal move, call game_over() "
105
  "Else call make_move(move) to make a legal move. "
106
  "Analyze the move in 3 bullet points. Respond in format **Analysis:** move in UCI format, unordered list.",
107
  llm_config=llm_config_white,
@@ -112,7 +112,7 @@ def run_multi_agent(llm_white, llm_black, num_moves):
112
  name="Player Black",
113
  system_message="You are a chess Grandmaster and you play as black. "
114
  "First call get_legal_moves(), to get a list of legal moves. "
115
- "If there is no legal move, call game_over() "
116
  "Else call make_move(move) to make a legal move. "
117
  "Analyze the move in 3 bullet points. Respond in format **Analysis:** move in UCI format, unordered list.",
118
  llm_config=llm_config_black,
 
39
  f"{chess.SQUARE_NAMES[move.from_square]} to "\
40
  f"{chess.SQUARE_NAMES[move.to_square]}."
41
 
42
+ def set_game_over():
43
+ print("###### set_game_over")
44
  global game_over
45
 
46
  game_over = True
 
101
  name="Player White",
102
  system_message="You are a chess Grandmaster and you play as white. "
103
  "First call get_legal_moves(), to get a list of legal moves. "
104
+ "If there is no legal move, call set_game_over() "
105
  "Else call make_move(move) to make a legal move. "
106
  "Analyze the move in 3 bullet points. Respond in format **Analysis:** move in UCI format, unordered list.",
107
  llm_config=llm_config_white,
 
112
  name="Player Black",
113
  system_message="You are a chess Grandmaster and you play as black. "
114
  "First call get_legal_moves(), to get a list of legal moves. "
115
+ "If there is no legal move, call set_game_over() "
116
  "Else call make_move(move) to make a legal move. "
117
  "Analyze the move in 3 bullet points. Respond in format **Analysis:** move in UCI format, unordered list.",
118
  llm_config=llm_config_black,