Author: Uri Blass
Date: 04:08:44 06/16/03
Go up one level in this thread
On June 16, 2003 at 06:21:18, Andrei Fortuna wrote:
>>>Ok, but in this case how can you know in makemove/unmakemove:
>>> * the node_id of the parent node (this is needed when you write the node)
>>
>>The external program can calculate the node id.
>>
>>In the beginning I give a position and it is the parent node of the tree that is
>>going to be generated.
>>
>>After it if I call analyze I have a list of make and unmake moves
>>
>>For example in the opening position I may have something like:
>>make a2a3 undo make a2a4 undo make b2b3 undo...make Nh3 undo
>>make e2e4 make a7a6 undo make a7a5 undo.
>>
>>It is easy to understand what is the position at every step based on this
>>information.
>
>Ok, I agree on this.
>
>>> * the returned score for the node
>>
>>I think that for this information it is possible to call the external program
>>from the evalute function.
>
>Wait ! The score from the evaluation function gets propagated to previous nodes,
>where score is compared with node's alpha and beta values etc, I don't see how
>it's possible to set a node score if I just use the evaluation function to set
>the score. True, I could simulate the alpha-beta process for the written tree
>i.e. you just return a value only when eval is reached, but this would mean that
>I assume that most chess programs behave this way. I am not sure this is true.
Programs may use lazy evaluation before they return beta but this information
can be also given to the external program from the evaluate function.
I agree that in this case the program may need to call the external program more
than once from evaluate.
In my program I calculate the evaluation at every node and in the leaves I may
calculate only part of the evaluation.
>
>>>What if you use makemove/unmake move for something else than calling Search or
>>>QSearch ?
>>
>>I do not see a reason to make move if I do not plan to call search or qsearch
>>after it.
>
>I am not sure about this but I think I had at some moment another use for
>make/unmake. I could be wrong though.
A possible reason I can see not to call search after make move is if you are not
inside the search process(for example when you are in book or when you are in
edit mode without analyze).
Another reason may be to do some selective search in the evaluation but I think
that in this case the moves that you make are part of the tree.
>
>>There are cases when I decide based on evaluation after the move not to do
>>it(for example if I discover based on evaluation that the position is checkmate)
>>but I still see the move as part of the tree.
>
>I think we have some ideas going ! What I see as a problem is that you have
>complete node informations only after you visit the child nodes.
>
>It just occured to me that I can eliminate transmitting the parent_id parameter
>! The code will look like this :
>
> Search(...){
>
> int node_id = CHANT_MarkNode(...)
>
> ....
>
> ... before _every_ return point add this code ....
> CHANT_WriteNode(node_id, ..., extra node info);
> }
>
>i.e. it will write all informations without parent_id, then when we are all done
>I will write code that automagically walks the tree generated until now and
>fills in parent_id for nodes. A bit more CPU load but when you dump the tree you
>are using the harddisk so speed is not essential. And this way you will have
>much simpler code !
>
>What do you think, is this solution satisfactory ?
I think that it may be a good idea.
I prefer this idea and not adding another parameter to the functions.
Uri
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.