Activity

Artifical Intelligence Unplugged

Overview
Grades 5-8
45 min
Topics
Computer Science
Status

In this activity, you will explore the fundamental decision–making principles of AI and applications of AI in commonly used technologies.

An artificial intelligence (AI) is something that can make rational decisions, usually when solving one specific kind of problem. Most AI systems are built using computers, but an AI is anything that can make a decision. You can make one out of anything that follows rules to make choices.


2 coins of different values–one quarter and one nickel, for example

Dice

Paper and pencil


1
Rock, Paper, Scissors

Artificial intelligence (AI) can make rational decisions, usually when solving a specific kind of problem. Here’s some examples!

  • Chess: We’ve been using AI to play the game of chess as early as 1957! This first computer took 8 minutes to make a move, and though it couldn’t necessarily win a game, it could play a whole game. Now, we have chess AIs that are so advanced that not even the best chess player in the world can beat them.
  • Chatbots: Chatbot AIs can have entire conversations with people. Some are so advanced that it can be difficult to tell that they aren’t real people!
  • Email: You know the junk folder in your email? That’s AI, too! It keeps unwanted emails out of your inbox using specific rules.
  • Driving: AI is even being used to drive cars! A Google company called Waymo has self-driving cars in a few major cities. These cars can be called with an app to take you wherever you want to go: no driver required.

As you can see, most AI systems are built using computers, but an AI is anything that can make a decision.

Did you know?

Unplugged is the word we use for teaching computer science concepts without technology. This was common in the days before computers were widely available, but unplugged coding is still popular today to teach computer science concepts.

2
AI vs. AI

Now, it is time to truly go unplugged and have the AIs compete! You’ll use the same die chart again, but this time, the rules are a little different.

Don’t have a die? No problem! Here’s some ideas on what you can do instead.

If you do not have a die to roll, you can use two different types of coins, like a quarter and nickel, and the following decision chart. To use this method, you’ll flip the two coins, one at a time, for the AI’s decision. Then, you’ll use this decision chart to figure out the AI’s choice.

Google dice roller: If you don’t have coins, or don’t want to use coins, do a quick internet search for “roll dice.” The first result is a dice roller made by Google! Use the virtual die the exact way you’d use a real die.

Draw from a hat: This option only requires some paper, something to write with, and something to put your slips of paper inside. (It doesn’t even have to be a hat!) Tear your paper into six pieces and number them 1 through 6. Then, when it is time to make a decision for the AI, draw a number out of the hat. Use the number on the slip of paper with the die decision chart above.

AI Rock Paper Scissors

No matter which method you’re using for your AI, here is how the game of Rock, Paper, Scissors will work. The first AI machine will always choose rock. Their decision will always stay the same each round. This AI machine only has one rule: Choose rock!  The second AI machine will follow the rules from the die or coin toss chart. Have the AIs play ten rounds, and write down the winner of each round. Which AI machine won?

Human Intelligence Rock Paper Scissors

For our next game, we’re going to use human intelligence! Find a family member or friend, and play Rock, Paper, Scissors with them 10 times. Record your answers. Who won after 10 rounds? Did you change your choice based on what the other person did in the previous round?

3
If/Then Statements

The rounds of Rock, Paper, Scissors you just played are a way to show something computer scientists call if/then statements, or conditionals. An if/then statement is a type of rule AI can follow. Let’s think about how if/then statements worked (or could have worked) in each of your rounds of Rock, Paper Scissors.

  • Game 1: In this round, the two AIs played each other. The first AI always chose rock. (IF it is my turn, THEN I choose rock.) A human could easily beat this AI once they saw the pattern by always choosing paper. The second AI probably couldn’t do that, because it doesn’t have any rules to follow to help it win.
  • Game 2: In round two, it was human versus human. You may have been able to figure out patterns the other player was using to make a better choice. For example, IF the other player blinks a lot, THEN they will choose rock. These patterns, or rules, would help you win because you can watch them and make better decisions.
Conditions

Now that we’ve looked at each of these rounds, let’s train our AI and write new if/then rules, also called conditionals, to help it win. Remember Round 1 when the AI chose only rock? What if/then rule could you write that would help the AI win if the answer is always the same?

Are you ready for the answer? This is the if/then rule you could write: IF the other player chooses rock three times in a row, THEN the AI will choose paper for the rest of the rounds.

This if/then statement creates a rule that helps the AI learn what to do if the answer is always the same. While it may not win the first three rounds, it would win the following seven. You may have written a different statement, and that’s okay! A lot of computer science is trial and error, and there are many ways to solve a single problem.

Let’s try to write a rule for the third round: human versus human. In the example round we gave, your opponent always blinks before choosing rock.

