3.12.1. Magpie ChatBot Lab

3.12.1.1. Lab Requirement

As of 2014-2015 the Advanced Placement Computer Science A course must include at least 20 hours of hands-on labs. In 2014, 3 recommended labs were created, Magpie, Picture, and Elevens, and in 2019-20, 4 more labs were created, Consumer Review, Steganography (an extension of PictureLab), Celebrity, and Data. Your teacher may choose to do any of these labs or their own labs to complete at least 20 hours of labs. See https://apstudent.collegeboard.org/apcourse/ap-computer-science-a/course-details/lab-requirements for the student guides for each of these labs.

If your class does all or part of the Magpie Lab, here is the College Board student guide for the Magpie Chatbot Lab as a pdf. Your teacher will provide the lab code for you which is also in the next pages. The particular code in each of these labs will not be on the exam, but the concepts covered by the labs will be on the exam.

3.12.1.2. Magpie Lab Description

The Magpie lab allows you to work with the String class and conditionals with a chatbot. A chatbot is a computer program that tries to hold a conversation with a user. This chapter will walk you through the activities in the Magpie chatbot lab.

The first activity in Magpie is to explore some existing chatbots. We encourage you to work in pairs or groups on this activity.

3.12.1.3. Activity 1: Exploring Chatbots

  1. Working in pairs or groups, try out some chatbots here.

  2. Record the chatbot response to each of the following.

  • Where do you come from?

  • asdfghjkl;

  • My mother and I talked last night.

  • The weather is nice.

  • I said no!

  1. Ask the chatbot other questions.

  • Record the most interesting response.

  • Record the most peculiar response.

  1. Work with another student or group to have two chatbots chat with each other. Type the responses from one chatbot into the input area for the other and vice-versa.

  2. Keywords: Some chatbots look for particular keywords and respond based on those keywords. What are some of the keywords that your chatbot seems to be responding to? Why do you think it responds to those keywords?

You have attempted of activities on this page
Next Section - 3.12.2. Activity 2: Running Simplified Magpie Code