Question: Write a value iteration agent in ValueIterationAgent, which has been partially specified for you in valueIterationAgents.py . Your value iteration agent is an offline planner,

Write a value iteration agent in ValueIterationAgent, which has been partially specified for you in valueIterationAgents.py. Your value iteration agent is an offline planner, not a reinforcement learning agent. So the relevant training option is the number of iterations of value iteration it should run (option-i) in its initial planning phase. ValueIterationAgent takes an MDP on construction and runs value iteration for the specified number of itera tions before the constructor returns. Value iteration computes k-step estimates of the optimal values, Vk. In addition to running value iteration, implement the following methods for ValueIterationAgent using Vk. computeActionFromValues(state): Computes the best action according to the value function given by self.values. computeQValueFromValues(state, action): Returns the Q-value of the (state, action) pair given by the value function given by self.values. These quantities are all displayed in the GUI: values are numbers in squares, Q-values are numbers in square quarters, and policies are arrows out from each square.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!