How to create an AI snake for a video game? I am creating a snake game in Unity and I would like to implement AI snakes that wander around the globe while avoiding collision with the other snakes on the globe, and if possible I would also like to make the AI snakes purposefully trap other snakes so that the other snakes would collide and die. 

 

The AI snakes must meet the following requirements:  


They must move in a certain way. A snake is controlled by a user using the arrow keys on a keyboard, therefor I would also like the AI snakes to move using this form of input.
The AI snakes must move on a sphere


As I know, creating Artificial Intelligence is not an easy task and I would like to know if there are some open source projects that I can use for accomplishing this task.
A relatively simple option which uses AI techniques that are 'traditional' for adversarial games (and which is therefore less of a 'research project' than the use of Machine Learning) is Minimax.

The ingredients for this are:


A list of all the actions that a snake can immediately perform from its current position.
A measure of quality (a.k.a. 'fitness') for the resulting world state.


Traditionally specified for two opponents, the minimax algorithm looks a specified number of moves ahead (alternating between opponents at each turn) and attempts to find the world state that maximizes the quality measure for one opponent whilst minimizing it for the other.

An extension of the two-player algorithm to n opponents (as seemingly required by the OP) is given in this paper.