ROBOTS THAT
THINK
Use simple coding to program
onscreen robots that talk, move,
and do things on their own
Cover Page “i”
Preface Intro Chap 1
Xxxxxx Chap 3
Chap 3 Chap 5 Chapter 2
#3
Make_Simple_Robots_interior_FIN.indd 66Make_Simple_Robots_interior_FIN.indd 66 4/26/22 1:55 PM4/26/22 1:55 PM
All electronic robots have machine brains. But do robots think the same
way animals and humans do? And does it matter?
A lot of the time, robots don’t need to be that smart. If you tell them to do
one specific job, that’s all they need to know. Remember, the definition of a
robot is a machine that can sense, think, and act. Most times, all you need
to do is give a robot instructions, so it knows what to do depending on the
information coming in from its sensors.
The first “programmable” robots didn’t even have computerized controls.
Instead, they contained electric circuits made up of sensors and transistors.
When a sensor detected a certain condition, it set off a transistor that could
send different signals to other parts of the robot. For instance, if a light
sensor detected that it was facing a dark area, it could turn on a motor to
steer the robot away from that area. When the light hitting the sensor was
stronger, the sensor would send a stronger signal to the transistor, which
might activate a different part of the circuit to make the robot continue
forward.
Today, almost all robots with brains use computers (or mini-computers
known as microcontrollers). But before a robot can think for itself, a human
has to program it. To describe a condition the robot might run into and
tell its computer brain what to do, they use commands like “if-then-else,
“while,” or “repeat until.” These conditional commands are used in every
type of computer programming.
Of course, robots don’t always do jobs all by themselves. Sometimes people
need to communicate with them — but machines are hard to talk to. So
early computer and robotics researchers began by programming robots
that only pretended to have a conversation. A robotic program designed to
ask questions and give answers to humans is called a chatbot.
The first chatbot program, Eliza, was developed by MIT professor
Joseph Weizenbaum in 1966. Eliza was designed to behave like a kind
Make_Simple_Robots_interior_FIN.indd 67Make_Simple_Robots_interior_FIN.indd 67 4/26/22 1:55 PM4/26/22 1:55 PM
of therapist. It turned every answer from the “patient” into another
question. For instance, if a user told Eliza they were feeling sad, the
computer might respond, “Why do you think you are feeling sad?” Even
though Eliza never said anything they didn’t already know, people liked
talking to the make-believe computer “therapist.” Some test subjects
even asked to be left alone with “her” so they could talk privately!
Today, robots use artificial intelligence, or AI, to help them sound
more human. To help them learn and adapt to new situations,
they tap into high-powered computers that hold and analyze
information on all kinds of topics. Personal assistants like Siri
and Alexa use AI to answer your questions, based on what they
know about you and answers that worked for other people.
In this chapter you’ll program animated robots using a free, online
programming language called Scratch. Scratch was designed
by the Lifelong Kindergarten group at the MIT Media Lab to help
teach children the basic concepts of programming. It’s drag-
and-drop software, so all you need to do is find the blocks of
code you need and move them around on the screen.
One of the virtual robots you’ll create works on a factory assembly
line. It uses its sensors and if-then-else commands to make decisions
and carry out the job you tell it to do. The other is a chatbot designed
to have a conversation with people. Since they’re only simulations
on a computer screen, you’ll be able to concentrate on making them
“think” without worrying about building bodies to go with them. See
how useful and life-like you can make your robot characters!
68
Making Simple Robots, 2nd Edition
Make_Simple_Robots_interior_FIN.indd 68Make_Simple_Robots_interior_FIN.indd 68 4/26/22 1:55 PM4/26/22 1:55 PM
Project: Create a Chatbot in Scratch
CODE AN ONSCREEN CHARACTER THAT WILL KEEP PEOPLE TALKING!
Chatbots were originally designed to test how close computers were to
thinking like humans. In 1950, computer pioneer Alan Turing suggested an
experiment in which people had to guess whether they were talking with
a computer or a human being. The “Turing Test” became the standard for
judging chatbots.
What scientists have found is that to really work, chatbots need to use
a little human psychology. Eliza’s open-ended responses encouraged
her “patients” to pour out their thoughts and feelings. On the flip side,
chatbots can also keep you talking by being rude. In 1989, a student
named Mark Humphrys at University College in Ireland created a
chatbot with a nasty personality called MGonz. To test it, he let it answer
Chapter 3: Robots That Think 69
Make_Simple_Robots_interior_FIN.indd 69Make_Simple_Robots_interior_FIN.indd 69 4/26/22 1:55 PM4/26/22 1:55 PM
his messages when he wasn’t at his desk. One morning, he found that
MGonz had traded insults with a student in the U.S. for over an hour. The
American student never realized he was talking to a computer — which
might make MGonz the first chatbot ever to pass the Turing Test!
In 1990, inventor Hugh Loebner created the Loebner Prize for chatbots.
Programmers competed to see which of their chatbots came closest to
passing the Turing Test. Each year, the best entry got a bronze medal.
But no chatbot has ever won the top prize — $100,000 and a gold
medal. One fan favorite is an online text chatbot named Mitsuku. It won
the Loebner Prize five times between 2013 and 2019, as well as other
comedy chatbot prizes. Mitsuku was created by a British musician, Steve
Worswick, to entertain visitors to his site. Now owned by the company
Pandorabots and known by the nickname Kuki, the chatbot makes
jokes, listens to problems, and shares encouraging words. Every week,
Kuki has millions of conversations with people around the world.
Modern day chatbots with AI are smart enough to understand you
when you speak. But originally, chatbots like Eliza could only read
what you typed. To respond, they would print out their answer or
display it as text on a screen. Your Scratch chatbot conversation will
be written out on the animation screen. The chatbot’s words will
appear in a comic-style speech bubble next to them. The person
talking to them will type in their responses in a box that appears at
the bottom of the animation screen. Check the Go Further ideas at the
end of the project for ways to make your chatbot speak out loud!
70
Making Simple Robots, 2nd Edition
Make_Simple_Robots_interior_FIN.indd 70Make_Simple_Robots_interior_FIN.indd 70 4/26/22 1:55 PM4/26/22 1:55 PM
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset