civerson916 commited on
Commit
1406343
·
verified ·
1 Parent(s): ebda551

Invert FEN output

Browse files
Files changed (1) hide show
  1. tools.py +4 -1
tools.py CHANGED
@@ -174,7 +174,10 @@ class ChessGameFenTool(BaseCustomTool):
174
 
175
  def forward(self, piece_placement: str, player_turn: str) -> str:
176
  """Use the tool."""
177
- fen_message = f"""Assuming {player_turn} has the next turn, Use the following placement
 
 
 
178
  {piece_placement} and provide the board state as FEN. Do not provide any
179
  additional thinking or commentary in the response, the FEN only."""
180
  messages = [{ "content": fen_message,"role": "user"}]
 
174
 
175
  def forward(self, piece_placement: str, player_turn: str) -> str:
176
  """Use the tool."""
177
+ fen_message = f"""First, invert the FEN string making it (rank 1 at top)
178
+ and mirrored (file 'a' at right), but formatted according to the strict FEN
179
+ standard (reading from the top-left of the standard board layout). Then,
180
+ assuming {player_turn} has the next turn, Use the following placement
181
  {piece_placement} and provide the board state as FEN. Do not provide any
182
  additional thinking or commentary in the response, the FEN only."""
183
  messages = [{ "content": fen_message,"role": "user"}]