Every year, Entelect hosts an AI programming challenge (you can find out more about it here. In 2014, the competition was a two player variant on Pacman. Entrants would each write a program which would control one of the two Pacmen, as they strove to eat the most pills.
Strictly adhering to the game's rules makes it a bit unintuitive, since the rules were designed for humans to write a program to play, not to play themselves. For example, the game is strictly turn based. The yellow player will always go first, and the red player can do nothing until the yellow player has made their move.
The game requires a keyboard or gamepads to play. It will technically load on mobile devices, but you won't be able to control anything.
The source code is available on GitHub
Do you find this website useful? Check out my support page for options on how to buy me a cup of coffee.