Question: Description In this assignment, you will develop an Al agent trained to play a simple Grid World game using Q - Learning following epsi -
Description
In this assignment, you will develop an Al agent trained to play a simple Grid World game using QLearning following epsigreedy policy.
The environment consists of a grid where the agent can move up down, left, or right, and the goal is to reach a specific position on the grid. Both the
starting position and the goal position will be determined based on your student ID number. which is
Upon training through your developed code, the agent should be able to find the optimal path shortest path, ie least number of moves from the start to
the goal.
Specifications
Grid World
The grid will be a GRIDSIZE x GRIDSIZE square matrix. For example GRIDSIZE could be etc. Your code should be able to work for any finite integer value of GRIDSIZE.
States:
Each state represents a position in the Grid World. So total number of states GRIDSIZE GRIDSIZE The figure below assgxgrid.jpg shows an example x Grid World. Each position in the grid can be referred to by the row and column index i and j respectively Each position in the grid has a corresponding state index S The example figure below shows how to convert position ij to S and vice versa.
Actions:
Allowed actions: UpDown Left, Right. The agent can move either up down, left or right from each state not allowed to go outside the boundary Follow greedy policy during Qlearning training
Rewards:
Moving into the goal state gives a reward of Any other move gives a reward of Moving outside the grid is not allowed.
Parameters these are defined in Section
STUDENTID: Enter your student id GRIDSIZE: Set to as default, but your QLearning code should be able to work for any finite integer value of GRIDSIZE EPISODES: Choose an appropriate number such that your agent can find the optimal path and that the QTable converges Learning rate : alpha Discount factor : gamma Exploration rate : epsilon
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
