3 ms·
At the university I got into AI, NN, evolutionary algorithms. I wanted to develop the skill using these so as a laboratory work I choose building a Robocode bot
by pezo1919 4y ago
At the university I got into AI, NN, evolutionary algorithms. I wanted to develop the skill using these so as a laboratory work I choose building a Robocode bot. The idea was to learn how to evolve it rather hardcoding. This video was quite an inspiration: https://youtu.be/Hp6bhARBGc4 https://youtu.be/Hp6bhARBGc4
I used a Java GA lib called Watchmaker and trained my bot against built-in bots AND against a world no.1 bot of previous years.
At that time I could barely code cleanly and I was mostly fighting the frameworks so there was a point where evolution in 3 dimensions (acceleration, bodyTurn, turretTurn) were implemented, but maybe one of the most important one, shooting was not.
I run out of time, next day I had to give a presentation so I just gave it a go. Surprisingly the bot evolved to a point (in minutes) where it beat the ex world champ bot. First its performance went above 50% which was a shock, but later it got to 60%+ sometimes even 80%. But how? How to beat without a single shot?
Turns out evolution and random can find you things which are so anti intuitive you could basically never come up with. ( I had a sense of that, that’s why I choose that domain ;D )
What I have seen is that my bot evolved a really simple but weird technique to dodge the champs bullets: it found some kind of frequency and on that frequency it has just… acceleration up and down (negative velocity) and HIT THE WALL AGAIN AND AGAIN. Wat?
The champ bot’s prediction was just too good but not prepared for such a stupid enemy like my bot and it was basically impossible to predict that my bot will slow down for V to 0 in 0 sec so champ was almsot constantly shooting ahead or behind my bot, shooting the wall instead my bot. If the wall wasn’t there, it would hit almost 100%.
Shooting requires energy and after a given time both bots lose energy at the same rate. My bot could win just by “backing out” and not being hit too often, wasting the enemies energy.
Since that experience I could not care less about NN (except neuroevolution), evolutionary algorithms ftw! :D
(I hope no one will create the AI killing us all thanks to my comment. :D )
- remram 4y agoNN and evolutionary are not antithetical. There are many ways to update a neural network. Maybe you mean "gradient descent" vs "genetic"?