Advertisement

MinMax algorithm

Started by October 11, 2005 04:20 PM
1 comment, last by ggambett 19 years, 1 month ago
Hello, I'm trying to make a game with the minmax/alpha-beta algorithm. I've used minmax before in a tic tac toe clone, so I kind-of know how it works. However, the game I'm trying to create now can support up to 4 players. Can the minmax algorithm work with more than 2 players? If so, how?
No, minimax only works for two players. For more players things get much more complicated. You somehow have to assume that each player is going to do what is best for them. I guess you could formulate this by associating several scores to a given position, with each score representing the "expected utility" (something like probability of winning) for each player. What game is it that you are trying to write a program for?
Advertisement
I'm not sure (my area is CG, not AI) but I'd try modifying it to have as many levels per turn as players. Vanilla Minimax has 2 tree levels per turn because it uses two players. For 4 players try 4 levels per turn and treat all the opponent levels as you treat the opponent in vanilla Minimax.

This topic is closed to new replies.

Advertisement