Skip to content

Commit

Permalink
Check for easy move just once
Browse files Browse the repository at this point in the history
Here the rational seems to be that if after one try easy
move detection fails then the easy move is not so easy :-)

After 15563 games at 60+0.05
ELO: 3.04 +-5.5 (95%) LOS: 97.0%
Total: 15563 W: 2664 L: 2528 D: 10371

No functional change.
  • Loading branch information
glinscott authored and mcostalba committed Mar 11, 2013
1 parent 3698d9a commit a24da07
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ namespace {
Stack ss[MAX_PLY_PLUS_2];
int depth, prevBestMoveChanges;
Value bestValue, alpha, beta, delta;
bool triedEasyMove = false;

memset(ss, 0, 4 * sizeof(Stack));
depth = BestMoveChanges = 0;
Expand Down Expand Up @@ -439,10 +440,12 @@ namespace {
// Stop search early if one move seems to be much better than others
if ( depth >= 12
&& !stop
&& !triedEasyMove
&& PVSize == 1
&& ( RootMoves.size() == 1
|| Time::now() - SearchTime > (TimeMgr.available_time() * 20) / 100))
{
triedEasyMove = true;
Value rBeta = bestValue - 2 * PawnValueMg;
(ss+1)->excludedMove = RootMoves[0].pv[0];
(ss+1)->skipNullMove = true;
Expand Down

0 comments on commit a24da07

Please sign in to comment.