Genetic algorithm to create amoeba game

  • Thread starter Tusike
  • Start date
  • #1
139
0
Hi!
I created an amoeba game where you can play against the computer. The AI searches for patterns such as "xxxxx", "oxxxxo", (as in 5-in-a-row, and 4 in a row with both sides open), and the rest (a total of 28 patterns) I could think of that lead the way to putting 5 marks in a row. Each pattern has a value, and the AI scores each possible square based on the patterns that meet there.
The problem of course is what should the value of each pattern be?
I tried to create a genetic algorithm to help me get the best values, but I don't think I quite succeeded... What I am doing is having two versions run against each other 2 times, each starting once; and if one wins both, it's the "main" version that get's mutated. Then I repeat.

I'm not sure about my mutations process. Right now I'm just adding random numbers up to 100 to certain pattern values. I also tried having random values get multiplied by a random number from 0.5 to 1.5.

Any suggestions on how to implement the genetic algorithm or how to make this work would be very much appreciated:)

-Tusike

PS: the program is written in freebasic: http://www.mediafire.com/?mpk4vsxyekby7g6" [Broken]
"Amoeba" folder contains a playable version, while "genetic amoeba" folder is the one that searches for the best combination of pattern values. In both folder "amoeba.bas" is the main file.
 
Last edited by a moderator:

Answers and Replies

Related Threads on Genetic algorithm to create amoeba game

  • Last Post
Replies
6
Views
698
Replies
3
Views
597
  • Last Post
Replies
3
Views
7K
Replies
2
Views
197
Replies
7
Views
1K
Replies
6
Views
9K
Replies
8
Views
964
Replies
3
Views
785
Replies
4
Views
3K
Replies
4
Views
3K
Top