In this example, policy iteration would find the optimal policy after just one iteration. Jack's Car Rental . Jack manages two locations for a nationwide car rental company. Each day, some number of customers arrive at each location to rent cars. If he is out of cars at that location, then the business is lost.
Cars become available for renting the day after they are returned.
We assume that the number of cars requested and returned at each location are poisson random variables, meaning that the probability that the number is n is , where is the expected number. We take the discount rate to be and formulate this as a continual finite MDP, where the time steps are days, the state is the number of cars at each location at the end of the day, and the actions are the net number of cars moved between the two locations overnight. The sequence of policies found by policy iteration on Jack's car rental problem, and the final state-value function. Each successive policy is a strict improvement over the previous policy, and the last policy is optimal. Write a program for policy iteration and re-solve Jack's car rental problem with the following changes.