In games AI Programming, behaviour trees are a popular AI technique that is used in many video games. It is a mathematical model that contains a collection of simple tasks that are all executed together to perform an advanced task. It has become popular amongst a lot of video game developers as it is easy to understand and is effective. The snake AI I created uses this behaviour trees to play the game without any user input. It will try to get the food with as few ticks (movements) as possible, using the intelligence from the behaviour tree.
Below, is an example of the snake AI running in Unity.