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
Put this on your class site

Students can use Robot Soccer Lab right on your page, with no account. What they make stays on that page; to keep their work, they make a free account.

Google Sites: Insert, then Embed, then By URL, and paste this address.

https://mytekdev.com/try/robotsoccerlab?embed=1

Canvas, a blog, or any page that takes HTML: paste this code where you edit the page as HTML.

<iframe src="https://mytekdev.com/try/robotsoccerlab?embed=1" width="100%" height="640" style="border:0" allow="fullscreen" title="Robot Soccer Lab demo from mytekDev"></iframe>

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.

  1. 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.
  2. 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.
  3. 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.
  4. 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).
  5. 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.

LevelThe goalWhat it shows
1. Find the ballScore in the blue goal.Driving straight at the ball scores an own goal; moving round it first scores.
2. Chase itTouch the ball three times without turning.Omni wheels slide in any direction: the clock times 30 is the ball's angle.
3. Face the goalScore while facing the blue goal.The compass, and a buffer so the robot does not twitch.
4. Get behind itScore 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 boundsGet close to three balls just over the line without going out.Line sensors, and backing away from the line the way it came.
6. KickScore with a kick from your own half.A kicker charges, and must pass the rules' power test.
7. Read the ringStop 5 to 20 cm from three balls without touching them.The ring's strength grows as the ball gets closer.
8. The goalieSave four of five shots without going wholly into the penalty area.Distance sensors keep the goalie in front of its goal.
9. Two robotsScore twice and always keep one home.One program on two robots: robot.number() picks the striker and the goalie.
10. The refereeClear 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 dribblerTurn round with the ball, then score in the blue goal.A dribbler holds the ball only while the robot turns slowly.
12. Head-onDrive 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 matchWin 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 thinkWhat happensWhere 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 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

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.