Is minimax relevant at this time and age?

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

Moderator: Andres Valverde

Is minimax relevant at this time and age?

Postby jason_lavigne » 22 Jun 2008, 20:38

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
jason_lavigne
 
Posts: 3
Joined: 22 Jun 2008, 15:58
Location: Canada, ON

Re: Is minimax relevant at this time and age?

Postby H.G.Muller » 22 Jun 2008, 21:48

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

Re: Is minimax relevant at this time and age?

Postby Robert Pope » 23 Jun 2008, 03:49

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.
Robert Pope
 
Posts: 39
Joined: 08 Apr 2006, 17:27

Re: Is minimax relevant at this time and age?

Postby Roman Hartmann » 24 Jun 2008, 14:27

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
User avatar
Roman Hartmann
 
Posts: 155
Joined: 11 Oct 2004, 14:21

Re: Is minimax relevant at this time and age?

Postby jason_lavigne » 24 Jun 2008, 14:55

Hi Roman,

Your idea I like ;) Will definitely implement it.

Thanks,
Jason Lavigne
jason_lavigne
 
Posts: 3
Joined: 22 Jun 2008, 15:58
Location: Canada, ON

Re: Is minimax relevant at this time and age?

Postby H.G.Muller » 24 Jun 2008, 23:42

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


Return to Programming and Technical Discussions

Who is online

Users browsing this forum: No registered users and 36 guests