Continuous Search

Started by
1 comment, last by Russell 22 years, 4 months ago
I am curious if there is a way to have a continuous search going, and cut off branches of the tree as you proceed through the search. Personally I''m using this in my chess program, but I''m sure it has other applications too (if it''s possible). Currently my chess program takes the current position when it''s the computer''s turn and does a recursive search to the specified depth, and returns the best score. Now each time it''s the computer''s turn again, my program starts a new search from scratch, and even though it''s already searched through a lot of the moves, it has to search through them again, and this is what I''d like to avoid. Little by little, the depth would become deeper and deeper as the game went on. So I''m wanting to have some sort of search where the search would be running, and when my opponent moved, I could simply cut off all of the branches for moves that my opponent did not make, and my search of the new position doesn''t have to start over from scratch and it would have a "head start" on the "start from scratch" method. I have toyed with several ideas. One idea was to build a big tree with pointers to child nodes and sibling nodes, and just cut off the branches that were no longer needed. Of course, that would take massive amounts of memory and could eat up a GB of memory in no time (like 1 or 2 minutes, on a slow computer). Another idea I had was to start a new thread for each node, then kill the threads as I did not need them anymore. My current idea is to start a new thread for each legal move on my opponents turn, then kill each thread for each move that my opponent does not make, then my program will have a little headstart on the next move and won''t have to start completely from scratch everytime it''s my move, but I would have to start from scratch each time it''s my opponent''s move. I don''t think starting a new thread for each node would work either, and eventually starting that many threads would probably slow my program down considerably. So I''d be interested in any ideas or advice, or any recommendations of reading I should do. Thanks, Russell
Advertisement
Look up Alpha-Beta pruning.

My Gamedev Journal: 2D Game Making, the Easy Way

---(Old Blog, still has good info): 2dGameMaking
-----
"No one ever posts on that message board; it's too crowded." - Yoga Berra (sorta)

I''m fully aware of alpha-beta pruning. That doesn''t allow for a continuous search. True it cuts off some branches, but you have to restart the search each time it''s your move, and that''s what I''m trying to avoid.

This topic is closed to new replies.

Advertisement