Heidi Newton Peter Andreae Artificial Intelligence.

19
Heidi Newton Peter Andreae Artificial Intelligence

Transcript of Heidi Newton Peter Andreae Artificial Intelligence.

Page 1: Heidi Newton Peter Andreae Artificial Intelligence.

Heidi Newton Peter Andreae

Artificial Intelligence

Page 2: Heidi Newton Peter Andreae Artificial Intelligence.

© Peter Andreae

Overview

Talk about three of the topics from the online book

• AI with language: Chatterbots

• AI for selling stuff: Association rules

• AI for games: Basic game search

2

Page 3: Heidi Newton Peter Andreae Artificial Intelligence.

© Peter Andreae

AI with language• Using language is one of the distinguishing features

of human intelligence.• Making computers use language well is hard! • We have not solved this problem yet

• Would it be useful to have computers that could use human language? Where?

3

Page 4: Heidi Newton Peter Andreae Artificial Intelligence.

© Peter Andreae

Chatterbots• What are they?

• general vs domain specific• fixed vs learning

Let’s try some:

• Eliza: • http://nlp-addiction.com/eliza/

• ALICE:• http://www.pandorabots.com/pandora/talk?

botid=f5d922d97e345aa1

• Cleverbot: • http://www.cleverbot.com/

Work in pairs, chat with them, try at least two bots

4

Page 5: Heidi Newton Peter Andreae Artificial Intelligence.

© Peter Andreae

Chatterbots• Which was best?

• Were they any good?

• How could you tell it wasn’t a person?

• What were its limitations?

5

Page 6: Heidi Newton Peter Andreae Artificial Intelligence.

© Peter Andreae

Turing Test• Turing test: the most famous test for successful

artificial intelligence• Based on computers using language

• A Human and a Computer, each try to convince a judge that they are the human, communicating only over a typed chat session

• If the judge is fooled, then the computer must be intelligent.

• Book describes an activity for students to run a Turing test using one of the chatterbots• (not time for us to do it here)

6

Page 7: Heidi Newton Peter Andreae Artificial Intelligence.

© Peter Andreae

2. Association Rules• What does Amazon (and many online retailers) do

when you click on an item?

• How do supermarkets decide where to place items?

• Note: Recommender Systems are closely related.

7

Page 8: Heidi Newton Peter Andreae Artificial Intelligence.

© Peter Andreae

Association Rule Learning• Machine learning algorithms look for patterns in

purchasing data.• If 30% of the people who buy an LED torch also buy

rechargable batteries, then• Whenever a person selects an LED torch, suggest that

they might want to buy rechargable batteries.• Should you recommend torches if they buy batteries?

• If 20% of people who buy corn chips also buy salsa dip, then• put salsa dip on a shelf near the corn chips to increase

sales

• If 80% of the people who buy milk also buy bread, then• put them on opposite sides of the store to make people

pass by as many other shelves as possible

8

Page 9: Heidi Newton Peter Andreae Artificial Intelligence.

© Peter Andreae

Association Rule Learning• How do you find the associations?

• How do you tell if they are “strong enough”

• We are planning an activity for the book involving searching for associations in supermarket reciepts

9

Page 10: Heidi Newton Peter Andreae Artificial Intelligence.

© Peter Andreae

3. AI for games• Lots of different applications of AI in games

• Games were part of AI research from the beginning

• Modern computer games need even more AI.

• Min-Max search is a basic AI game playing strategy

• Applicable to 2-person board games

• Fundamental to the AI chess playing systems (eg Deep Blue)

• Paper and pencil activities to explore this.

10

Page 11: Heidi Newton Peter Andreae Artificial Intelligence.

© Peter Andreae

Min Max search for O’s & X’s• Suppose it is O’s turn and the board looks like this

• What should O do?

11

Page 12: Heidi Newton Peter Andreae Artificial Intelligence.

© Peter Andreae

O’s choices

O’s choices

X’s Choices

X’s Choiceswin

lose loselose

lose lose lose loselose lose lose lose

win

It’s O’s turn: what should O do?

Search forwards to explore all the options

Page 13: Heidi Newton Peter Andreae Artificial Intelligence.

© Peter Andreae

O’s choice

O’s choice

X’s Choice

X’s Choice

It’s O’s turn: what should O do?

Work backwards to determine status of earlier positionsX will try to make O lose

Page 14: Heidi Newton Peter Andreae Artificial Intelligence.

© Peter Andreae

O’s choices

O’s choice

X’s Choice

It’s O’s turn: what should O do?

Work backwards to determine status of earlier positionsO will try to win

Page 15: Heidi Newton Peter Andreae Artificial Intelligence.

© Peter Andreae

O’s choice

X’s Choices

It’s O’s turn: what should O do?

Work backwards to determine status of earlier positionsX will try to make O lose

Page 16: Heidi Newton Peter Andreae Artificial Intelligence.

© Peter Andreae

O’s choice

It’s O’s turn: what should O do?

Work backwards to determine status of earlier positionsO will try to win

Page 17: Heidi Newton Peter Andreae Artificial Intelligence.

© Peter Andreae

More Min Max Search• What happens if you can’t search all the way to the

end?• Have to stop and measure how good the board looks.

• Eg, a piece count• Work backwards with the

• minimum score (for opponent’s turn)• maximum score (for player’s turn)

Page 18: Heidi Newton Peter Andreae Artificial Intelligence.

© Peter Andreae

Black’s turn

0 advantage

+1 +1 +2

Page 19: Heidi Newton Peter Andreae Artificial Intelligence.

© Peter Andreae

Black’s turn

0 advantage

+1 +1 +2

0