Solve (1) with the difference that the agent can take any of the 16 possible moves as indicated in Figure 1 .
The preference order of actions is clockwise from East. Please note that the moves as noted in Figure 2 should be taken as illegal.
Some more examples of moves which are not allowed. Greens are the sources/goals and black is the obstacle