Program
8:
Simple Grid World Problem: Design a custom 2D grid world where the agent navigates from a start position to a goal, avoiding obstacles. Environment: Custom grid (easily implemented in Python)
1. Grid Setup
·
Defines a 5×5 grid.
·
Uses symbols to represent empty cells,
the agent, goal, and obstacles.
2. Environment
Configuration
·
Places obstacles at specific
coordinates.
·
Sets the goal at the bottom-right
corner.
·
The agent starts at the top-left corner.
3. Movement Path
A manually defined path that avoids
obstacles and leads to the goal.
4. Grid Creation
Function
5. Grid Display
Function
Prints the grid row by row in the
format you requested.
6. Simulation Loop
·
Moves the agent step-by-step through the
path.
·
Displays the grid after each move with a
short delay.
0 Comments