We're sorry, but you must have Javascript enabled in your browser to access this exercise.

Learning Robot

The aim here is for the robot to learn how to move round its environment avoiding walls.

The robot has four built in instincts: go forward, turn right, turn left or go back. There is a probability of choosing a particular action: initially all are equally possible. The robot decides which of four states it is in, and then chooses one of four actions. If a chosen action is good, its probability is increased, otherwise it is decreased. The figures show the probabilities of choosing each action in each state.

Click on the screen to reposition robot - if it gets stuck.

Keyboard controls

Press I, J, K or M to move robot up, left, right or down.

Press A N L R B to reset probabilities for All, No Wall, Wall on Left, etc.

Press S to start/stop; E to toggle environment and U for toggle if use Both situation

When No Wall is seen :

When Wall on Left only:

When Wall on Right only :

When Wall near Both sensors :

Reset Probabilities

FF FB BF BB Probabilities

Simple Environment

Use 'Both' state