# Effective AI for one player-one ghost pacman

I am thinking of a modified version of pacman. In this version, it will be a two-player game. Each player will have one pacman and one ghost. So there are 2 pacmans and 2 ghosts in the board at a time. No additional ghost is there. A player will control both his pacman and ghost separately- there is no predefined or random move of ghosts. Ghost of a player will try to catch the opponent's pacman. Pacman of a player will try to avoid the ghost of the opponent. Collision of ghost and pacman of the same player won't affect anything. So the pacman and the ghost of the same player need to cooperate with each other. "Moving Target Search" seems promising for the ghost, but what about the pacman? Will minimax (with alpha beta pruning) work in this multi-agent cooperative environment? I am saying this cooperative because my ghost will try to catch the opponent's pacman and my pacman will use this opportunity to eat more food. I have separate functions for the pacman move and the ghost move to simplify the gameplay. So returning a single tuple (including the moves of both pacman and ghost) from a function is not possible here.

You can do Minimax with alpha beta pruning to find the best move. It will provide you an optimal move after exploring the entire tree up to some level (not too deep if the branching factor is too high, here your branching factor is $4*players$) using a handcrafted heuristic by you. So the quality of the results heavily depends on the quality of the heuristic. If you improve the pruning you can achieve better results, as you can explore more.
There is a novel approach, Reinforcement learning, that you can use to find the answer. The idea behind it is approximate the optimal policy that gives you the maximal reward. Here you can understand by policy the action you will make at any position an the rewards are the points you get after each action. You can read more about it here.