Getting ready
In this recipe, we will solve a grid navigation problem. The following image is a pictorial representation of the navigation grid. It represents a navigation matrix, where each state has been assigned a label. Each cell in the matrix represents a state, leading to a total of four states. The agent should navigate from any random starting state to the final goal state, 4. The agent can only move between states through the openings in the grid and cannot move off the grid walls. At each state, the agent can perform any action from the available set of actions; that is, they can move up, down, left, or right. When entering the goal state, the agent earns a reward of 100, and every other additional step costs a penalty of -1.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access