Author: Albert Bertilsson
Date: 00:03:11 01/26/04
Go up one level in this thread
On January 26, 2004 at 01:10:12, Mathieu Pagé wrote: >Hi, > >I always thought that it was not necessary to check for check after each moves. >My supposition was that if the search visit a node were the side that has just >move is still in check the opposite side will take the king and this will lead >to a so bad position (king captured) that the search (minimax, AB things) would >just reject that move. > >But this causes my engines to play illegal moves in the end of the games when he >is losing. When he see that is king will be captured whatever he do (mate in X) >he will sometimes play moves that leaves him in check. > >I know how to correct that problem at the root. I just have to check for check >after each root move and if it leaves my engines king in check I just reject >that move. But if I do this at every moves of the search, this will slow down >the process. > >Can I avoid calling this at every nodes ? You need an function that starts the search, in this special function you can do all sorts of extra stuff, checking victory conditions, picking moves from openening book, this function then calls the search routine. /Albert
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.