mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 00:33:09 +00:00
Retire easy move
Remove the easy move code and add the condition to play instantly if only one legal move is available. Verified there is no regression at 60+0.05 ELO: 0.17 +-1.9 (95%) LOS: 57.0% Total: 40000 W: 6397 L: 6377 D: 27226 bench: 8502826
This commit is contained in:
parent
a5869d8d25
commit
f14cd1bb89
1 changed files with 5 additions and 24 deletions
|
@ -428,32 +428,13 @@ namespace {
|
||||||
if (depth > 4 && depth < 50 && PVSize == 1)
|
if (depth > 4 && depth < 50 && PVSize == 1)
|
||||||
TimeMgr.pv_instability(BestMoveChanges);
|
TimeMgr.pv_instability(BestMoveChanges);
|
||||||
|
|
||||||
// Stop the search if most of the available time has been used. We
|
// Stop the search if only one legal move is available or most
|
||||||
// probably don't have enough time to search the first move at the
|
// of the available time has been used. We probably don't have
|
||||||
// next iteration anyway.
|
// enough time to search the first move at the next iteration anyway.
|
||||||
if (IterationTime > (TimeMgr.available_time() * 62) / 100)
|
if ( RootMoves.size() == 1
|
||||||
|
|| IterationTime > (TimeMgr.available_time() * 62) / 100)
|
||||||
stop = true;
|
stop = true;
|
||||||
|
|
||||||
// Stop the search early if one move seems to be much better than others
|
|
||||||
if ( depth >= 12
|
|
||||||
&& BestMoveChanges <= DBL_EPSILON
|
|
||||||
&& !stop
|
|
||||||
&& PVSize == 1
|
|
||||||
&& bestValue > VALUE_MATED_IN_MAX_PLY
|
|
||||||
&& ( RootMoves.size() == 1
|
|
||||||
|| Time::now() - SearchTime > (TimeMgr.available_time() * 20) / 100))
|
|
||||||
{
|
|
||||||
Value rBeta = bestValue - 2 * PawnValueMg;
|
|
||||||
ss->excludedMove = RootMoves[0].pv[0];
|
|
||||||
ss->skipNullMove = true;
|
|
||||||
Value v = search<NonPV>(pos, ss, rBeta - 1, rBeta, (depth - 3) * ONE_PLY, true);
|
|
||||||
ss->skipNullMove = false;
|
|
||||||
ss->excludedMove = MOVE_NONE;
|
|
||||||
|
|
||||||
if (v < rBeta)
|
|
||||||
stop = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (stop)
|
if (stop)
|
||||||
{
|
{
|
||||||
// If we are allowed to ponder do not stop the search now but
|
// If we are allowed to ponder do not stop the search now but
|
||||||
|
|
Loading…
Add table
Reference in a new issue