Module that implements a simple grid world with obstacles and rewards/reinforcement. Movements are given either as absolute or relative directions in the MOVE input.
In absolute mode set by move = "max", the maximum direction in the MOVE array sets the direction of movement. The four components in the array correspond to north (up), east (right), south (down) and west (left). In absolute mode with summation, set by move = "sum", the movement is the result of adding all directions in the MOVE input before finding the maximum direction.
In relative mode, set by move = "relative", the array MOVE is interpreted as having three components: move-ahead, turn-left, turn-right. With mode = "relative_sum", the components turn-left and turn-right are subtracted before the maximum is found.
No action is performed if MOVE is the zero vector.
The agent is automatically moved to the initial location when a reward location is reached.