What if/then statement could you write to help yourself make the right decision to beat them? When you’re ready, click to flip the flashcard to check your answer.

Did you know?

There is a special test given to computers to test how human-like they are. It is called the Turing test, and it is named after Alan Turing, a pioneer in computer science and AI, who invented the test in 1950.

4
Else/If Statements

How does a computer or a phone know how to identify images when you do a search for them? Recognizing objects is easy for a human, because we know what characteristics make up an object, like shapes or colors. When computers try to recognize images, they use AI rules to identify an object.

Unplugged Coding Game

Let’s play an unplugged coding game to write rules that would help a computer recognize the difference between houses, cats, and cars. You can think of each object (a house, a cat, or a car) being made up of specific shapes.

If we were to make the shapes in each object into a chart like our die decision chart from the beginning of the activity, it would look like this.

Now let’s write the rules for our AI image identifier. Based on the chart, we could write: IF an image has a rectangular shape and a triangular shape, THEN it is a house. 

Try to think of the other two if/then rules for identifying cars and cats. When you’re ready, read below to check your answers:

  • IF an image has a rectangular shape and a round shape, THEN it is a car.
  • IF an image has a triangular shape and a round shape, THEN it is a cat.

But what if there are objects that don’t follow those rules?

We only have three rules, so an AI wouldn’t be able to tell what any of those things are since they don’t follow the rules we’ve written. This is where we add a new type of rule: else/if statements. Else/if is a type of rule computers can follow to help them when an if/then rule isn’t true.

For example: IF I get good grades, THEN, I get ice cream. ELSE, I study harder.

Here’s one that’s a little more complex: If an image has a rectangular shape, but not a triangular or round shape, it can’t be a cat. If it is bigger than 12 feet by 10 feet, it is a house. If it is bigger than 3 feet by 3 feet, it is a car. If it is smaller than that, it is a cat with no ears.

Using else/if lets us look at lots of characteristics in a row if shape isn’t helping us identify the object. You could even use other characteristics, like speed, material, and texture.

Before you keep going, try to use if/then and else/if to write another rule. This rule should help the AI identify an object if it has a round shape only.

Ready for the answer? IF the image has a round shape, but not a triangular shape or a rectangular shape, THEN it is not a house.  ELSE IF it is metallic, it is a car. ELSE IF it has fur it is a cat. ELSE it is a house.

Did you know?

It is okay if you don’t get it exactly right! In fact, mistakes are the key to machine learning! Each time an AI program cannot identify something is an opportunity for improvement. An unidentified image means that the rules were processed and the AI found an example that did not work with the rules. This allows us as computer scientists to either add additional rules to fix the problem or improve previous rules.

  • A CAPTCHA (Completely Automated Public Turing test to tell Computers and Humans Apart) is a security measure used to determine whether a user is a human or a computer program (bot). It is designed to prevent automated bots from performing certain tasks that are intended for humans.
  • CAPTCHAs are meant to present a challenge that is easy for humans to solve but difficult for computers. For example, you may have to do a math problem, identify which images have stop lights, or type random text and numbers.
  • CAPTCHAs have evolved over time to stay ahead of advancements in computer algorithms. Today, there are various types of CAPTCHAs, including image-based CAPTCHAs, text-based CAPTCHAs, reCAPTCHA (which combines various challenges), and newer approaches that focus on how users behave rather than what they do.

As AI advances, so will programs that have to identify when there is a human behind the screen or a bot!

Bonus Activity

Based on the image activity above, add a new object to identify.  Maybe your new object has a square or trapezoid shape.  Write new rules to help identify the new object.

1

How can AI devices help older adults like grandparents?

2

What daily task that you do not like doing, would you design an AI solution for?

3

What are some concerns you think people may have about Artificial Intelligence?

Image recognition can solve lots of problems in the world.  Sorting through millions of images in a short amount of time, computers help humans do research. A citizen science group is using pictures taken by tourists to track animals and species types across the globe.  Dr. Tanya Berger-Wolf, a professor at Ohio State University, has created a nonprofit called Wild Me that uses AI for animal conservation. You can learn more about it by searching for wildme.org.


Meet Mary, a software engineer! She uses programming to help people and businesses make payments with credit cards. If you have ever been with an adult when they pay for something with a card, there’s a chance that the cashier is using code Mary helped create to complete the transaction!

Mary wasn’t very familiar with computers when she got to college, but it didn’t take her long to learn! She used logic and puzzle-solving to learn coding, so she decided that’s what she wanted to do as a career. She even makes interactive games using coding for fun! Mary loves that programming can help people create and build things, no matter what they’re passionate about!

Did you enjoy this activity?

No endorsement by 4-H is implied or intended. 4-H is the youth development program for our nation’s cooperative extension system.