After much faffing about with trigonometry and such, I realised I didn’t need the mouse to have any senses, since it can detect walls perfectly well by running into them. Then I spent way too much time figuring out how to stop the mouse running straight through the walls of the maze. Finally, I’ve got a basic mouse which is confined by the maze but can move around. Mostly, it fails to go anywhere.

The next stage is to start giving the mouse more interesting behaviour by giving it a memory, which will allow it to respond more intelligently to hitting a wall.