RedQueen 1.1.1 on Mac OS X

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
lucasart
Posts: 3232
Joined: Mon May 31, 2010 1:29 pm
Full name: lucasart

Re: RedQueen 1.1.1 on Mac OS X

Post by lucasart »

Hi Ben-Hur,

I tried my patch, and even a much simpler version for debug purposes:

Code: Select all

const int64_t SearchAgent::getTimeToSearch(const int64_t usedTime) {
	if (getSearchMode()==SearchAgent::SEARCH_MOVETIME) {
		return getMoveTime();
	}
	int64_t time = board.getSideToMove()==WHITE? getWhiteTime():getBlackTime();
	int64_t incTime = board.getSideToMove()==WHITE?getWhiteIncrement():getBlackIncrement();
	int64_t result = std::min(time-25, time/40 + incTime);
	std&#58;&#58;cout << "time allocated " << result << std&#58;&#58;endl;
	return result;
&#125;
Still time losses! The time bug is more deeply rooted in your search code. Example:

Code: Select all

position startpos moves e2e4
go wtime 1 winc 1 btime 1000 binc 1000
time allocated 975
...
info depth 15 score cp -36 time 1254 nodes 843776 nps 843776 pv e7e5 g1f3 b8c6 b1c3 f8c5 f1b5 a7a6 b5c6 d7c6
info nodes 843776 time 1254 nps 843776 hashfull 280
bestmove e7e5 ponder g1f3
The time constraint (975 ms) was not respected by the search, by quite a large margin! You should test the time condition every X nodes (eg. X = 1024 should be fine) including QS nodes.