How To Train Your Robot: how I teach kids to program without computers

Guest post by Dr. Techniko

Last April, I taught six kids of ages 5 to 7 how to program. “In what programming language?” you may ask. Well…. I didn’t use a programming language, at least none that you know of. In fact, I didn’t even use a computer. Instead, I devised a game called “How To Train Your Robot.” Before I explain how the game works, let me tell my motivation.

I learned how to program during my freshman year at MIT when I was 19. It’s not because I didn’t have a computer at home or I hadn’t heard about programming languages. It was because a) I thought programming was boring, and b) no one had told me why I should bother. In fact, my computer teacher in high school had told me “you don’t need to waste your time learning how to program. Now we have visual tools to build programs. Programming languages are already obsolete.” That was in 1994 and he was referring to Visual Basic. Luckily for me MIT wiped all that nonsense away in a matter of weeks. But does one need to wait to go to college to get the proper education?

Learning how to program is going to be the most useful new skill we can teach our kids today. More than ever our lives depend on how smart we are when we instruct computers. They hold our personal data and they make decisions for us. They communicate for us and they are gradually becoming an extension of our brains. If we don’t learn programming as part of our childhood, we will never evolve. As the famous futurist, Ray Kurzweil, put it “The only second language you should worry about your kids learning is programming.”

How To Train Your Robot

The game works as follows: every kid is turned into a “robot master” and their mom or dad becomes their “robot.” I give each kid a “Robot Language Dictionary” and explain to them that this is the language their robot understands. The dictionary has symbols for “move left leg forward,” “turn left,” “grab,” “drop,” etc.

The goal is for the robots to go through an obstacle course, pick up a ball and bring it back. The kids have to write a program that will tell the robot how to do all that. Every time they write a program, they hand it to their robot and the robot executes it. To do that, I give each kid a pen and paper where they copy symbols from the dictionary to write their programs and off their robots go!

The fun part begins when each robot retrieves the ball. Now I let kids invent their own moves and symbols that they add to their dictionary and then teach their robots. There is no limit to what the kids come up with.

This is my favorite program (written by a five-year-old girl):

I designed the class to teach some very basic principles of computer science and programming:

  • Programming languages are just another way to communicate to an entity (via programs).
  • Programs are recipes for automating stuff.

However, I was pleasantly surprised on how much more the kids learned. On their own they figured out the following things (in a 30-min session):

  • Program Parametrization: Instead of putting a forward step ten times, they put a 10 in front of the “step” symbol (A five-year-old figured it out and asked me if she could do it).
  • Composition: Grouping of a set of moves (“move left leg forward, then move right leg forward and do this combo 10 times”)
  • Abstraction: “Run in a circle, then say “I’m dizzy!” then call this the “Run Dizzy” program and do it 100 times. (For some reason, kids loved making their parents repeat stuff 100 times over.)
  • Unit testing: They’d write a test program to get the parents moving a few steps, have their parents run it, then fix it and run it again, and then add a few more steps until they reach the goal.

I’ve run the class twice now and I’ve seen the same patterns, which support my belief that when kids have fun, they get very smart and creative about programming. Many of the parents plan to play the game at birthday parties. If you have questions about how to set up the game, don’t hesitate to write. You can find my contact info on Facebook.

You can also find instructions on how to teach the class as well as materials I used on this post.

I hope we learned something useful today.

Comments on How To Train Your Robot: how I teach kids to program without computers

  1. Very cool! I would have loved this as a kid. My friends who taught a math extension class did something similar but with frosting cupcakes (I think the kids may have been a few years older). They didn’t have set moves, just had the kids write directions and then the teacher would follow them literally. The kids learned pretty quick that you have to be very specific with algorithms otherwise you end up with a big mess (like if you don’t specify to use a knife than the teacher will use their fingers). According to my friends it was always a big hit every time.

    • We use a similar lesson, but with making sandwiches for emphasizing the difference between one way and two way communication when we teach sailing instructors

  2. This is great! Just have to add that the ability to think algorithmically (planning and debugging sets of instructions) is a valuable skill in any kind of science or engineering, even outside of programming computers. (Written during step #5: incubate glass slides in oven at 80 deg C for one hour. 🙂

    • Hi Allison,

      If you think about it, this skill is useful well beyond engineering. Some of the most successful entrepreneurs that I’ve met think that way. Quick iterations on an idea with testing, failing and improving.

  3. I did this kind of thing when I was mentoring an elementary robotics team. The first day, I had the kids write out how to make a peanut butter and jelly sandwich. It can be quite fun!

  4. This is so cool! Not only can I do this with my kid at play dates, but I also teach a GED class where an adaptation of this would be invaluable! It’s so hard convincing my students that programming is relevant and accessible in their lives. This is just the ticket!

  5. That is amazing. My introduction to programming was last spring in college. It was a semester of what I thought would be introductory programming and it ended up being Visual Basic with the 1998 textbook. Useless to me.
    But this, I would actually learn from this! Definitely passing it along to my teacher friends.

  6. Very cool sir! I have 3 kids at home from 2 teens to a 3.5 non verbal autisic who is soo computer-ly inclined it’s almost scary, my phone has a lock feature he has made it to a screen that offers to erase in lock mode. I don’t know how he does it but as a kid from back in the days of qbasic i want to find the language we both can share. I look forward to read more from you! And thanks for sharing!

  7. this is awesome! I LOVED programming as a kid! imagine the typical 7 year old geek girl writing programs on her vic20 – oh wait, that wasn`t all that common back then. In computer engineering we were always 3 women or less in groups of 30-35. I really hope this changes with time and people realize how cool programming is.

  8. We’re actually working on a new (albeit computer-based) game to help young kids learn the logic/problem-solving skills they’ll need to eventually learn coding. It’s called BotLogic.us. Kids program a robot to navigate through progressively challenging mazes and can even go head-to-head with friends in programming tournaments. You can check it out here: http://botlogic.us We’re looking to generate interest so that we can get the resources we need to finish the game. So far, we’re really excited about the response!

Join the Conversation