Use genetic algorithms to improve enemy AI over time in video games

I’ve played my fair share of video games in the past twenty years, and ever since I played for the first time, I was fascinated with how someone could make these games work. More often than not, a special mechanic in a game left me wondering how the programmers could implement a certain feature. However, i often notice patterns in enemy behavior. Therefore, it is way too easy for the player to predict how enemies might react to certain situations. While this might have to do with limited AI design, I recently had the idea to experiment with genetic algorithms to make enemies adopt to the player’s style over time to make it more difficult for the player to achieve his goals. My theory is that this way, enemies will adapt to the player over time, and this, in turn, forces the player to try different strategies to succeed. This article summarizes my experiments and discusses the results and how they could be applied in game development.

Continue reading Use genetic algorithms to improve enemy AI over time in video games

Simple collision avoidance AI in Unity3D

I’m currently working on a small 3D arcade game inspired by classical top down races in Unity3D. The game will feature enemy opponents, which means that they have to have at least some kind of AI. This AI consists of simple collision avoidance algorithm, so that the enemies don’t crash into walls constantly, and a very simple path following algorithm so that the opponents can find their way around the racetrack. I’ve built a quick prototype with simple boxes and a path. Continue reading Simple collision avoidance AI in Unity3D