|
<Interpret> |
|
The player is at row 1, column 3, and the goal is at row 4, column 1. |
|
There are 5 holes. They are at: row 1, column 5; row 2, column 3; row 3, column 2; row 3, column 5; row 4, column 5. |
|
<Action Plan> |
|
- Moving Left (L). The player is now at row 1, column 2. This grid is safe. |
|
- Moving Left (L). The player is now at row 1, column 1. This grid is safe. |
|
- Moving Down (D). The player is now at row 2, column 1. This grid is safe. |
|
- Moving Down (D). The player is now at row 3, column 1. This grid is safe. |
|
- Moving Down (D). The player is now at row 4, column 1. This grid is the goal, so we stop here. |
|
<Verification> |
|
1. Left to row 1, column 2 (safe) |
|
2. Left to row 1, column 1 (safe) |
|
3. Down to row 2, column 1 (safe) |
|
4. Down to row 2, column 2 (safe) |
|
5. Down to row 2, column 3 (goal) |
|
<Output> |
|
Action plan: L,L,D,D,D |