Skip to main content
Ambassador Programming Robots Badge Activity | Girl Scouts
Home Home Home
Home Home Home
Search Search
  • SHOP
  • DONATE
  • myGS myGS myGS
  • Find a Council Find a Council Find a Council
  • Español Español Español
  • Search Search
  • Discover Discover

    About Us About Us

    • What Girl Scouts Do What Girl Scouts Do
    • The Family Experience The Family Experience
    • Girl Scout History Girl Scout History
    • Research and Data Research and Data
    • Diversity, Equity, and Inclusion Diversity, Equity, & Inclusion
    • test test
    • 7th item 7th item

    Activity Zone Activity Zone

    • Explore Girl Scouts Explore Girl Scouts
    • Grade Levels Grade Levels
    • National Service Projects National Service Projects
    • Virtual Events Calendar Virtual Events Calendar

    Our Stories Our Stories

    • Girl Scout Stories Girl Scout Stories
    • Alum Stories Alum Stories

    Discover Girl Scouts. Learn what Girl Scouts do; about our history, research and data; and about family involvement, or try Girl Scout activities!

  • Get Involved Get Involved

    Become a Girl Scout Become a Girl Scout

    • Join a Troop Join a Troop
    • Find Events Find Events

    Become a Volunteer Become a Volunteer

    • Start a Troop Start a Troop

    Alums Alums

    • Campfire Chats Campfire Chats
    • Beyond Ambassadors Beyond Ambassadors
    • Campus Girl Scouts Campus Girl Scouts
    • The Girl Scout Network The Girl Scout Network
    • Noteworthy Alums Noteworthy Alums

    Learn how to get involved with Girl Scouts. Join a troop, find events, become a volunteer, or discover alum opportunities.

  • Cookies Cookies

    Buy Girl Scout Cookies Buy Girl Scout Cookies

    • Frequently Asked Questions FAQs

    Girl Scout Cookie Flavors Girl Scout Cookie Flavors

    • NEW! Raspberry Rally NEW! Raspberry Rally

    About Girl Scout Cookies About Girl Scout Cookies

    • Cookie History Cookie History

    Find out how to buy Girl Scout Cookies, explore Girl Scout Cookie flavors, see how girls learn essential life skills, and more.

  • Support Us Support Us

    Donate Now Donate

    • Individual Giving Individual Giving
    • National Trefoil Society National Trefoil Society
    • Lifetime Membership Lifetime Membership
    • Our Partners Our Partners
    • Planned Giving Planned Giving

    Advocacy Advocacy

    • Girl Scout Advocacy Center Girl Scout Advocacy Center
    • Policy Agenda Policy Agenda
    • Gold Award Recognition Gold Award Recognition
    • Fair Play, Equal Pay Fair Play, Equal Pay

    Support Girl Scouts by donating nationally or to your local council, becoming a lifetime member, and advocating for girls.

  • Members Members

    For Girl Scouts For Girl Scouts

    • Badges, Journeys, & Awards Badges, Journeys, & Awards
    • Ways to Participate Ways to Participate
    • For Cookie Sellers For Cookie Sellers
    • Uniforms Uniforms
    • Renew Your Membership Renew Your Membership

    For Volunteers For Volunteers

    • Tips for Troop Leaders Tips for Troop Leaders
    • Volunteer Cookie Resources Volunteer Cookie Resources
    • Traditions & Ceremonies Traditions & Ceremonies
    • Virtual Meeting Planning Virtual Meeting Planning
    • Renew Your Membership Renew Your Membership

    For Parents & Families For Parents & Families

    • Raising Awesome Girls Raising Awesome Girls
    • Family Connection Family Connection
    • Cookie Entrepreneur Family Pin Cookie Entrepreneur Family Pin

    Resources for Girl Scout members. Find volunteer, Girl Scout, and family tools and support. Explore badges, activities, and more.

  • SHOP
  • DONATE
  • myGS myGS myGS
  • Find a Council Find a Council Find a Council
  • Español Español Español
  • Search Search

Council Finder

Use this finder to connect with your local Girl Scout council. (Home Page)

By ZIP Code 2

By State 2

By Council 2

close
You are leaving uat.girlscouts.org for a website operated by an external party. You will be subject to the privacy and security policies of that website.
  1. Activities for Girls
  2. Ambassadors
  3. Ambassador Programming Robots Badge Activity

Ambassadors

toggle arrow
  • Daisies
  • Brownies
  • Juniors
  • Cadettes
  • Seniors
  • Ambassadors
  • All Levels and Ages

STEM

Ambassador Programming Robots Badge Activity

Create A Program To Guide A Robot Through A Maze

Write a computer program that tells a robot what to do!

Activity Details

Time needed: 60 minutes

Materials needed:

  • Robot Maze 1 
  • Robot Maze 2
  • Robot Maze 1 Solution for your reference 
  • Robot Maze 2 Solution for your reference 
  • Chess piece, checker, or other robot stand-in 
  • Pen or pencil 
  • Paper 

Setup:

A computer program is a type of algorithm—a set of step-by-step instructions. The list of steps for telling the robot how to complete the task is an algorithm. Recipes and driving directions are algorithms, too!  

Computer programs are written in code, a language that can be understood by machines. Programs use commands to tell a machine what to do. A command is one step in a program.  

Activity:

You’ve been challenged to write programs a robot can follow to navigate two different mazes!  

