From 5fb6a93e9aeec5c4d9036bb8abf0af8f1e67bd75 Mon Sep 17 00:00:00 2001 From: Fathzer Date: Thu, 25 Apr 2024 16:27:21 +0200 Subject: [PATCH] Re-adds ability to customize move selection when some eval are equals --- .../java/com/fathzer/jchess/uci/helper/AbstractEngine.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/fathzer/jchess/uci/helper/AbstractEngine.java b/src/main/java/com/fathzer/jchess/uci/helper/AbstractEngine.java index e65f838..a3084eb 100644 --- a/src/main/java/com/fathzer/jchess/uci/helper/AbstractEngine.java +++ b/src/main/java/com/fathzer/jchess/uci/helper/AbstractEngine.java @@ -137,7 +137,7 @@ public GoReply get() { if (search.isEmpty()) { return new GoReply(null); } - final EvaluatedMove move = getChoice(search); + final EvaluatedMove move = getSelected(board, search); final GoReply goReply = new GoReply(toUCI(move.getContent())); final Info info = new Info(search.getDepth()); final TranspositionTable tt = engine.getTranspositionTable(); @@ -165,7 +165,7 @@ public void stop() { }; } - private EvaluatedMove getChoice(SearchHistory history) { + protected EvaluatedMove getSelected(B board, SearchHistory history) { return history.getBestMoves().get(0); }