Computer Chess Club Archives


Search

Terms

Messages

Subject: Search tree vs. recursion

Author: Russell Reagan

Date: 22:58:05 11/26/01


I'm trying to decide between constructing a tree with the root node being the
current position, and it's children being the positions that result from legal
moves, and their children being the same, etc. But this seems like it would take
a large amount of memory to store all of this information.

Here's my thinking...

On an engine that searched 1 million positions per second, you could store only
the moves that get you from position to position in your tree, and let's say for
the sake of discussion that you stored the move in 1 byte. So for a 60 second
search, that's 60 million bytes that you now have to store. So your program
would have to have approximately 60 MB of memory for every minute the program
searched.

Obviously this is far less memory than a recursive search would do, because it
doesn't save each and every node of it's search.

Am I thinking about this correctly? The search tree method would take a ton more
memory than the recursive method, correct?

Any other advantages or drawbacks to either method?

Thanks,
Russell



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.