Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Program design question

Author: James Robertson

Date: 11:18:02 12/31/99

Go up one level in this thread


I think I solved the problem neatly without multithreading or anything fancy.

Every time my program starts a search, it uses two boards; one for the game, and
one to search with (initialized every search). After the search is completed and
a move is found, my program updates the game board.

To ponder, I copy the game board to the search board, make the 'expected'
opponent response on the search board, and search as if the opponent had already
made the move. If the opponent does not reply as expected, I simply terminate
the search, make the opponent's move on both boards, and start searching again.
If the opponent _does_ make the expected move, I make it on the game board,
notify the searching classes we are no longer pondering, and when the search
finishes I make the new search move on the game board.

James



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.