The answersDownload the PDF
Worksheet

U12.1 Learning a behaviour

Learning, and the capstone · University · about 30 min

BugBotLab
NameClassDate

What this lesson is about

What learning buys over a hand-written rule, what it costs, and the smallest honest example.

Questions 7 marks in all

  1. [1 mark]Which three things must be present for there to be anything to learn?

    Tick every answer that is true.

    1. AA family of candidate answers, the hypothesis class
    2. BA score: a loss to make small or a reward to make large
    3. CA search that finds a good candidate
    4. DA neural network
    5. EThousands of labelled examples
  2. [1 mark]The data sheet says 20 cm/s at command 100. The robot drives at command 60 for 4 s and travels 44.2 cm. What does this print?

    nominal = 20.0 * 60 / 100.0 * 4.0
    measured = 44.2
    print(nominal, measured, round(measured / nominal, 3))
  3. [1 mark]What is the name for the family of candidate answers a learner chooses between, such as all straight lines with a slope and an intercept?

  4. [1 mark]A robot tries lateral offsets on short trials and keeps whichever scores best. Which setting is this?

    1. APolicy search: the data is trials and their scores
    2. BSupervised learning: the data is inputs with the right answers attached
    3. CSystem identification: the data is commands and what the robot did
    4. DNone, because no model is fitted
  5. [1 mark]Which of these is a poor use of learning?

    1. ALearning the inverse kinematics from data when the geometry gives them exactly
    2. BMeasuring this robot's actual speed per unit of command
    3. CRefitting the drive model after changing to a new mat
    4. DLearning what 64 depth readings mean about which way is passable
  6. [1 mark]In this module position() is available. What is the rule for using it?

    1. AThe truth may inform the score, never the policy
    2. BIt may be used anywhere, because it is the lab's measuring rig
    3. CIt may be used by the policy but not by the score
    4. DIt must not be used at all
  7. [1 mark]The single gain from one 4 s run predicts the robot's travel better than the data sheet. What is still missing?

    1. AAny idea of how much to trust it: one run gives no spread
    2. BA loss function
    3. CA hypothesis class
    4. DA search

The task: the data sheet is not your robot

Print nominal: the travel the data sheet predicts at command 60 for 4 seconds, measured: what this robot actually did, and gain: the ratio.

from bugbot import *
connect()

CMD = 60
SECONDS = 4.0
V_MAX = 20.0

Plan your program here, then type it in and press Run.

QR code
Do it on the robot
www.bugbotlab.com/learn/u12-1-learning-a-behaviour/
The simulator checks it and tells you when it passes. Nothing to install, no account.

Challenges

  1. Repeat the measurement five times and report the mean and the spread. How many runs before the mean stops moving?
  2. Measure the gain at command 30 as well as at 60. Is it the same number?
  3. Name one thing about this robot that a gain cannot capture, however carefully you measure it.