Hour of Code: Eliza the Chatterbot Lesson Plan

Overview

In this code activity, students are introduced to programming topics, including reading input from the user and printing output to the screen. They are also introduced to computational thinking concepts, including control structures which determine the flow of a program.

The activity is structured as sequence of interactive notes and questions that students are challenged to answer. Students are introduced to chatbots, which are computer programs designed to simulate intelligent conversation with a user, often via text, and sometimes with the aim of passing the Turing test.

Chatbots offer an excellent opportunity to discuss concepts of artificial intelligence with students.

These concept could be introduced after a discussion about a number of topics, or could lead on to more discussion:

Specifically our Eliza activity is inspired by the ELIZA chatbot program written at MIT by Joseph Weizenbaum between 1964 and 1966. ELIZA was a simulation of a Rogerian psychotherapist. Using simple pattern matching techniques, (and no information about human thought or emotion), ELIZA sometimes provided a startlingly human-like interaction.


Learning Objectives

Students will:

  • learn to use Python to print data to the screen
  • learn how to make decisions and take different actions based on those decisions
  • use logic and problem solving skills to answer simple questions

Extended activities

Chat with real chatbots and reflection questions

Students can chat with a reimplementation of the original ELIZA: http://www.masswerk.at/elizabot/ and more recently developed chatbot, Cleverbot: http://www.cleverbot.com/

Students can then answer these questions in pairs or small groups:

  • What did it feel like talking to Eliza?
  • What did it feel talking to Cleverbot?
  • How are the two bots similar?
  • How are they different?
  • Which seemed more like you were talking to a human?
  • Do you think it would pass the Turing test?
  • What did the bots do "wrong" in terms of passing as a human?

On the Internet, no on can tell you're a bot! - Follow up activity

Students have a discussion about how trusting they are of things they read on the internet, discussing questions such as 'Who can you trust', and specifically, 'How do you know you're not talking to a chatbot?'

With apps such as "Clevertweeter" which you can set up to tweet on your behalf with auto-generated, somewhat relevant content, how sure can we be of our interactions online?

Further discussion or extension points:

  • Will we be able to make robots that are indistinguishable from humans?
  • To what extent is language a human endeavour?
  • How different is a robot that can talk to you to one that can't?
  • What areas of society could best utilise 'companion' robots that can communicate easily and fluently? For instance, the use of robots in aged care and dementia care.

Register as a teacher for free!

Or pick one of our other fun activities. Suitable for Grades 3-12.

Monster Maker! (Blockly)

Use drag-and-drop blocks to write your own programs, learn about sequence and ordering, and create fun monster characters!

Start coding now!

Animal Classifier (Python)

Learn about the differences between animals, and how Biologists use programming to help them do science! You'll use the programming language Python to classify animals based on their characteristics.

Start coding now!

Flags of the World (Python Turtle)

Use the programming language Python and instruct a turtle to draw flags from around the world! How many countries do you know?

Start coding now!

Frozen Fractals (Python Turtle)

Use the programming language Python and instruct a turtle to draw fantastic snowflakes with code! Brrr, is it getting cold in here?

Start coding now!

Frozen Fractals (Blockly Turtle)

Build programs using friendly blocks and instruct a turtle to draw fantastic snowflakes with code! Brrr, is it getting cold in here?

Start coding now!

Virtual Pet (Python micro:bit)

Get started with the BBC micro:bit. Use the Python programming language to make a pet that you can feed and play with! No micro:bit required.

Start coding now!

Virtual Pet (Blockly micro:bit)

Get started with the BBC micro:bit. Use friendly blocks to make a virtual pet that you can feed and play with! No micro:bit required.

Start coding now!

Hydrangea Danger (Blockly Turtle)

This activity is designed to introduce branching. Use the Blockly version of Python and its turtle module to draw and colour hydrangea flowers!

Start coding now!

Emoticon Madness (Python)

Ever wanted to create your own emoticon? Use the programming language Python to explore emoticons and text manipulation.

Start coding now!

Space (Blockly Python)

Use the visual programming language Blockly to investigate space and reach for the stars.

Start coding now!

Disease Epidemic (Python)

Use the programming language Python to model a disease outbreak. Can you solve the curious case of the glowing nose?

Start coding now!

The Dark Tunnel (Python)

Use the programming language Python to create a simple game (or MUD). Can you find your way through the dark tunnel?

Start coding now!