Fix ResignIfMostLose cannot work
This commit is contained in:
parent
8cb285f215
commit
d3d6b09ff3
|
@ -891,7 +891,7 @@ bool Position::resign(Color loser)
|
||||||
|
|
||||||
set_gameover(~loser, GameOverReason::loseReasonResign);
|
set_gameover(~loser, GameOverReason::loseReasonResign);
|
||||||
|
|
||||||
//snprintf(record, RECORD_LEN_MAX, loseReasonResignStr, loser);
|
snprintf(record, RECORD_LEN_MAX, loseReasonResignStr, loser);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
#include "uci.h"
|
#include "uci.h"
|
||||||
#include "tt.h"
|
#include "tt.h"
|
||||||
#include "option.h"
|
#include "option.h"
|
||||||
|
#include "mills.h"
|
||||||
|
|
||||||
#ifdef PERFECT_AI_SUPPORT
|
#ifdef PERFECT_AI_SUPPORT
|
||||||
#include "perfect/perfect.h"
|
#include "perfect/perfect.h"
|
||||||
|
@ -578,18 +579,16 @@ string Thread::nextMove()
|
||||||
}
|
}
|
||||||
#endif /* ENDGAME_LEARNING */
|
#endif /* ENDGAME_LEARNING */
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
if (gameOptions.getResignIfMostLose() == true) {
|
if (gameOptions.getResignIfMostLose() == true) {
|
||||||
if (root->value <= -VALUE_MATE) {
|
if (bestvalue <= -VALUE_MATE) {
|
||||||
gameOverReason = loseReasonResign;
|
rootPos->set_gameover(~rootPos->sideToMove, GameOverReason::loseReasonResign);
|
||||||
//snprintf(record, Position::RECORD_LEN_MAX, loseReasonResignStr, position->sideToMove);
|
snprintf(rootPos->record, Position::RECORD_LEN_MAX, loseReasonResignStr, rootPos->sideToMove);
|
||||||
return record;
|
return rootPos->record;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nodeCount = 0;
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef TRANSPOSITION_TABLE_ENABLE
|
#ifdef TRANSPOSITION_TABLE_ENABLE
|
||||||
#ifdef TRANSPOSITION_TABLE_DEBUG
|
#ifdef TRANSPOSITION_TABLE_DEBUG
|
||||||
size_t hashProbeCount = ttHitCount + ttMissCount;
|
size_t hashProbeCount = ttHitCount + ttMissCount;
|
||||||
|
|
Loading…
Reference in New Issue