Learning, and the capstone · University · about 35 min
The optimiser answers the question you asked, which is rarely the question you meant.
[1 mark]The reward is distance travelled towards a mark 60 cm ahead. What is it actually rewarding?
[1 mark]Four commands were each driven for 4 s from the same line. What does this print?
MARK = 60.0
travel = {55: 49.5, 70: 63.8, 85: 79.2, 100: 93.6}
by_progress = max(travel, key=lambda c: travel[c])
by_error = min(travel, key=lambda c: abs(travel[c] - MARK))
print(by_progress, by_error)[1 mark]What is the name for a policy scoring well on its reward while the behaviour is not what was wanted?
[1 mark]A robot is rewarded for a small depth reading, meant to encourage parking close to its charger. What is the likely result?
[1 mark]Which form of shaping reward is guaranteed not to change the optimal policy?
[1 mark]Why does a sparse reward of 1 for arriving and 0 otherwise teach almost nothing, even though it specifies the task perfectly?
[1 mark]A search's best score has risen steadily for fifty trials. What should you do before believing it?
Try commands 55, 70, 85 and 100 for four seconds each from the same line, homing between trials. Print by progress:, the command that travelled furthest, and by error:, the command that finished nearest the mark 60 cm ahead. Then run the one the error score chose, and stop there.
from bugbot import * connect() DT = 0.1 MARK = 60.0 RUN_S = 4.0 COMMANDS = [55, 70, 85, 100]
Plan your program here, then type it in and press Run.