Author: Uri Blass
Date: 10:47:43 12/15/04
Go up one level in this thread
On December 15, 2004 at 13:00:35, Alessandro Scotti wrote:
Hi Alessandro,
I do not understand what is ::
I never used it in code that I wrote but I can see it not only in your code but
also in nalimov's code.
It seems that both you and nalimov are smarter than me.
I also do not have a function to think because I have no illusion that movei can
think(I am not smart enough to make my engine think).
I have only function to choosemove.
during a game
I have the function at the bottom of this post that is relevant both for ponder
off and ponder on to make move and ponder if necessary.
ponder calculates move to play and search until the search is finished for some
reason and after the search is finished there are 3 cases to handle:
case 1:search was finished after the expected move was played
ponder calls make_move_and_ponder
case 2:search was finished after unexpected move was played or after handling
another winboard command that told the engine to stop the search.
ponder undo the expected move and is finished.
case 3:search was finished for different reason like mate score
ponder again undo the expected move and is finished
In both cases 2 and 3 the program goes to the same place in the loop that is in
main.cpp when the difference is only that in case 3 wait_flag tells it to wait
passively for winboard command and in case 2 it does not wait passively for
winboard command.
In both cases 2 and 3 it checks first if the winboard command is not a move and
check for a move as last option inspite of the fact that the winboard command is
usually a move.
void make_move_and_ponder(int post)
{
if (resigning()==0)
{
makeandprintpvmove();
if (gamefinished())
print_result();
else
{
if (t.isponder())
ponder(post);
}
}
}
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.