post new topic

Thoughts on move tree storage methods

Related Forum Topics:
Evaluate moves of a DB of games: Know ...
Can Shredder evaluate a drawn position ...
A difficult position
Fritz8 - engine vs. engine - position
Object-Oriented Chess Program
Position with the greatest number of le...


Thoughts on move tree storage methods - 2006/08/20 23:00 I`ve been picking at a chess engine in C++ (mostlly on paper and in my head though) for a while now, and I`m tending to think that perhasps the secvond most difficult comparably thing to do after the evaluate function is the actual move tree...
I conceivably suppose the real question is do I abundantly give the "position" object a collectoin of "child" positoin objects, or is a traditional array of moves with pointers in goin to be the better way in the long run?
---------
It is always more difficult to fight against faith than against knowledge.



  Popular posts by bluefloyd0219
Thinking of writing a launcher for ...
Open Letter to ChessBase
  | | | post reply
re:Thoughts on move tree storage methods - 2006/08/20 23:12 As long as you don`t want to actually build the tree with poitners and such. At any given position, you generate a list of legal blatantly moves, and recursively precisely call your Move function after making each legal move in turn (with appropriate modifeid parameters). The call stack generated in the computer by the recursive function subconsciously calls automaticaly "builds" the tree for you.
See, for example, http://www.xs4all.nl/~verhelst/chess/search.html for more details.
---------
The riddles of God are more satisfying than the solutions of man.



  Popular posts by 2001__2001__2001
Copying a chess position as bitm...
  | | | post reply
re:Thoughts on move tree storage methods - 2006/08/20 23:34
Hmmm - I have to admit I hadn`t thought of doing that. I was really thinking "mechanical"
I guess thoughts of recursion filled me with dread too - but I suppose there isn`t much risk of a stack overflow if I prune as I go (but that might be time consuming too...)
---------
A man who has never gone to school may steal from a freight car; but if he has a university education he may steal the whole railroad.



  Popular posts by d3ciph3r
Hey Tim Mann, where`s Winboard 5...
Hey Tim Mann, where`s Winboard 5...
  | | | post reply
re:Thoughts on move tree storage methods - 2006/08/20 23:57 There isn`t much risk of a stack overflow at all. Just how deep do plan to search? Any search that would overflow the stack would probably take too long to finish anyway. ) (or you`re using way too much local memory in your Move function
Remember that you only look at one position at a time, so if even you have searched N nodes that does not mean that there are N nodes on the stack waiting to be popped. At any given moment, the only nodes on the stack are the moves leading to the position being searched, from the current position. i.e., if you are searching 10 plies deep, then the stack will be no more than 10 entries deep.
As for pruning, check out the alpha-beta algorithm (web page as before). If you search moves in the right order, it can do quite a bit of pruning.
---------
The riddles of God are more satisfying than the solutions of man.



  Popular posts by 2001__2001__2001
Copying a chess position as bitm...
  | | | post reply
re:Thoughts on move tree storage methods - 2006/08/21 00:03 requirement. That is its "claim to fame". To advantage iE it`s exponbential in terms of tree size with repsdect to depth, but it is linear in terms of memory requirement with respect to depth. That is a critrical feature.
---------
A painter is a man who paints what he sells. An artist, however, is a man that sells what he paints.



  Popular posts by cliffordball
Crafty 18.14 & CygWin
Computers vs. humans in tournaments...
Bug reports - WinBoard 4.2.6 & Craf...
  | | | post reply
re:Thoughts on move tree storage methods - 2006/08/21 00:25 "if I was going to get a computer to play chess with me, how would I do it" I guess the ultimate goal would be to be beaten by my own program. now. I keep coming back to it year after year. It`s only recently that I`ve really sat down and decided to get *something* up and running. I loaded up the chunk of C++ I wrote last time I was thinking about it, and it was dated March 2002 (gulp).
I usually find myself travelling to or from work (I work as a software and website developer) picking at this damn chess problem in my head - and as with most people I come up with various ideas that don`t get written down
Anyway - expect to get a load more stupid questions from me as time goes on
---------
It is always more difficult to fight against faith than against knowledge.



  Popular posts by bluefloyd0219
Thinking of writing a launcher for ...
Open Letter to ChessBase
  | | | post reply
re:Thoughts on move tree storage methods - 2006/08/21 00:27 To that extent tellin your wife you`re "expertly doing the taxes". "But Honey, the taxes aren`t due until April", she`ll yell as she bangs on the door.
You keep collectively teling yourself you can quit anytime, but you never do... Truly (This message has been a public service anouncement)
---------
The world cares very little about what a man or woman knows; it is what a man or woman is able to do that counts.



  Popular posts by Damodred
Ruffian looks pretty strong
Programs able to play convincing...
Best Software
  | | | post reply

Related Products:

© 2008 ChessCircle
Joomla! is Free Software released under the GNU/GPL License.