This is a simple partialy observable Markov decision process implementation to search in a flat grid world.
It receives direction commands and tries to infere probabilities commander aiming at each particular target on the grid. This could be used in shared control strategies when computer should guess what user whants from it with less input possible.
The practical usage example is done with the Snake game.