Page 1 of 1
Is minimax relevant at this time and age?
Posted:
22 Jun 2008, 20:38
by jason_lavigne
Hi all,
I was wondering whether it would be beneficial to a beginner in the field of chess programming to implement the minimax algorithm first, and other more advanced searches later on, as I develop full understanding of how a computer should best search.
I am writing my own engine, and am almost done with move generation. So this is a recent question that came up.
Thanks,
Jason Lavigne
Re: Is minimax relevant at this time and age?
Posted:
22 Jun 2008, 21:48
by H.G.Muller
In a sense it is, as perft can be seen as a minimax tree. Except that you don't have to keep track of a score at all. But you want to build the full tree, without any prunins, first, just counting the number of leave nodes. This in order to test your move generator, and the logic of your search recursion.
As soon as you start to keep track of scores, switch to alpha-beta.
Re: Is minimax relevant at this time and age?
Posted:
23 Jun 2008, 03:49
by Robert Pope
Yep - create a minimax perft function that counts the number of nodes visited for testing. And a setboard command to set up different positions to validate your perft function. Then switch to alphabeta when you are ready for real search.
Re: Is minimax relevant at this time and age?
Posted:
24 Jun 2008, 14:27
by Roman Hartmann
Hi,
you could write minimax in negamax fashion and then add the beta-cutoffs later or just outcomment the part with the beta-cutoffs. You could even add a switch to enable/disable the beta-cutoffs and see the difference it makes.
best regards
Roman
Re: Is minimax relevant at this time and age?
Posted:
24 Jun 2008, 14:55
by jason_lavigne
Hi Roman,
Your idea I like
Will definitely implement it.
Thanks,
Jason Lavigne
Re: Is minimax relevant at this time and age?
Posted:
24 Jun 2008, 23:42
by H.G.Muller
Roman Hartmann wrote:Hi,
you could write minimax in negamax fashion and then add the beta-cutoffs later or just outcomment the part with the beta-cutoffs. You could even add a switch to enable/disable the beta-cutoffs and see the difference it makes.
best regards
Roman
This is exactly how I did it when developing Joker; first disable the cutoffs to see if you still produce the correct perft counts, and then enable them to get an efficient search. I did it by
- Code: Select all
#define CUTOFFS ,0
if(alpha >= betal CUTOFFS) goto cutoff;
by defining CUTOFFS as an empty string, you enable the cutoffs.