AP Magpie Chatbox "If a computer could think, how could we tell?"

Slides:



Advertisements
Similar presentations
CATHERINE AND ANNIE Python: Part 3. Intro to Loops Do you remember in Alice when you could use a loop to make a character perform an action multiple times?
Advertisements

String Processing Word processing term papers, writing memoirs, sending messages, responding to surveys, placing online orders and registering.
”assert” and ”retract”
Welcome Welcome to the tour of this tracking system website! This “General” tour is for everyone! The next tour is for church planters and the last tour.
Downloading and Installing AutoCAD Architecture 2015 This is a 4 step process 1.Register with the Autodesk Student Community 2.Downloading the software.
Artificial Intelligence
Welcome to TPS 2014! Classroom Procedures & Guidelines Day One Introduction Mr. Spann August 2014.
Welcome to the Second Tutorial Welcome to the second part of this communication system website tutorial! This tutorial is for church planters. When you.
Working with Numbers in Alice - Converting to integers and to strings - Rounding numbers. - Truncating Numbers Samantha Huerta under the direction of Professor.
Information guide.
Introduction to Python Lecture 1. CS 484 – Artificial Intelligence2 Big Picture Language Features Python is interpreted Not compiled Object-oriented language.
An Introduction to Textual Programming
Pre-Coding Web Design – Sec 3-1 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development I” Course materials.
THE BIG PICTURE. How does JavaScript interact with the browser?
07/10/ Strings ASCII& Processing Strings with the Functions - Locate (Instr), Mid, Length (Len), Char (ChrW) & ASCII (Asc)
Welcome to the Second Tutorial Welcome to the second part of this information system website tutorial! This tutorial is for church planters. If you’d like.
Chapter 1 Working with strings. Objectives Understand simple programs using character strings and the string library. Get acquainted with declarations,
An introduction to chatbots Kamal Aboul-Hosn Cornell University Conversing with Computers.
Manipulating Text In today’s lesson we will look at: why we might want to pick out parts of text strings some BASIC functions that can be used to chop.
1 Lab 2 “Hello world” in Unix/Linux #include "std_lib_facilities_4.h" int main(){ cout
Lesson 4 Using Variables in Python – Creating a Simple ChatBot Program.
Hello! This presentation is designed to be used with your students to help them join your class and create unique usernames and passwords.
ALAN….ALAN… ALAN. WHO IS ALAN TURING?
This is what we’re gonna do! Instructions for Career Cruising Activity.
AP Java Enhancing the Chatbot. Natural Language Processing Note: What is Natural Language Processing? What are some of the opportunities? What are some.
Introduction Chapter 1 1/22/16. Check zyBooks Completion Click on the boxes for each section.
PHP Form Processing * referenced from
Special Methods in Java. Mathematical methods The Math library is extensive, has many methods that you can call to aid you in your programming. Math.pow(double.
02/03/ Strings Left, Right and Trim. 202/03/2016 Learning Objectives Explain what the Left, Right and Trim functions do.
Adding and Eating Worms Mrs. C. Furman August 23, 2010.
WHAT IS A CHATTERBOT? A chatterbot is a computer program that simulates a conversation between two people. That is, one person writes something and the.
Who is Alan Turing?
© A+ Computer Science - Magpie Magpie is a lab that focuses on classes, randomness, and Strings. This lab will make sure that you.
Section 6.1 Introduction to String Methods. Section 6.1 Introduction to String Methods.
Some Assignments  Write a program which prints the following information about at least 5 persons: NAME MAIL-ID EMPLOYEE-CODE PHONE Eg. Umesh
AP Java Elevens Lab.
AP Java Enhancing the Chatbot.
© A+ Computer Science - Magpie Chatbot Lab © A+ Computer Science -
Pre-Coding Web Design – Sec 3-1
Customer Online Ordering
Fundamentals of Programming I Dictionaries redux
Using Multiple Forms.
Introduction to Object-Oriented Programming
Using variables, for..loop and functions to help organize your code
Computer Science 2 Hashing
Fill the screen challenge!
Using Objects in Alice.
Lesson 16: Functions with Return Values
© A+ Computer Science - Arrays and Lists © A+ Computer Science -
CIS16 Application Development and Programming using Visual Basic.net
Hello! This presentation is designed to be used with your students to help them join your class and create unique usernames and passwords.
4.1 Strings ASCII & Processing Strings with the Functions
Introduction to TouchDevelop
HOW TO USE CLASS DOCUMENTS (TEACHER)
AP Java Enhancing the Chatbot.
Learning Objectives Explain how selection is used to change a program output Decompose a problem with inputs to help design a program Describe the use.
Joining an eService Class.
Computer Science 2 Hashing.
Joining an eService Class.
Jeff West - Quiz Section 9
Hello! This presentation is designed to be used with your students to help them join your class and create unique usernames and passwords.
Using string type variables
Hello! This presentation is designed to be used with your students to help them join your class and create unique usernames and passwords.
Welcome to the Second Tutorial
Hello! This presentation is designed to be used with your students to help them join your class and create unique usernames and passwords.
Magpie/Chatbot Activity 5
Basic Mr. Husch.
Dry Run Fix it Write a program
Year 8 Computer Science Digital Portfolio
Presentation transcript:

AP Magpie Chatbox "If a computer could think, how could we tell?" Alan Turing's suggestion was, that “if the responses from the computer were indistinguishable from that of a human, the computer could be said to be thinking. “ This field is generally known as natural language processing.

Getting Started ( 5 minutes) From the class website open and read over the document. magpie_lab_student_guide_updated_sept_2014.pdf

Learning Objectives Students will be able to create a Chatbot that employs artificial intelligence.

A couple of useful String Methods int x = stringVar.indexOf(“Hello”); Finds the index of the first occurrence of “Hello” in the String stringVar. Returns -1 if no “Hello” String chop = stringVar.trim(); Returns a copy of the string stored in stringVar with leading and trailing spaces deleted.

Note: 3 Spaces before ‘Hello’ Example: Dry Run Note: 3 Spaces before ‘Hello’

The Loebner Prize in Artificial Intelligence Dr. Loebner pledged a Grand Prize of $100,000 and a Gold Medal (pictured above) for the first computer whose responses were indistinguishable from a human's.

Activity 1: Hands On (10 – 15 minutes) Experiment with the different Chatbots. Look for how they respond and how you might incorporated this into your Chat bot • How does it respond to “where do you come from”? • What is the most interesting response? • What is the most peculiar response? • How does it respond to “asdfghjkl;”? Can you identify keywords to which your chatbot responds? (Record on your worksheet) Think of several keywords and the responses they might cause. (Record on your worksheet) Work with another group and have two different chatbots converse with each other. http://sites.google.com/site/webtoolsbox/bots

Chatbots http://sites.google.com/site/webtoolsbox/bots

Breaking Down a Chatbot Create a folder in your APJava folder called Magpie Project Go to the Assignments\MagpieProject folder and copy ‘activity2’ folder into your Magpie Project folder. Additional parts of this project will be added to the folder as you continue with the project.

Open Magpie2 and MagpieRunner2 Read over the code Magpie2 Constructor Methods What is sent to them? What is returned? MagpieRunner2 What does it do to start? What do you have to enter to quit?

Activity 2: Modify the Chatbot Turn it in as YourNamesChatbot2 • Have it respond “Tell me more about your pets” when the statement contains the word “dog” or “cat.” For example, a possible statement and response would be: Statement: I like my cat Mittens. Response: Tell me more about your pets. • Have it respond favorably when it sees the name of your teacher. Be sure to use appropriate pronouns! For example, a possible statement and response would be: Statement: Mr. Finkelstein is telling us about robotics. Response: He sounds like a good teacher. • Have the code check that the statement has at least one character. You can do this by using the trim method to remove spaces from the beginning and end, and then checking the length of the trimmed string. If there are no characters, the response should tell the user to enter something. For example, a possible statement and response would be: Statement: Response: Say something, please. • Add two more noncommittal responses to the possible random responses. • Pick three more keywords, such as “no” and “brother” and edit the getResponse method to respond to each of these. Enter the three keywords and responses below.