What is a good fitness function for a zero sum AI game?

I am making an AI for a four-player game with zero sum. This is actually not a zero amount (4 players will “die” when they lose their whole life, so there will be a player who died as the first, second, third and surviving player. However, I tell AI that only survivors are considered a victory, and that is still losing). After some research, I decided to use the minimax algorithm in combination with a heuristic function. I came across this question and decided to do the same as the OP of this question - write an evolutionary algorithm that will give me the best weights.

However, my heuristic function is different from what the OP had on this issue. Mine takes 9 weights and is much slower, so I can’t allow agents to play 1000 games (it takes too much time) or breed them using the crossover method (how can I make a crossover with 9 weights?).

So I decided to come up with my own method for determining suitability and breeding. And this question only concerns the fitness function.

Here are my attempts.

First try

For each agent Ain a randomly generated set of 50 agents, select 3 more agents from the population (with a replacement, but not the same agent as A), and let 4 agents play the game where he Ais the first player. Choose 3 more and play the game, where Ais the second player, etc. For each of these 4 games, if he Adied first, his fitness does not change. If the Asecond died, his fitness increases by 1. If he died the third, his fitness increases by 2. If he survived, his fitness increases by 3. Therefore, I came to the conclusion that the maximum fitness that can be obtained is 12 (survive / win all 4 games → 3 + 3 + 3 + 3).

7 , 10. 10 , 7 , .

, , , , , .

, , , , , .

7 10 , , .

, , , , , , , , - . . , , , , .

EAs ( , ), , .

. , 1 , , , .

200 , 3 , .

, ?

+4
1

, . , - 200+ . :

  • elitism, ().

  • , , (, 5 ~ 10), , . , .

  • . , , , , . . , , - . "" , , ( ).

, . , , , .

+4

Source: https://habr.com/ru/post/1687967/


All Articles