This is regarding the CarRental.py for Chapter 04. I'm curious under the expectedReturn function, under line 115 and 116 for variables realRentalFirst/SecondLoc, why would you require the valid rental requests to be less than the actual # of cars?
Wouldn't you want to maximize your returns by actually renting out the maximum number of cars? When I changed lines 115 and 116 to the following:
Hi ShangtongZhang,
This is regarding the CarRental.py for Chapter 04. I'm curious under the expectedReturn function, under line 115 and 116 for variables realRentalFirst/SecondLoc, why would you require the valid rental requests to be less than the actual # of cars?
Wouldn't you want to maximize your returns by actually renting out the maximum number of cars? When I changed lines 115 and 116 to the following:
I actually get higher expected returns in the range of 1650-1750, instead of expected returns at 550-650. Let me know if this makes sense to you.
Regards, Yi Xiang chongyixiang@gmail.com