Upload
howard-nguyen
View
216
Download
0
Embed Size (px)
Citation preview
8/3/2019 lect9_artificialintelligence
1/36
Fall 2007 CS 1:Introductions to Modern Computer Science
Artificial Intelligence (AI)
Professor Adnan Darwiche
[email protected]@cs.ucla.edu
http://cs.ucla.edu/~darwichehttp://cs.ucla.edu/~darwiche
8/3/2019 lect9_artificialintelligence
2/36
What is AI?What is AI?A field of computer science concerned with understanding andA field of computer science concerned with understanding and
building intelligent agents that can:building intelligent agents that can:
PerceivePerceive
UnderstandUnderstand
PredictPredict
ManipulateManipulate
LearnLearn
This is very hard, yet possible, quite useful and a lot of fun!This is very hard, yet possible, quite useful and a lot of fun!
Hardware versus software (internet) agentsHardware versus software (internet) agents
Monolithic approach unnecessary for usefulnessMonolithic approach unnecessary for usefulness
8/3/2019 lect9_artificialintelligence
3/36
What is AI?What is AI?BroadBroad goals of AI are shared with other disciplines,goals of AI are shared with other disciplines,
including philosophy, cognitive science (psychology) andincluding philosophy, cognitive science (psychology) and
neuroscience. Some key distinctions:neuroscience. Some key distinctions:
Understand versus buildUnderstand versus build
Rational versus humanRational versus human--likelike
SpecificSpecific goals of AI are shared with other disciplines,goals of AI are shared with other disciplines,
including linguistics (perception), statistics (learning),including linguistics (perception), statistics (learning),
and mathematical logic (understanding and prediction).and mathematical logic (understanding and prediction).
8/3/2019 lect9_artificialintelligence
4/36
What is AI?What is AI?AI is very old:AI is very old:
Philosophers have been thinking about reasoning, perceptionPhilosophers have been thinking about reasoning, perception
and other mental abil ities for over 2000 yearsand other mental abil ities for over 2000 years
AI is very recent:AI is very recent:
Arti ficial IntelligenceArti ficial Intelligence coined in 1956coined in 1956
Computers as tools for testing theories of intelligenceComputers as tools for testing theories of intelligence
AI is popular:AI is popular:
Largest number of applications to graduate program at UCLALargest number of applications to graduate program at UCLA
Often cited asOften cited as field I would most like to be infield I would most like to be in along withalong with
modern geneticsmodern genetics
8/3/2019 lect9_artificialintelligence
5/36
The Turing TestThe Turing Test Proposed by Alan Turing in 1950 as an operational test of intellProposed by Alan Turing in 1950 as an operational test of intell igence: fool aigence: fool a
human interrogator into believing the agent is a human. To passhuman interrogator into believing the agent is a human. To pass the test, onethe test, one
needs:needs:
Natural language processingNatural language processing
Knowledge representationKnowledge representation
Automated reasoningAutomated reasoning
Machine learningMachine learning
Avoided physical interaction between interrogator and agent (phyAvoided physical interaction between interrogator and agent (phy sical simulationsical simulation
is unnecessary for intelligence), excluding need for:is unnecessary for intelligence), excluding need for:
Computer vis ionComputer vision
RoboticsRobotics
See lecture by Prof.See lecture by Prof. Demetri TerzopoulosDemetri Terzopoulos
8/3/2019 lect9_artificialintelligence
6/36
The Intelligent Agent ArchitectureThe Intelligent Agent Architecture
EmbeddingEnvironment
Knowledge
Reasoning
LearningPerception:
written languagespeechvision
touchmouse click
Action:written language
speech
movementinformation display
8/3/2019 lect9_artificialintelligence
7/36
Knowledge RepresentationKnowledge Representation How do we represent knowledge?How do we represent knowledge?
Factual knowledge (facts)Factual knowledge (facts)
Uncertain knowledge (beliefs)Uncertain knowledge (beliefs)
What knowledge is relevant?What knowledge is relevant?
How do we acquire knowledge?How do we acquire knowledge?
From expertsFrom experts By conversion from other forms of knowledgeBy conversion from other forms of knowledge
By learning from experienceBy learning from experience
8/3/2019 lect9_artificialintelligence
8/36
KR: How do we represent knowledge?KR: How do we represent knowledge?FactsFacts BeliefsBeliefs
Knowledge:
There are four people: Roberta, Thelma, Steve,and Pete.Among them, they hold eight different jobs.
Each holds exactly two jobs.
The jobs are chef, guard, nurse, clerk, police officer(gender not implied), teacher, actor, and boxer.
The job of nurse is held by a male.The husband of the chef is the clerk.Roberta is not a boxer.Pete has no education past the ninth grade.
Roberta, the chef, and the police officer went
golfing together.
Question: Who holds which jobs?
Representations:
Propositional logic
First order logic
First order logic (Implicit versus explicit knowledge):
If HUSBAND(x,jobholder(chef)) then HASAJOB(x,clerk)FEMALE(jobholder(chef))
If HUSBAND(x,y), then MALE(x) and FEMALE(Y)
If HASAJOB(x,nurse) then GREATERTHAN(education(x),9)
Knowledge:
A few weeks after inseminating a cow, we have threepossible tests to confirm pregnancy. The first is ascanning test which has a false positive of 1% and a false
negative of 10%. The second is a blood test, which detects
progesterone with a false positive of 10% and a falsenegative of 30%. The third test is a urine test, which also
detects progesterone with a false positive of 10% and afalse negative of 20%. The probability of a detectableprogesterone level is 90% given pregnancy, and 1% givenno pregnancy. The probability that insemination will
impregnate a cow is 87%.
Question: Whats the belief in pregnancy given a postive
urine test but a negative blood test?
Representations:
Belief networks
Fuzzy logic
8/3/2019 lect9_artificialintelligence
9/36
ReasoningReasoning How can we formalize the reasoning process?How can we formalize the reasoning process?
Deduction: What is implied by a knowledge base?Deduction: What is implied by a knowledge base?
Belief revision: What beliefs to give up in case of a contradictBelief revision: What beliefs to give up in case of a contradict ion?ion?
Causality: What is the cause of an event?Causality: What is the cause of an event?
How can we reason efficiently?How can we reason efficiently?
TimeTime
SpaceSpace
FootprintFootprint
8/3/2019 lect9_artificialintelligence
10/36
Reasoning: Formalizing Belief RevisionReasoning: Formalizing Belief Revision
Oscar used to believe that he had given Victoria a gold ring at their wedding. He had bought their two wedding
rings at a jewelers shop in Casablanca. He thought it was a bargain. The merchant had claimed that the rings
were made of 24 carat gold. They certainly looked like gold, but to be on the safe side Oscar had taken the rings
to the jeweler next door who has testified to their gold content.
However, some time after the wedding, Oscar was repairing his boat and he noticed that the sulfuric acid he
was using stained his ring. He remembered from his school chemistry that the only acid that affected gold wasaqua regia. Somewhat surprised, he verified that Victorias ring was also sustained by the acid.
So Oscar had to revise his beliefs because they entailed an inconsistency. He could not deny that the rings
were stained. He toyed with the idea that, by accident, he had bought aqua regia rather than sulfuric acid, but
he soon gave up this idea. So, because he had greater confidencein what he was taught in chemistry than in
his own smartness, Oscar somewhat downheartedly accepted that the rings were not made of gold after all.
Consequently, he was convinced that both jewelers had been lying. He also came to believe that they were in
collusion with each other, although he was not completely certain of this.
8/3/2019 lect9_artificialintelligence
11/36
Reasoning: Formalizing CausalityReasoning: Formalizing Causality When do we say A caused B?When do we say A caused B?
Needed for explanationNeeded for explanation
Allow us to predict the futureAllow us to predict the future
Suggest ways to control future eventsSuggest ways to control future events
Moral responsibilityMoral responsibility
Legal liabili tyLegal liabili ty
It is not simply sufficiency, nor necessityIt is not simply sufficiency, nor necessity
Billy and Suzy both throw rocks at a bottle. Suzys arm is better than
Billys, so her rock gets to the bottle first and shatters it. Billys throw wasperfectly accurate, so his rock would have shattered the bottle had Suzys
missed. Did Billys throw cause the bottle to shatter? What if both rocks hit
the bottle simultaneously.
8/3/2019 lect9_artificialintelligence
12/36
Gene 1
Gene 2
Gene 3
8/3/2019 lect9_artificialintelligence
13/36
Applications of KR&RApplications of KR&RMedical diagnosisMedical diagnosis
Credit card fraudCredit card fraud
Theorem proving (Mathematics)Theorem proving (Mathematics)
Formal verificationFormal verification
Cognitive tasks: planning, explanation, etcCognitive tasks: planning, explanation, etc
8/3/2019 lect9_artificialintelligence
14/36
The Intelligent Agent ArchitectureThe Intelligent Agent Architecture
Embedding
EnvironmentKnowledge
Reasoning
LearningPerception:
written languagespeechvision
touchmouse click
Action:written language
speech
movementinformation display
8/3/2019 lect9_artificialintelligence
15/36
Natural Language UnderstandingNatural Language UnderstandingUnderstand natural language:Understand natural language:
List all employees that have been working here for more than twoList all employees that have been working here for more than two
years and have not gotten a raise since then.years and have not gotten a raise since then.
Generate natural language:Generate natural language:
There are actually only two such employees, do you just needThere are actually only two such employees, do you just need
their names?their names?
Text summarization:Text summarization:
HereHeres a 100 word abstract of the articles a 100 word abstract of the article
Machine translationMachine translation
Convert text from one language into another.Convert text from one language into another.
8/3/2019 lect9_artificialintelligence
16/36
Natural Language UnderstandingNatural Language UnderstandingWhy is it hard? Context and ambiguity.Why is it hard? Context and ambiguity.
Syntactic ambiguity:Syntactic ambiguity: They are cooking applesThey are cooking apples
Semantic ambiguity:Semantic ambiguity: She ran to the bankShe ran to the bank
Pragmatic ambiguity:Pragmatic ambiguity: Can you open the door?Can you open the door?
Two key approaches:Two key approaches: Classical: Provide the system with rich knowledge of the world,Classical: Provide the system with rich knowledge of the world,
perform thorough syntactic, semantic and pragmatic analysis,perform thorough syntactic, semantic and pragmatic analysis,
disambiguate using knowledge and reasoning.disambiguate using knowledge and reasoning. Modern: Rely on corpus and disambiguate using machineModern: Rely on corpus and disambiguate using machine
learning.learning.
8/3/2019 lect9_artificialintelligence
17/36
Ambiguity and ContextAmbiguity and ContextThey are cooking apples
sentence -> noun phrase , verb phrase
noun phrase -> noun
noun phrase -> determiner , noun
verb phrase -> verb , noun phrase
8/3/2019 lect9_artificialintelligence
18/36
Natural Language Understanding: Web TranslationNatural Language Understanding: Web Translation
8/3/2019 lect9_artificialintelligence
19/36
Natural Language Understanding: Eliza the Chatbot!Natural Language Understanding: Eliza the Chatbot!
Try it: http: //wwwTry it: http: //www--ai.ijs.si/elizaai.ijs.si/eliza--cgicgi --bin/eliza_scriptbin/eliza_script
Adnan: I want to give an introductory lecture on AI.Adnan: I want to give an introductory lecture on AI.
Eliza: Why do you want to give an introductoryEliza: Why do you want to give an introductory
lecture on AI?lecture on AI?
Adnan: Our department chair asked me to.Adnan: Our department chair asked me to.
Eliza: Can you elaborate on that?Eliza: Can you elaborate on that?
Adnan: He says multiple faculty members willAdnan: He says multiple faculty members willcontribute to this class.contribute to this class.
Eliza: Please go on.Eliza: Please go on.
Adnan: I don't think you understood what I just said.Adnan: I don't think you understood what I just said.
Eliza: Why do you not th ink I understood what youEliza: Why do you not th ink I understood what you
just said?just said?
Adnan: Because you seem to be rambling.Adnan: Because you seem to be rambling.
Eliza: Oh, i seem to be rambling.Eliza: Oh, i seem to be rambling.
Adnan: Absolutely.Adnan: Absolutely.
Eliza: Please go on.Eliza: Please go on.
Adnan: I give up!Adnan: I give up!
Eliza: Can you elaborate on that?Eliza: Can you elaborate on that?
Adnan: You just proved my claim.Adnan: You just proved my claim.
Eliza: Why do you say your claim?Eliza: Why do you say your claim?
Adnan: Because I made it.Adnan: Because I made it.
Eliza: Do any other reasons not come to mind?Eliza: Do any other reasons not come to mind?
Adnan: I think the class have gotten the pointAdnan: I think the class have gotten the point
about you by now.about you by now.
Eliza: Do you wish to think the class haveEliza: Do you wish to think the class have
gotten the point about me?gotten the point about me?
Adnan: Yes.Adnan: Yes.
Eliza: Are you sure?Eliza: Are you sure?
..
8/3/2019 lect9_artificialintelligence
20/36
The Intelligent Agent ArchitectureThe Intelligent Agent Architecture
Embedding
EnvironmentKnowledge
Reasoning
LearningPerception:
written languagespeechvision
touchmouse click
Action:written language
speech
movementinformation display
8/3/2019 lect9_artificialintelligence
21/36
Machine LearningMachine Learning
Using experiences and observations to improve future performanceUsing experiences and observations to improve future performance
(actions):(actions):
What aspect of performance to be improved?What aspect of performance to be improved?Irrelevant aspects of the world, how the world evolves, what areIrrelevant aspects of the world, how the world evolves, what are desirable/undesirabledesirable/undesirable
situations.situations.
What feedback is available?What feedback is available?
Supervised, Unsupervised, Reinforcement learning.Supervised, Unsupervised, Reinforcement learning.
How to represent the output of a learning process?How to represent the output of a learning process?
Logical knowledge, Probabilistic knowledge, Neural networks.Logical knowledge, Probabilis tic knowledge, Neural networks.
Supervised: Give observations and actions they should lead toSupervised: Give observations and actions they should lead to Unsupervised: Give observations only (find patterns )Unsupervised: Give observations only (find patterns )
Reinforcement: Give positive/negative feedback on actionsReinforcement: Give positive/negative feedback on actions
8/3/2019 lect9_artificialintelligence
22/36
Supervised Learning: Character RecognitionSupervised Learning: Character Recognition
Neural Networks
8/3/2019 lect9_artificialintelligence
23/36
Unsupervised Learning: Recommender SystemsUnsupervised Learning: Recommender Systems
EE--commercecommerce
Recommend products basedRecommend products based
on previous purchases oron previous purchases or
clickclick--stream behaviorstream behavior
Ex: Amazon.comEx: Amazon.com
Information sitesInformation sites
Rate items based onRate items based on
previous user ratingsprevious user ratings
Ex: MovieLens, JesterEx: MovieLens, Jester
8/3/2019 lect9_artificialintelligence
24/36
JohnJohn 55 -- 33 22
SamSam -- 44 11 55
CindyCindy 33 -- 55 --
BobBob 55 11 3.53.5 1.71.7
LearnedKnowledge
Offline Learning
Reasoning
Unsupervised Learning: Recommender SystemsUnsupervised Learning: Recommender Systems
8/3/2019 lect9_artificialintelligence
25/36
PlanningPlanning Finding a sequence of actions that will achieve a goalFinding a sequence of actions that will achieve a goal
Input:Input:
Actions (preconditions, effects)Actions (preconditions, effects)
Initial, Goal statesInitial, Goal states
Knowledge of world (physics )Knowledge of world (physics)
Output:Output: Plan:Plan:
Conditional (contingency)Conditional (contingency)
Total/PartialTotal/Partial
Sensorless (conformant)Sensorless (conformant)
Autonomous Sciencecraft Experiment:Autonomous Sciencecraft Experiment:
uses onuses on--board science analysis andboard science analysis and
rere--planning to radically increase scienceplanning to radically increase science
return by enabling intelligent downlinkreturn by enabling intelligent downlink
selection and autonomous retargeting.selection and autonomous retargeting.
MultiMulti--Rover Integrated Science UnderstandingRover Integrated Science Understanding
System:System:develops architectures and technologiesdevelops architectures and technologies
for command and control of multifor command and control of multi --rover groupsrover groups
for p lanetary exploration.for p lanetary exploration.
8/3/2019 lect9_artificialintelligence
26/36
NASA: Autonomous Sciencecraft ExperimentNASA: Autonomous Sciencecraft Experiment
Use onboard decisionUse onboard decision--making to detect, analyze, and respond tomaking to detect, analyze, and respond to
science events, and to downlink only the highest value science dscience events, and to downlink only the highest value science data.ata.
Radically increase science return by enabling intelligent downliRadically increase science return by enabling intelligent downlinknk
selection and autonomous retargeting.selection and autonomous retargeting.
AI Technology Used:AI Technology Used:
Image analysisImage analysis
Planning, schedulingPlanning, scheduling
and recoveryand recovery
Mission status updates:Mission status updates:http://wwwhttp://www --aig.jpl.nasa.gov/public/planningaig.jpl.nasa.gov/public/planning
8/3/2019 lect9_artificialintelligence
27/36
RoboticsRobotics
Robots: Physical agents that perform tasks byRobots: Physical agents that perform tasks by
manipulating the world. Equipped with:manipulating the world. Equipped with:
Effectors: legs, wheels, joints, grippersEffectors: legs, wheels, joints, grippers
Sensors: cameras, ultrasound, gyroscopes, accelerometers.Sensors: cameras, ultrasound, gyroscopes, accelerometers.
Common categories of robots:Common categories of robots: Manipulators (robot arms): factory assembly lines, internationalManipulators (robot arms): factory assembly lines, international
space station.space station.
Mobile robots: unmanned land/air/water vehicles, planetaryMobile robots: unmanned land/air/water vehicles, planetaryroversrovers
Mobile robots with manipulators: humanoid (mimic human torso)Mobile robots with manipulators: humanoid (mimic human torso)
8/3/2019 lect9_artificialintelligence
28/36
Robotics: Manipulators in manufacturingRobotics: Manipulators in manufacturing
8/3/2019 lect9_artificialintelligence
29/36
Robotics: HumanoidsRobotics: Humanoidshttp://asimo.honda.com/inside_asimo_movies.asp
8/3/2019 lect9_artificialintelligence
30/36
Robotics: HumanoidsRobotics: Humanoidshttp://asimo.honda.com/inside_asimo_movies.asp
8/3/2019 lect9_artificialintelligence
31/36
Robotics: HumanoidsRobotics: Humanoidshttp://asimo.honda.com/inside_asimo_movies.asp
8/3/2019 lect9_artificialintelligence
32/36
Robotics: DARPA Grand ChallengeRobotics: DARPA Grand Challenge
2004 Challenge:
142 miles from Barstow, California to Primm, Nevada
$1M prize
15 robots qualified, none finished the race
7.4 miles was furthest distance
2005 Challenge:
132 miles in the Mojave desert$2M prize
24 robots qualified, 5 finished the race
Top team: 132 miles in 6 hours, 53 minutes.
8/3/2019 lect9_artificialintelligence
33/36
Robotics: DARPA Grand ChallengeRobotics: DARPA Grand Challenge
8/3/2019 lect9_artificialintelligence
34/36
MS student project at CS/UCLA using LEGOs Mindstorm Kit
Robot connected to a laptop that performs reasoning.
The goal of the robot is to play Mastermind autonomously
with a human player, with the robot trying to break thesecret pattern. The robot must sense the game state,decide its actions, and control the game pieces in real time.
8/3/2019 lect9_artificialintelligence
35/36
Faculty at CS/UCLA doing AIFaculty at CS/UCLA doing AI--related researchrelated research
Adnan DarwicheAdnan Darwiche
Mike DyerMike DyerPetros FaloutsosPetros Faloutsos
Rich KorfRich Korf
Judea PearlJudea Pearl
Stefano SoattoStefano Soatto
Demetri TerzopoulosDemetri Terzopoulos
Song Chun ZhuSong Chun Zhu
8/3/2019 lect9_artificialintelligence
36/36
Thank you!Thank you!