Base Mission
1 point Live judgedA robot enters the zone adjacent to the left starting box and comes to a clear and complete stop while .
Unit 1 · Big Idea 1
Student Lab · The Waypoint Navigator
Student PIN:
In this activity you will write, run, and debug a program that navigates a robot to a specific location on the Foundations field and stops. That sounds simple — and the goal is simple — but the path from idea to working program will reveal something important.
Core Insight
A robot does exactly what you tell it to do — no more, no less.
If the robot does the wrong thing, the instructions are wrong. Your job is to find out why.
These are built-in commands the robot already understands. You will use them inside your program. You don’t have to write them — they come with the .
| Command | What it does |
|---|---|
motor(port, power) | Turns the motor on the given at a power level from −100 to 100. Example: motor(0, 100) runs motor 0 forward at full power. |
msleep(ms) | Pauses the program for the given number of milliseconds (1000 ms = 1 second). The robot keeps doing whatever it was last told to do during the pause. |
ao() | “All off.” Turns every motor port off at once. Use it to make the robot stop. |
alloff() | Turns all motors off — the same idea as ao(). Either one brings the robot to a complete stop. |
Before you program a robot, it helps to feel what it is like to be one. A robot follows every instruction exactly as written. It cannot guess what you meant. It does only what you said — even when that is obviously not what you wanted.
Your Task
1. In the boxes below, write step-by-step instructions for making a peanut butter sandwich.
2. When you are done, read your instructions back out loud — and imagine following them as literally as possible.
3. Every time an instruction is unclear or could go wrong, mark it.
My sandwich instructions (write them first):
Reading them back literally, what would go wrong?
Why would the robot do something you did not intend? What does that tell you about instructions?
An algorithm is a precise, ordered sequence of instructions that tells a system exactly what to do. Every program you write is an algorithm. Every robot runs an algorithm.
Every algorithm takes inputs (information it needs) and produces outputs (the result). For a robot navigation program:
| Inputs | Motor speed · time to run · starting position of the robot |
| Outputs | Robot position on the field · whether the mission scored |
In your own words: what is the difference between an algorithm and just a list of ideas?
Mission 1
A robot enters the zone adjacent to the left starting box and comes to a clear and complete stop while .
The same robot that completed the Base Mission subsequently returns a starting box and comes to a clear and complete stop.
Before writing code, you need to know where things are. Measure or estimate these values on the real field and record them here.
| Measurement | Your Estimate | Unit |
|---|---|---|
| Distance from starting box edge to Waypoint Alpha zone | ||
| Width of the Waypoint Alpha zone (front to back) | ||
| Distance from Waypoint Alpha zone back to starting box | ||
| Motor speed we plan to use |
Write your plan as a numbered list. Do not write code yet. Be specific enough that someone who has not seen the field could follow your instructions.
Phase A: Travel to Waypoint Alpha
Phase B: Stop in the zone
Phase C: Return to starting box (Bonus Mission)
Before you run anything: what do you predict will go wrong on the first try, and why?
Type this program into your robot controller exactly as shown. Each line has a (after the //) that explains what it does. The comments are notes for you — the robot ignores them.
// Unit 1, Big Idea 1: Waypoint Navigator
// Name: _______________________ Date: ___________
#include <kipr/wombat.h>
int main()
{
motor(0,100); //this turns one of the motors on
motor(3,100); //this turns the other motor on
msleep(1000); // hold still so the stop is visible
ao(); // turns the motors off after the msleep has completed
// Add your Bonus Mission call here when ready.
return 0;
}Debugging is not guessing. It is a structured process of observation, hypothesis, and testing. Every time something goes wrong, use this process instead of randomly changing numbers.
Complete one row for every run. Never skip a row — even failed runs contain information.
| Trial | What you changed | Reached zone? | Stopped in zone? | Returned to box? | What you observed |
|---|---|---|---|---|---|
| 1 | |||||
| 2 | |||||
| 3 | |||||
| 4 | |||||
| 5 | |||||
| 6 |
Describe one specific bug you found. What was the symptom? What was the cause? How did you fix it?
Big Idea 1 --- AI Literacy Thread
Intelligent systems require instructions before they can act.
Your robot did not decide to navigate to Waypoint Alpha. It followed the instructions you wrote. Every intelligent system — from a robot to a to a self-driving car — begins with someone writing instructions that tell the system what to do and how to do it. The quality of the system depends directly on the quality of those instructions.
Read each scenario below. Think it through, then write a short answer.
A navigation app tells you to turn right — into a wall. Who wrote the instructions that caused this? What probably went wrong?
A spam filter marks an important email as junk. What does this tell you about the instructions the filter was given?
In both cases above — and in your robot runs today — who is responsible for fixing the instructions? What does that mean for how we should think about AI systems?
Complete this section on your own.
1. What is an algorithm? Write a definition in your own words — do not use the word “instructions.”
2. What was the most important in your program today? How did changing it affect the robot’s behavior?
3. Precision matters in algorithms. Give one example from today where being imprecise caused a problem, and explain how you fixed it.
4. Complete this in 2–3 sentences: “Intelligent systems require instructions before they can act. This means that when an AI system makes a mistake…”
Finished early? Try one or more of these.
When you are finished, press the button to turn in your work and save a copy.
KIPR · Botball Explorer · Unit 1 Big Idea 1 — Student Lab