Skip to content

Commit

Permalink
Add FEN support, solves issue #17
Browse files Browse the repository at this point in the history
  • Loading branch information
Hans Ekbrand committed Jan 29, 2023
1 parent b34aa83 commit 539aae2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion libs/lczero-common
Submodule lczero-common updated 1 files
+0 −26 proto/net.proto
11 changes: 8 additions & 3 deletions src/mcts/auxengine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1255,9 +1255,14 @@ void Search::DoAuxEngine(Node* n, int index){
my_board.Mirror();
}

if (params_.GetAuxEngineVerbosity() >= 9) LOGFILE << "add position=" << s << " for the helper to explore";
s = "position startpos moves " + s;

// In analysis mode, Leela can be given a FEN in which case we cannot supply the history of the position, which in turn means we have to give the helper a FEN too.
if(ChessBoard::kStartposBoard == my_board){
s = "position startpos moves " + s;
} else {
PositionHistory ph = played_history_;
s = "position fen " + GetFen(ph.Last()) + " moves " + s;
}

// 1. Only start the engines if we can aquire the auxengine_stopped_mutex
// 2. Only send anything to the engines if we have aquired that mutex

Expand Down

0 comments on commit 539aae2

Please sign in to comment.