Author: martin fierz
Date: 15:04:48 09/17/04
aloha! i just spent friday night implementing pondering in my chess program. hmm, make that 3 questions, the first being "should i get a life?" :-) anyway, back to the two questions - they are really rather stupid, but well... 1) i'm using PeekNamedPipe to look whether there is any command for my program, and i'm looking for "ponderhit". when i find that, i'd like to flush the standard input. however, "fflush(stdin);" doesn't help, the ponderhit command stays where it is and is seen by every next call to my standard-input-polling function. i now use "gets(input)" where input is a string, and then the ponderhit command disappears and is not seen by the next call to PeekNamedPipe. can somebody tell me why fflush(stdin) won't work? 2) when i receive a ponderhit command but have used a lot of time, i abort the search. so my PV is now reduced to crap (except for the first ply) and my engine ponders on a garbage move. is there any more elegant/better way to solve this than memorizing the PV of the last ply? for instance, i might have had a fail-high for a new root move, and i don't construct PVs in the middle of the search, only after every completed ply. but i should construct PVs all the time (i.e. on every ply, and on every new best move at root level) if i want to ponder, correct? how are you doing this in your program? cheers martin
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.