Download intro slides

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
CS 170 INTRO TO ARTIFICIAL INTELLIGENCE
Dr Eamonn Keogh
[email protected]
http://www.cs.ucr.edu/~eamonn/
Office: 323 Surge
Time: 12:40pm-2pm Tuesday/Thursday in SPR 2355
Today (and today only) we will start 5 minutes
late to allow stragglers find the classroom.
(if you need a copy of the textbook, I can put you in touch with someone who wants
to sell her brand new book at half price, stop by my office after class)
Before we begin to learn, the usual
administration trivia…
• There is a class webpage! (Not official till Saturday at 5:00)
• Virtually all notes/overheads/homeworks are already
online.
• Note that there is a small chance that I might change/add
to the material, so you should always make sure that you
have the latest version.
• I recommend that you print out the slides (six to a page) before attending lecture.
• You are obliged to visit the webpage twice a week to
check for announcements, you are 100% responsible for
any announcements made.
Grading
 Midterm Exam: ~ 25%
 Final Exam: ~ 25%
 Homework Assignments: ~ 10%
 Programming Assignments: ~ 30%
• Participation / pop quizzes: ~ 10%
I may give pop quizzes at the beginning of class. If you are more than one second late, you will not be
allowed to take the quiz. You cannot “make up” missed quizzes.
To get participation credit you can… ask meaningful questions in class, point out errors in my slides and
handouts, email me with pointers to interesting websites (that refer to topics discussed in class)…
Homework is due on my desk in the first 15 seconds of the class on the date in question. After 15 seconds
the homework is considered late. You will be penalized 5% for each day you are late.
For all homework and programming projects you are obliged to keep an electronic copy until at least one
week after the final. If requested, you must email me a copy of the file(s) within 48 hours. Failure to produce
the electronic copy will result (at least) in a grade of zero for the assignment in question.
Cheating Policy
Students must read and understand UCR policy on academic
honesty. http://www.cs.ucr.edu/curriculum/acad_honest.html
Note, I am very good at detecting cheating (I have taught classes
on the subject). Anyone caught cheating will given a final grade of
F and may have a letter placed in his or her permanent record.
Students are expected to take care that others cannot “cheat off
them”. For example, if leave your homework on a shared hard
drive or an abandoned floppy and someone else hands it in, you are
liable and will have your grade adjusted downward.
Classroom Behavior
I do not want to hear your beepers/cell phones during class. First
offence will result in the lowering of your final grade by one letter.
Second offence will result in a failing grade and removal from class.
Sending or receiving text messages/email, or using the web while in
class, will result a failing grade.
Chronic lateness (or leaving class early) is unacceptable (it is
disrespectful and disruptive to the instructor and other students). If
you are late once, forget about it. The second time you are late you
should approach me after class to explain why (failing to do so may
result in a 1-percentage point reduction in your grade).
Classroom Attendance
Attendance is optional, you will not be penalized
for not showing up for class. However, it is hard
for me to imagine someone doing well in this
class without regular attendance.
In addition, if you are regularly absent you
should expect the lowest priority for office
hours/ TA help and email replies. Finally, I may
make announcements and or changes in class,
you are responsible for knowing what you
missed.
Office Hours
Office Hours are currently, Friday 10:00am to 12:00am
These hours will almost certainly change, check the webpage
Email/Phones
I strongly prefer that you only email me from your official UCR
email. If you must email me from another account (i.e. a hotmail or
yahoo account) you must state your full name, the last 4 digits of
your student ID, and your official UCR email address.
You must check your UCR email account at least twice week until
one week after the finals. If I send you an email requesting
clarification on some issue, and you do not respond within 4 days, I
will give you zero credit for the material in question.
Think before emailing myself or a TA.
· I don’t like to use phones, never call me unless it is a true
emergency.
What is AI?
“A Steven Spielberg movie that really sucked”
Eamonn Keogh
“The capacity of a digital computer to perform tasks commonly
associated with the higher intellectual processes characteristic of
humans, such as the ability to reason, discover meaning, generalize,
or learn from past experience.”
Encyclopaedia Britannica.
AI is trying to solve by computer any problem that a human can
solve faster/better.
“FOLDOC”
Why study AI? Part I
• Computers with intelligence would have a huge
impact on civilization.
• Unlike faster than light travel or anti gravity
devices, there is strong evidence that AI is
possible.
• AI (along with genetics) is most often cited as
“the field I would most like to be in” by
researchers in other fields.
• Personal motivation. The last big mystery?
Why study AI? Part II
Some people who study AI are only interested in solving problems. Others
reason like this… “I want to study humans, since the most interesting feature of
humans is their intelligence, I will study artificial intelligence to understand true
intelligence”.
This has always struck me as a weak argument. The very earliest attempts at
flight tried to emulate birds by building flying machines that flapped their wings
(ornithopters). Although manned aircraft can hover/carry enormous loads/fly
faster than sound, no manned ornithopter has ever flown.
The plan for the quarter (subject to change)
•Three weeks studying search (exhaustive search, uninformed
search, informed search, adversarial search).
•Two weeks studying machine learning (nearest neighbor and
decision trees classification (possibly neural networks) and
clustering).
•Three weeks studying logic systems (propositional logic, first
order logic, resolution).
• One week advanced topics (possible topics: genetic
algorithms, bayesian networks, similarity, biometrics...).
The Farmer, Wolf, Duck, Corn Problem
Farmer, Wolf, Goat, Cabbage
Farmer, Fox, Chicken, Corn
Farmer Dog, Rabbit, Lettuce
A farmer with his wolf, duck and bag of corn come to the east
side of a river they wish to cross. There is a boat at the rivers
edge, but of course only the farmer can row. The boat can only
hold two things (including the rower) at any one time. If the wolf
is ever left alone with the duck, the wolf will eat it. Similarly if
the duck is ever left alone with the corn, the duck will eat it. How
can the farmer get across the river so that all four arrive safely on
the other side?
The Farmer, Wolf, Duck, Corm problem dates back to the eighth century and
the writings of Alcuin, a poet, educator, cleric, and friend of Charlemagne.
This means that
everybody/everything is
on the same side of the
river.
This means that we
somehow got the Wolf to
the other side.
FWDC
F
DC
W
F WD C
WD C
F
D C
F W
Search Tree for “Farmer, Wolf, Duck, Corn”
W
F
Illegal State
C
D
WD
F
C
F WD C
WD C
F
D C
W
F W
F
F W
C
C
WD
D
F
F WD C
D
Search Tree for “Farmer, Wolf, Duck, Corn”
Illegal State
Repeated State
C
F WD C
WD C
D C
F
W
F W
F
F W
C
WD
D
F
C
C
F WD C
D
W
F
F
C
C
C
D
W
F WD
F W
WD
C
F
D
F
D C
F W
W
D C
F WD
D C
C
F W
D C
D
F WD
F W
F
D
W
WD
C
F WD
C
F
F
C
F W
C
D
C
F W
C
D
W
C
F
D C
D C
W
D
F W
C
F WD C
Search Tree for “Farmer, Wolf, Duck, Corn”
Illegal State
Repeated State
Goal State
F WD C
F WD C
W
F
F W
C
C
D
W
F
Farmer takes duck to left bank
C
Farmer returns alone
C
Farmer takes wolf to left bank
D
C
F WD
F
C
D
F W
D
F WD
D C
F
W
D C
Farmer returns with duck
D
C
Farmer takes corn to left bank
C
Farmer returns alone
W
D
F W
F
D
W
C
F WD C
C
F W
F
D
W
Initial State
F WD C
Farmer takes duck to left bank
Success!
It is no surprise to learn that the technique used to solve
Farmer, Wolf, Duck, Corn can be used to solve other
similar problems...
• Missionaries and Cannibals: (three of each, boat holds 2, if cannibals
outnumber the missionaries they'll eat them).
• Jealous Husbands: three couples, boat holds 2 people at most, no wife
can be left with any man unless her husband is also present.
• U2
has a concert that starts in 17 minutes and they must all cross a bridge to get
there. All four men begin on the same side of the bridge. You must help them across to the
other side. It is night. There is one flashlight. A maximum of two people can cross at one time.
Any party who crosses, either 1 or 2 people, must have the flashlight with them. The flashlight must be
walked back and forth, it cannot be thrown, etc. Each band member walks at a different speed. A pair must
walk together
at the rate of the slower man's pace. Bono takes 1 minute to cross, the Edge takes 2 minutes to cross, Adam takes 5 minutes to cross, and
Larry takes 10 minutes to cross. How can they accomplish the crossing in the allotted time?
What is surprising, is that search can be used to solve
an amazing number of important problems that don’t
appear (at first glance) to be amiable to search...
Sliding Tile Puzzle
You can slide any of the
numbered tiles into the blank
space.
Can you arrange the numbers into
order?
Can you place 8 queens
on a chessboard such
that no piece is
attacking another?
A farm hand was
sent to a nearby
pond to fetch 8
gallons of water. He
was given two pails one 11, the other 6
gallons. How can he
measure the
requested amount of
water?
Find a route from LAX
to the Golden Gate
bridge that minimizes
the driving time, ...that
minimizes the mileage,
...that minimizes the
number of Taco Bells
you must pass.
Which tree shows the correct relationship
between gorilla, chimp and man?
When you have just 3 animals, there are
only three possible trees...
Species
3
10
Number of trees
3
34,459,425
We have seen that the Farmer, Wolf, Duck, Corn can be easily
solved using search. So why spend so much time on a trivial
technique for solving problems?
Farmer, Wolf, Duck, Corn has a small search space!
However, many real world problems have very large (possibly
infinite) search spaces. How do we search a space that has more
states than there are electrons in the universe?
Also Farmer, Wolf, Duck, Corn assumes we have perfect
knowledge (we always know where everything is) and a static
world (the river is not changing, the boat is always the same etc).
However, in many real world problems we do not have perfect
knowledge of the current state of the world, furthermore the
world is changing in ways we cannot predict or control.
That was search…
Now lets preview
Machine Learning….
Examples of class A
Examples of class B
1
1
2
2
3
3
4
4
1) What class is
this object?
2) What class is
this object?
Examples of class A
Examples of class B
1) What class is
this object?
1
1
3
5
4
2.5
2
2
1.5
8
5
5
2
2) What class is
this object?
3
3
6
8
1.5
8
3
4.5
3
4
4
2.5
5
4.5
7
Examples of class A
Examples of class B
1
1
2
2
3
3
4
4
1) What class is
this object?
2) What class is
this object?
Examples of class A
Examples of class B
1
1
2
2
3
3
4
4
1) What class is
this object?
2) What class is
this object?
The “game” we have just been
playing is Supervised Classification,
a sub-field of Machine Learning,
which is itself a sub-field of artificial
intelligence.
Why is it useful?
1) What class is
this person?
Examples of class A
Examples of class B
People who contracted
disease X.
People who are disease free.
Is this person at risk
of getting the
disease?
1
Patient temperature 97
Blood count 0012
Weight 190
Patient temperature 97
Blood count 0118
Weight 280
2
Patient temperature 99
Blood count 0114
Weight 202
3
Patient temperature 98
Blood count 1014
Weight 345
1
Patient temperature 99
Blood count 4214
Weight 167
2
Patient temperature 98
Blood count 3214
Weight 179
3
Patient temperature 97
Blood count 2763
Weight 121
4
Patient temperature 99
Blood count 3234
Weight 117
4
Patient temperature 99
Blood count 1214
Weight 190
2) What class is
this person?
Is this person at risk
of getting the
disease?
Patient temperature 99
Blood count 3452
Weight 99
Machine Learning can be used to learn…
• Who might die of a certain disease
• Which people are likely to default of their credit card loan.
• Which new movies you might enjoy.
• Whether or not this X-ray of a suitcase shows a bomb.
• Which webpages contain pornography.
• What are the likely side effects of this new drug.
• The best way to route an email.
• The most efficient settings for your car’s fuel injector.
• Etc etc
Why is Machine Learning a
hard problem?
Examples of class A
• There might be missing/noisy features.
• There might be irrelevant features.
• The features may be related.
• It might be hard to create a good
representation of the data
• We might “overfit” when learning.
• We might have problems with time/space
complexity.
People who contracted
disease X.
Patients name: Dave Ho
Patient temperature 103
Blood count: unknown
Weight 407
Patients name: Dave Smith
Patient temperature 102
Blood count: 3214
Weight 445
That was Machine Learning …
Now lets preview
Knowledge Representation
Knowledge Representation I
Suppose I tell you that…
•Bob weighs 12 pounds
•Bob likes to chase mice
•Bob is afraid of dogs
…if someone asked you “What is Bob”, what would you say?
Knowledge Representation II
This ability of humans (and to a lesser extent other animals) to be able to take a set of
facts and a set of rules for manipulating facts, then to come up with new facts is at the
heart of intelligence.
This is true at a high level…
• Given a set of facts about physics and math, Einstein was able to come up with a
new fact, E = MC2
…and a low level
• Given a set of facts* about the Accounting Assistant in the CS department, I was
able to come up with the fact that she is married.
* She wears a ring on her left “ring”finger.
Her business card has a last name scratched out and a new name penciled in.
How do we
know if we
have
succeeded?
Alan Turing
1912-54
The Turing Test
?
JUDGE11
PROGRAM?
JUDGE11
PROGRAM?
JUDGE11
PROGRAM?
DO YOU BELIEVE IN GOD
Of course I believe in God, Judge11.
WHAT DO YOU BELIEVE ABOUT HIM
I believe in the Bible.
DO YOU ATTEND CHURCH
No I do not attend church. Do you? I am always on the Web.
….
JUDGE01
PROGRAM?
What on earth do you mean?
Wow! You are interested in astronomy!
….
JUDGE11
PROGRAM?
HOW IS THE FATHER OF ANDY S MOTHER RELATED TO ANDY
Fine as far as I know.
Transcripts from the Loebner 2000 Prize