Computer Lab Project

Computer Lab Project

Robot Patrol Challenge

Patrol a route until an obstacle appears, then choose a response that does not involve turning forever in a corner.

  • Loops
  • Sensors
  • Conditions
  • State
  • Feedback
  • Autonomy

Project brief

What students build

  • A repeatable patrol
  • An obstacle signal
  • At least one response state
  • A correction and recheck
  • A stop rule
  • A demonstration scenario

What students learn

  • Sense-Decide-Act
  • Feedback loops
  • State
  • Recovery logic
  • Edge-case testing
  • Limits of autonomy

What students need

  • Paper state machine or browser simulation
  • Optional robot platform and teacher-arranged sensors

The patrol can be designed as a state machine or built in a browser simulation. A physical robot and sensors are optional and depend on the class setup.

Computer Lab brief

Choose the patrol route and recovery action. The system must read the obstacle signal again after acting and stop at a defined limit.

Required systems

What must exist.

  • A repeatable patrol
  • An obstacle signal
  • At least one response state
  • A correction and recheck
  • A stop rule
  • A demonstration scenario

Suggested build order

One useful route through the problem.

  1. Define the patrol Choose a short route and what counts as one cycle.
  2. Define the sensor question Choose the reading that will count as evidence of an obstacle.
  3. Create response state Stop, turn, signal, or choose another route.
  4. Recheck after acting Sense again before returning to patrol.
  5. Test traps Try corners, repeated obstacles, and sensor noise.

Checkpoints

  1. 1The normal route repeats reliably.
  2. 2Normal and blocked readings are distinguishable.
  3. 3Obstacle input changes state once.
  4. 4The correction is tested rather than assumed.
  5. 5At least one recovery failure is repaired.

Challenge cards

Choose one, combine compatible cards, or propose an equivalent challenge.

CHALLENGE 1

Add a second recovery route.

CHALLENGE 2

Count patrol cycles.

CHALLENGE 3

Signal for human help after repeated failure.

CHALLENGE 4

Compare two feedback strategies.

Test questions

  • Does patrol repeat from a known state?
  • What exact signal means obstacle?
  • Can recovery loop forever?
  • Does the system recheck?
  • Is there a human stop rule?

Common mistakes

  • Obstacle checks happen outside the patrol loop.
  • Recovery has no exit condition.
  • State is changed in several places.
  • Successful movement is called intelligence without explaining rules.

Extension ideas

  • Add a second recovery route.
  • Count patrol cycles.
  • Signal for human help after repeated failure.
  • Compare two feedback strategies.

Challenge levels

LEVEL 1

Builder

Stop and signal reliably at an obstacle.

LEVEL 2

Inventor

Correct course and rejoin patrol after checking again.

LEVEL 3

Boss Level

Track failed options and request human help at a defined limit.

What to demonstrate

  • Normal patrol
  • Sensor question
  • Decision rule
  • Correction
  • Recheck
  • One stated autonomy limit