Author: Andrei Fortuna
Date: 03:21:18 06/16/03
Go up one level in this thread
>>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.
>>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.
>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 ?
Many, Many Cheers,
Andrei
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.