Page 1 of 1

Minimax / alpha beta help

PostPosted: 06 Nov 2009, 17:27
by zteve
Hello,

i am stuck at trying to use the scores from the minimax and alpha beta into a move. what is the best way to do this?

I am pretty certain that using a public best_move object is not the way as its a recursive algorithm.

Perhaps a copy of the methdo with more paramters?

Re: Minimax / alpha beta help

PostPosted: 06 Nov 2009, 17:46
by H.G.Muller
Well, you only need the best move in the root. Many people have a different routine for searching the root than for any other node.

Re: Minimax / alpha beta help

PostPosted: 14 Nov 2009, 15:00
by Rohan Padhye
There is also a solution if you are searching your root node just like every other node:

If you are using Transposition Tables that unconditonally save a position in the hashtable with its score and best move after it is searched, then the last position stored in the TT will be the root position (because it can only be saved after the entire search is complete). Therefore, you can be sure that a TT entry will exist with your root node after the search. Therefore you can simply query the transposition table after your search with the root position and find the bestMove.

Note: If your TT replace-policy is not to always replace existing hash entries, then this method may not work because you might not save your root node to the TT at all.