Artificial Intelligence

advertisement
Artificial Intelligence
Heidi Newton
Peter Andreae
2
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
© Peter Andreae
3
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?
© Peter Andreae
4
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
© Peter Andreae
5
Chatterbots
• Which was best?
• Were they any good?
• How could you tell it wasn’t a person?
• What were its limitations?
© Peter Andreae
6
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)
© Peter Andreae
7
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.
© Peter Andreae
8
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
© Peter Andreae
9
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
© Peter Andreae
10
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.
© Peter Andreae
Min Max search for O’s & X’s
11
• Suppose it is O’s turn and the board looks like this
• What should O do?
© Peter Andreae
It’s O’s turn: what should O do?
O’s choices
X’s Choices
lose
lose
lose
O’s choices
win
lose
lose
lose
win
X’s Choices
loselose
lose
lose
lose
Search forwards to explore all the options
© Peter Andreae
It’s O’s turn: what should O do?
O’s choice
X’s Choice
O’s choice
X’s Choice
Work backwards to determine status of earlier positions
X will try to make O lose
© Peter Andreae
It’s O’s turn: what should O do?
O’s choices
X’s Choice
O’s choice
Work backwards to determine status of earlier positions
O will try to win
© Peter Andreae
It’s O’s turn: what should O do?
O’s choice
X’s
Choices
Work backwards to determine status of earlier positions
X will try to make O lose
© Peter Andreae
It’s O’s turn: what should O do?
O’s choice
Work backwards to determine status of earlier positions
O will try to win
© 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)
© Peter Andreae
Black’s turn
0 advantage
+1
+1
+2
© Peter Andreae
Black’s turn
0 advantage
+1
+1
+2
0
© Peter Andreae
Download