Robot Soccer Lab teaching notes
For computer science, math and physical science teachers, grades 6 to 12. Students program a soccer robot in Blocks or Python, from the first idea that fails (drive at the ball) to two robots that play a match under a referee.
Using this with a class? Make a free class and add your students yourself: each gets a username and password, with no email or Google account needed. Or give them one join code. Using Google Classroom? Post the link there; with a free class, the link also puts each student in your class, so you see their work. mytekDev is also available from the Google Workspace Marketplace, so your school's Google admin can install it for everyone.A first lesson: Open it on the projector at Level 1 and press play. The robot turns until the ball is straight ahead and drives at it, and pushes the ball into its own goal. Ask the class why: it was behind the ball's wrong side, and driving straight at a ball pushes it away from you. Then open card one, put its blocks in, and press play again. The robot slides round the ball first and scores in the blue goal.
Set up a free class Share to Google Classroom- About these notes
- A first period
- The thirteen levels
- What students get wrong, and where the app answers it
- What the app simplifies, on purpose
- The team paper students hand in
- Setting it up for a class
- Standards
About these notes
Robot Soccer Lab is one soccer field in a hall, built to the measurements of student robot soccer: 158 by 219 cm inside the white lines, black walls round it, a yellow goal at one end and a blue goal at the other, a penalty area in front of each and five neutral spots. The ball is small, orange and glows in infrared, so the robots can find it. The rules are modeled on the RoboCupJunior Soccer rules; the app is not affiliated with or endorsed by the RoboCup Federation.
The robot is round, 22 cm across, on three or four omni wheels that let it slide in any direction without turning. It senses the ball with a ring of infrared receivers, which the program reads as a clock position (12 straight ahead) or as an angle and a strength. It also has a compass, line sensors that see the white line, distance sensors that measure to the walls, a kicker and, if the student adds one, a dribbler. The student programs it in Blocks or Python, and a referee watches every play and calls what the rules call.
Everything runs on the student's own computer with arithmetic that comes out the same on every computer, so a program and a seed play the same match in any browser. Nothing a student writes is sent anywhere, except to save the project.
A first period
Levels 1 to 3 fit a 45 minute period. Each level's box on the field says what to do and why a run passed or failed, and Levels 1 to 3 each have a card that shows a working idea in blocks.
- The own goal (5 minutes) Open Level 1 on the projector and ask the class where the ball will go. Press play: the starter robot turns until the ball is at 12 o'clock, drives at it and pushes it into its own goal. Ask why. From the ball's wrong side, driving straight at it pushes it the wrong way.
- The ring and the clock (5 minutes) Turn on Robot, Show the receivers' rays. Each red line is one receiver's reading, longest toward the ball. The program gets the strongest direction as a clock: 12 ahead, 3 to the right, 6 behind.
- Card one (10 minutes) Students open card one and press Show me the blocks. For a ball at clock 1 to 6 the robot moves at the clock times 30, plus 60; for 7 to 11, minus 60. It slides round the ball until the ball is at 12, then pushes it ahead, and scores in the blue goal.
- Chase it (10 minutes) Level 2: touch the ball three times without turning. One move at angle block, its angle the clock times 30, and stop when the clock reads 0 (the ball is not seen).
- Face the goal (15 minutes) Level 3: score while facing the blue goal. The compass reads 0 facing it. Turn left while the heading is over 20 and up to 180, right while it is over 180 and under 340, and move toward the ball at the same time. The buffer from 340 to 20 stops it twitching.
The thirteen levels
All thirteen are open from the start. Levels 1 to 6 suit middle school in Blocks; Levels 7 to 13 suit high school, in Blocks or Python. A level that needs a part (line sensors, a kicker, distance sensors, a dribbler) says so, and the part goes on in Robot, Configurator.
| Level | The goal | What it shows |
|---|---|---|
| 1. Find the ball | Score in the blue goal. | Driving straight at the ball scores an own goal; moving round it first scores. |
| 2. Chase it | Touch the ball three times without turning. | Omni wheels slide in any direction: the clock times 30 is the ball's angle. |
| 3. Face the goal | Score while facing the blue goal. | The compass, and a buffer so the robot does not twitch. |
| 4. Get behind it | Score three times, from three spots, with no own goals. | An offset that grows with the ball's angle gets behind it from anywhere. |
| 5. Stay in bounds | Get close to three balls just over the line without going out. | Line sensors, and backing away from the line the way it came. |
| 6. Kick | Score with a kick from your own half. | A kicker charges, and must pass the rules' power test. |
| 7. Read the ring | Stop 5 to 20 cm from three balls without touching them. | The ring's strength grows as the ball gets closer. |
| 8. The goalie | Save four of five shots without going wholly into the penalty area. | Distance sensors keep the goalie in front of its goal. |
| 9. Two robots | Score twice and always keep one home. | One program on two robots: robot.number() picks the striker and the goalie. |
| 10. The referee | Clear the ball out of your end with no call against your team. | Multiple defense: both robots in a penalty area is a call. |
| 11. The dribbler | Turn round with the ball, then score in the blue goal. | A dribbler holds the ball only while the robot turns slowly. |
| 12. Head-on | Drive straight into the ball three times: two speeds, then the big ball. | Momentum, added up for robot and ball, is the same before and after. |
| 13. The match | Win two halves of 2 minutes against a built-in team. | Everything at once, with the full referee. |
What students get wrong, and where the app answers it
Each of these comes up in class. The app answers it on the screen, so let the student find it there.
| What students think | What happens | Where they see it |
|---|---|---|
| Drive at the ball and it goes forward. | From the ball's wrong side it goes back toward your own goal. | Level 1: the starter's own goal. |
| The robot has to turn to go sideways. | Omni wheels slide in any direction while the robot keeps facing the same way. | Level 2, and the configurator's wheel speeds. |
| Turn until the compass reads exactly 0. | It never stops exactly at 0, so it twitches; a buffer from 340 to 20 calms it. | Level 3. |
| The brightest receiver points at the ball. | Only to the nearest receiver; adding all the readings as arrows points more finely. | Level 7, and the rays in the Robot menu. |
| A harder kick is always better. | A kick so hard the ball bounces back into your own goal fails the rules' power test. | Level 6, and Robot, Configurator. |
| Both robots should chase the ball. | They get in each other's way and leave the goal open, and two in a penalty area is a call. | Level 9 and Level 10. |
| A heavier ball slows the robot the same. | The big ball slows it about three times as much at the same speed. | Level 12's table. |
| The same program always scores the same. | Each play is a new match: the sensors' noise and the other team's choices change. | Level 13; Help, Same on every computer? |
What the app simplifies, on purpose
- The walls stand straight up; real ones have a sloped wedge at the bottom. The ball rolls on the flat carpet without hopping, and its spin is not worked out.
- The kicker sends the ball straight off the robot's front.
- The carpet's friction, the bounces off walls and robots, and the robot's speed and acceleration are tuned values, not measurements.
- The infrared ball weighs what a golf ball of its size weighs (46 g). The big ball's weight, about 140 g with its batteries, is our estimate.
- There is no camera league and no sensor that sees the goals. The robots know where the goals are only from the compass and the distance sensors.
- Level 13's halves are 2 minutes, not 10, so a robot out of bounds sits out 12 seconds, not a minute, or less if a kickoff comes first. The teams do not swap ends at half time, and the first kickoff has nobody stepping up to the ball.
- A robot pinned to the wall by an opponent for a second is lifted to the nearest free neutral spot. A real referee nudges it back onto the field instead.
- Lack of progress is a fixed 5 seconds with the ball within 10 cm, where a real referee counts out loud to three.
- Nothing breaks. The referee calls a robot damaged only when it goes out of bounds a third time in a match.
The team paper students hand in
File, Team paper makes one page about the student's robot, the way competition teams write theirs: the robot's parts and weight, the strategy in the student's own words (typed on the page), the program, the results of each level and each match, and a picture of the field with the robot and the ball. Print it to hand in after Level 9 or Level 13.
Setting it up for a class
Nothing to install: it runs in the browser, Chromebooks included. Students can try it without an account; saving needs one. Each project keeps the level, the program, the robot's parts, the best time of each level and the best result against each built-in team.
Play runs in real time and can be sped up to 8 times or slowed to a quarter; a match is easiest to watch at 4 times. Each level starts in real time. Big screen in the View menu enlarges the field and its boxes for a projector.
In a saved project, Level 13 can play a classmate's team: the classmate shares the project with the class, and the student pastes its link. The classmate's program runs in the same safe sandbox and stops if it never waits; nothing of theirs is kept, and there is no public leaderboard.
Standards
- CSTA 2-AP-12: design programs that combine control structures. A loop that reads the sensors with conditions inside, from Level 1.
- CSTA 2-AP-13: decompose problems into parts. Find the ball, get behind it, stay in bounds, kick: separate ideas that work together.
- CSTA 2-AP-14: create procedures with parameters. A striker and a goalie as functions (Level 9).
- CSTA 2-AP-17: test and refine programs. Each failing run says what went wrong, and the referee tests the program against the rules.
- CSTA 3A-AP-16: design programs that respond to events and messages. Two robots telling each other numbers (Level 9).
- CSTA 3B-AP-10: use and adapt classic algorithms. Vector sums of the ring's readings (Level 7) and roles that swap.
- Math HSN-VM: vectors. The ring's readings added as arrows, and moves at an angle.
- NGSS MS-PS2-1 and HS-PS2-2: Level 12 only. Straight-line collisions, equal and opposite pushes, and momentum added up for the robot and the ball.
- NGSS MS-ETS1-1 to 4, HS-ETS1-2 and HS-ETS1-4: a robot designed from parts under a weight limit and a power test, judged by a simulation against other designs.
More help
Is something on this page wrong or not clear? Write to us.
Page last reviewed November 2026.
Google, Google Classroom and Chromebook are trademarks of Google LLC.