Update multi_agent.py
Browse files- multi_agent.py +4 -4
multi_agent.py
CHANGED
@@ -64,7 +64,7 @@ def run_multi_agent(llm_white, llm_black, num_turns):
|
|
64 |
system_message="You are a chess player and you play as white. "
|
65 |
"First call get_legal_moves(), to get a list of legal moves. "
|
66 |
"Then call make_move(move) to make a move. "
|
67 |
-
"After a move is made, analyze the move in 3 bullet points. Respond in format **Analysis:** unordered list. "
|
68 |
"Then continue playing.",
|
69 |
llm_config=llm_config_white,
|
70 |
)
|
@@ -74,7 +74,7 @@ def run_multi_agent(llm_white, llm_black, num_turns):
|
|
74 |
system_message="You are a chess player and you play as black. "
|
75 |
"First call get_legal_moves(), to get a list of legal moves. "
|
76 |
"Then call make_move(move) to make a move. "
|
77 |
-
"After a move is made, analyze the move in 3 bullet points. Respond in format **Analysis:** unordered list. "
|
78 |
"Then continue playing.",
|
79 |
llm_config=llm_config_black,
|
80 |
)
|
@@ -141,11 +141,11 @@ def run_multi_agent(llm_white, llm_black, num_turns):
|
|
141 |
player = "Player White"
|
142 |
|
143 |
if turn_num > 0:
|
144 |
-
result += f"**{player}, Move {turn_num}**\n{chat.get('content')}\n{board_svgs[turn_num - 1]}\n"
|
145 |
|
146 |
turn_num += 1
|
147 |
|
148 |
-
result = result.rstrip("\n")
|
149 |
|
150 |
print("###")
|
151 |
print(result)
|
|
|
64 |
system_message="You are a chess player and you play as white. "
|
65 |
"First call get_legal_moves(), to get a list of legal moves. "
|
66 |
"Then call make_move(move) to make a move. "
|
67 |
+
"After a move is made, analyze the move in 3 bullet points. Respond in format **Analysis:** move from/to, unordered list. "
|
68 |
"Then continue playing.",
|
69 |
llm_config=llm_config_white,
|
70 |
)
|
|
|
74 |
system_message="You are a chess player and you play as black. "
|
75 |
"First call get_legal_moves(), to get a list of legal moves. "
|
76 |
"Then call make_move(move) to make a move. "
|
77 |
+
"After a move is made, analyze the move in 3 bullet points. Respond in format **Analysis:** move from/to, unordered list. "
|
78 |
"Then continue playing.",
|
79 |
llm_config=llm_config_black,
|
80 |
)
|
|
|
141 |
player = "Player White"
|
142 |
|
143 |
if turn_num > 0:
|
144 |
+
result += f"**{player}, Move {turn_num}**\n{chat.get('content')}\n{board_svgs[turn_num - 1]}\n\n"
|
145 |
|
146 |
turn_num += 1
|
147 |
|
148 |
+
result = result.rstrip("\n\n")
|
149 |
|
150 |
print("###")
|
151 |
print(result)
|