Minimax / alpha beta help

Programming Topics (Computer Chess) and technical aspects as test techniques, book building, program tuning etc

Moderator: Andres Valverde

Minimax / alpha beta help

Postby zteve » 06 Nov 2009, 17:27

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?
zteve
 
Posts: 10
Joined: 09 Oct 2009, 16:28

Re: Minimax / alpha beta help

Postby H.G.Muller » 06 Nov 2009, 17:46

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.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Minimax / alpha beta help

Postby Rohan Padhye » 14 Nov 2009, 15:00

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.
My attempt at a Java chess engine: Frittle (Winboard compatible)
Rohan Padhye
 
Posts: 26
Joined: 27 Apr 2009, 16:46
Location: Mumbai, India


Return to Programming and Technical Discussions

Who is online

Users browsing this forum: No registered users and 11 guests