Using genetic algorithms to 'train' my AI

Started by
3 comments, last by Netherlords 10 years, 7 months ago

Hi,

My name is Peter Norberg and I've previously written about my game AI in this thread: AI in a turn based strategy game. It's been a while since my last update and due to this I had to start a new thread. But there's been a lot done on the AI and it's now quite developed and able to do most of the needed actions as well as simple diplomacy.

Now I've just started to see if I can 'train' the AI by using genetic algorithms. I'm not sure if this will be a success or not. At my blog, Words from the Netherlords, I've described how I intend to do it and my intention is to write down my conclusions when I'm finished with it, good or bad...

Rising Empires uses an utility-based AI which depending on the sitiuation and its free resources can make multiple decisions each turn.

All thoughts on the subject are welcome!

Advertisement

The first results and comments on my trials have now been added to the blog. I've tried to improve the Human and Greenskin races and at least the Greenskins show some promising improvements.? I intend to fine tune my algorithms a bit (I hope I remember to add the code in my next update) and try two of the other races as well.

This is very fun! biggrin.png

Interesting project; I like GAs. I didn't see it mentioned in your blog, but are you using elitism? That is, letting your best performer(s) through to the next generation unaltered? It's a good way to ensure you don't lose your best candiates to a bad crossover.

Yes, I let the winner from each generation pass to the next generation unaltered. Sometimes I see a 'freak' AI win a single game and in the next generation the winner looks more normal again. I'll soon publish the next part, it's written but I must proofread the text before I publish it.

I've completed the third part of my tests to see if I can improve my AI with the help of genetic algorithms. If you're interested it can (as usual) be found at my blog. Training the Elf and Ende races didn't give as good results as did the Greenskins...

This topic is closed to new replies.

Advertisement