Problem to solve
First, let's have a look at the game itself:
Figure 1: The Snake game
Does that look somewhat familiar to you?
I'm pretty convinced that it will; everyone's played Snake at least once in their life.
The game is pretty simple; it consists of a snake and an apple. We control the snake and our aim is to eat as many apples as possible.
Sounds easy? Well, there's a small catch. Every time our snake eats an apple, our snake gets larger by one tile. This means that the game is unbelievably simple at the beginning, but it gets gradually harder, to the point where it becomes a strategic game.
Also, when controlling our snake, we can't hit ourselves, nor the borders of the board. This rather predictably results in us losing.
Now that we understand the problem, we can progress to the first step when creating an AI – building the environment!