Author: Stan Arts
Date: 07:31:45 04/10/04
Go up one level in this thread
I should of added some extra information.. It loops from depth 1 through the depths till an end of the searchtree, that's an end of qsearch or mate/left-in-check or draw, etc. On each depth keeping account a move-counter, and if the next move on that depth should be done, etc. If a depth is "done" the flag for doing the next move on the previous depth in the searchtree gets set true and I then go to the next iteration of the search tree, starting at the depth of the do-next-move flag. This is how my non-recursive searchtree works.. So, I do something like: I have variables for each depth: Number-of-moves Move-counter do-next-move initializing search set all number-of-moves for all depths to 0 set all move-counters above 0 set all do-next-move flags to 0 fill ply1 move-list, set number-of-moves accordingly, and move-counter to 0 start of the search Repeat current-node-depth := 1 ; (assuming the searchtree starts at ply 1 ) Repeat If move-counter > number-of-moves Then initialise this depth, so deside what to do, drawdetection, deside if in qsearch or not, fill the movelist, etc. If do-next-move = True Then Move-counter := Move-counter + 1; if move-counter > number-of-moves Then end of this depth , do-next-move [ current-node-depth - 1 ] := True; if this is depth 1, deside that it's done searching this iteration, etc. Set done to 1 as we don't need to create the searchtree deeper here. current-node-depth := current-node-depth + 1; Until (current-node-depth > some maximum searchdepth) or (done = 1); this is the end of iteration. Iterations:=Iterations + 1; Until (iterations > 1000) or (search is done) ; (for instance 1000 iterations till checking the time or something, etc.) Stan
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.