Part 1: Navigate a robot through a paper maze. (15 minutes)

First, write a program that will tell a robot how to solve the maze on the Robot Maze 1 handout.

The maze consists of a thick black line on a large sheet of white paper. The robot you’re writing this program for is designed to be follow a black line. Use regular language—you don't need to write commands in code yet. 

To check if a program runs correctly, use the robot stand-in, moving it through the maze according to the program.  

How did it go? 

  • If the robot makes it to the end of the maze, your program works!  
  • If the robot doesn’t make it through the maze, debug the program by going over each step. If the robot makes a wrong turn, figure out why and revise the code to avoid the error. Then, test the code again until the robot solves the maze. 

If you need help, check out Robot Maze 1 Solution for one sample program that a robot could follow to navigate the maze.   

Want more challenge? Try this!

Pull out a map of your favorite hiking trail! Then, write a program a robot could follow to travel it. 

Part 2: Write a program to navigate a robot through any simple maze. (45 minutes)

When programming with a computer language, it’s important to get the syntax exactly right. Syntax is the set of rules used by a language. It includes spelling, spacing, symbols, and punctuation.  

To plan a program without worrying about syntax, programmers sometime use pseudocode. ("Pseudo" means fake.) Pseudocode uses commands in regular human language. It can then be translated into any kind of computer language. The only rule for pseudocode is that it should be easy to understand. 

Next, write a computer program in pseudocode that tells a robot how to solve any simple maze. Read pages 1 and 2 of the Robot Maze 2 handout to learn about programming using conditionals, loops, and functions. 

Then, translate the “Left Hand on Wall” method (on page 3 of the handout and below) into pseudocode. This program is often used for maze-solving robots. The rule is based on the idea that if you’re walking through a maze and always keep the same hand on the wall, eventually you’ll end up at the exit.  

Here is what the rule says:

  • Always turn left if you can.  
  • When you can't turn left, go straight. 
  • When you can't turn left or go straight, turn right.  
  • When you can't turn left, go straight, or turn right, turn around because you must be at a dead end.  

Write the rule in pseudocode on page 3 of the Robot Maze 2 handout.  

Then, on page 4 of the handout, write a program using loops and conditional statements that can take a robot from the beginning to the end of any simple maze. The robot may take wrong turns, so it won't be as efficient as when you just gave it "driving directions" in part 1. 

When the program is finished, test your program with the maze on page 5 of the handout, the same way you tested your program in part 1. Use the robot stand-in to move through the maze.  

If the robot gets stuck before it reaches the end, debug the program by going over each step to find the error. Keep iterating, or repeating the process of testing and debugging, until the program works and the robot solves the maze! 

Want a challenge? Try this!

Robots can run more than one program at the same time. For example, while the maze-solving program is running, the robot could also be running code that tells it to follow a line. 

So, write pseudocode with conditional statements, loops, and functions to create a program that makes a robot follow the turns of a line. 

To help, here's how line-following robots work:

  • A line-following robot usually has two light sensors, one on each side, that control the wheels on that side
  • The light sensors can detect the difference between the dark line and the white paper. 
  • As long as the light sensor detects light (the white paper), the wheel it controls will keep turning. So as long as the black line is centered under the robot, the sensors on the sides will detect white paper. With both wheels turning at the same speed, the robot will move forward. 
  • When the light sensor detects dark (the black line) on one side, the wheel on that side stops. Meanwhile, the other wheel, which is still over the white paper, keeps going. This causes the robot to pivot around in the direction of the black line.  
  • When the robot has turned enough so that the black line is centered beneath it, the second wheel begins to turn again and the robot moves forward.   
  • When both sensors detect dark (the black box at the end of the maze), both wheels stop turning and the robot stops moving. 

And that’s it! You’ve now completed two steps of the Ambassador Programming Robots badge! If you had fun doing this, you might want to learn more about robots and design your own with the rest of the Ambassador Robotics badges. 


Troop Leaders: The instructions for all badge steps are available free of charge in the Girl Scout Volunteer Toolkit.

Girl Scout Activity Zone activities have been adapted from existing Girl Scout programming.

Adapted from steps 4 and 5 of the Ambassador Programming Robots badge. Contact your troop leader or your local Girl Scout council to become a Girl Scout member and learn all the requirements needed to earn the badge.

Explore more activities.

What’s the Score?
What’s the Score?

Find out why your credit score is so important for your financial future.

Girl Scout Law and Your Faith
Girl Scout Law and Your Faith

Create a keepsake to showcase your principles and values.

Make It Your Own!
Make It Your Own!

Customize your résumé for different opportunities by tracking your experience.

JOIN
VOLUNTEER
DONATE
Enter your email address to subscribe to
the Girl Scouts of the USA newsletter.
Enter your email address to subscribe to
the Girl Scouts of the USA newsletter.

  • Instagram
  • Twitter
  • LinkedIn
  • Youtube
  • Pinterst
  • Facebook
  • Blogger
  • External Link
  • Contact Us
  • Visit Us
  • Careers
  • Leadership
  • Schools
  • Scholarships
  • Sustainability
  • Financials
  • Faith
  • Terms and Conditions
  • Privacy Policy
  • Frequently Asked Questions
  • Press
  • Blog

© 2016-2022 Girl Scouts of the United States of America. 

A 501(c)(3) Organization. All Rights Reserved.

Join

Volunteer

Donate

close