Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: One mate to solve...

Author: Paul

Date: 12:36:08 04/29/01

Go up one level in this thread


On April 29, 2001 at 14:27:39, leonid wrote:

>Not at all! It will not crash. Only he says openly that its number of moves is
>limited to 100. I remember that I tried on it few positions (don't know how many
>moves they had but they were heavy) and he responded in perfect way. Only since
>it indicate 100 moves limits I don't try on Rebel positions that goes beyond
>100.

Well, Rebel must (have) use(d) a different way to store moves from what I do.

>My program have its limit for now. It is 200. Will change this in the next
>version when I will go to the other system after DOS. Will put 300.
>
>Actual limit of 200 is for the number of legal moves that move generator creat.
>All moves, in my program find (few exceptions exist) before each ply, so your
>expression is completely unclear for me: "unless I search too many plies of
>course...". Or "moves of each ply being added to the end of the moves of the
>previous ply". Probably you do something completely different from me. I even
>don't know how to ask you in order of finding where is the difference.

Ok ... I'm no teacher, but I'll try to explain a little :). I have a "move
stack" ... you know the word stack? It's just an array of elements (16384
elements in Pretz). Each element can contain a move (and some other things), so
there's room for 16384 moves on my stack.

Now say we have a position with white to move; I generate all possible white
moves and put them on my stack, one at a time. If there are 100 possible moves
for white, the stack will contain 100 elements after generation (stack[0] ...
stack[99]). These are all ply=0 moves.

Then I make one of those ply=0 moves, now we have a position with black to move.
I do the same as before ... generate all possible (black) moves, and put them on
the same stack, but starting with element 100. Say there are 89 moves, they
would occupy stack[100] ... stack[188]. These are the ply=1 moves.

Now I make one of the ply=1 moves, after that generate all possible (white)
moves for the resulting position, say 62 of them, and store them in stack[189]
... stack[250]. These are the ply=2 moves.

So for each ply=i, I save the moves of that ply right after the moves of
ply=i-1. This way I don't have to reserve 3*200 array elements for 3 plies, when
I've only used 250 elements; and there's no chance of overflow if some position
has 210 possible moves, because the stack is large enough, and some other
positions with moves on the stack will have lesser moves.

If the average number of moves generated per ply during the search is say 100, I
can get over 160 plies deep before the stack overflows! This way you don't have
to worry about maximum numbers of generated moves, just the average number is
important now.

Hope this is clearer? Feel free to ask if this is not what you mean ...

Groetjes,
Paul



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.