Skip to content

Commit

Permalink
Fixes AbstractEngine.newGame did nothing + extra multiPV moves returned
Browse files Browse the repository at this point in the history
  • Loading branch information
fathzer committed Nov 23, 2024
1 parent c50ab7c commit 96f0675
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ public void setHashTableSize(int sizeInMB) {

protected abstract TranspositionTable<M> buildTranspositionTable(int sizeInMB);

@Override
public void newGame() {
engine.newGame();
}

@Override
public List<Option<?>> getOptions() {
final List<Option<?>> options = new ArrayList<>();
Expand Down Expand Up @@ -152,7 +157,7 @@ public GoReply get() {
final List<UCIMove> list = tt.collectPV(board, toMove(m), info.getDepth()).stream().map(x -> toUCI(x)).toList();
return list.isEmpty() ? Optional.empty() : Optional.of(list);
});
info.setExtraMoves(bestMoves.stream().filter(em -> !move.getContent().equals(em.getContent())).map(em->toUCI(em.getContent())).toList());
info.setExtraMoves(bestMoves.stream().filter(em -> !move.getContent().equals(em.getContent())).limit(engine.getDeepeningPolicy().getSize()-1).map(em->toUCI(em.getContent())).toList());
goReply.setInfo(info);
return goReply;
}
Expand Down

0 comments on commit 96f0675

Please sign in to comment.