Account for gamePly after each move

Rename startPosPly to gamePly and increment/decrement
the variable after each do/undo move. This adds a little
overhead in do_move() but we will need to have the
game ply during the search for the next patches now
under test.

Currently we don't increment gamePly in do_null_move()
becuase it is not needed at the moment. Could change
in the future.

As a nice side effect we can now remove an hack in
startpos_ply_counter().

No functional change.
This commit is contained in:
Marco Costalba
2013-02-16 12:42:22 +01:00
parent 5a156df719
commit 76caef8ba1
3 changed files with 13 additions and 11 deletions

View File

@@ -182,7 +182,7 @@ void Search::think() {
static PolyglotBook book; // Defined static to initialize the PRNG only once
RootColor = RootPos.side_to_move();
TimeMgr.init(Limits, RootPos.startpos_ply_counter(), RootColor);
TimeMgr.init(Limits, RootPos.game_ply(), RootColor);
if (RootMoves.empty())
{