Introduc*on to Ar*ficial Intelligence

Introduc)onto
Ar)ficialIntelligence
CS171,Fall2016
Introduc)ontoAr)ficialIntelligence
Prof.AlexanderIhler
Introduc)on
Courseoutline
•  Class:Tues/Thurs3:30-5pm,ELH100
•  Recita)ons:Fri@1,2,3,or4pm
•  Syllabus,etc.onEEE/Canvas
hRps://canvas.eee.uci.edu/courses/3226
–  Syllabussubjecttochange
•  DiscussionforumonPiazza
hRp://piazza.com/uci/fall2016/cs171/home
•  Textbook
–  Russel&Norvig,“AI:Amodernapproach”
•  2ndvs.3rdedi)onissues
People
•  Me:
–  OfficehoursWednesday2-3pm,BH4066
•  TAs:JunkyuLee,BH4099
–  OfficehoursTBD
QiLou,BH4059
–  OfficehoursTBD
Courseoutline
•  Collabora)onOK
•  Grading
–  Op)onalHomeworks(5),notgraded
–  Discussionpar)cipa)on(10%;7of10)
–  Quizzes(20%)
•  Fourin-classquizzes:10/6,10/20,11/15,11/29
–  Project(20%)
•  Connect-KGameAI
•  Teamsof1or2
•  Severalmilestonesthroughquarter;teamsdue9/2
–  Midterm(25%)
•  Inclass,11/1
–  Final(25%)
•  Cumula)ve
•  12/6
Courseoutline
•  FramedaroundthreepillarsofAI
–  Search
–  Logic
–  Learning(seealsoCS178)
•  Project:Games&AdversarialSearch
–  “Connect-K”tournament
–  TournamentDirector:ToluSalako
•  WeeklyQ&Asessions,Wed5-6
WhatisAI?
?
=
?
=
WhatisAI?
WhatisAI?
•  Compe)ngaxesofdefini)ons:
–  Think –  Human-like
v.Act
v.Ra)onal
–  Omennotthesamething
–  Cogni)vescience,economics,…
•  Howtosimulatehumanintellect&behaviorbymachine
–  Mathema)calproblems(puzzles,games,theorems)
–  Common-sensereasoning
–  Expertknowledge(law,medicine)
–  Socialbehavior
–  Web&onlineintelligence
–  Planning,e.g.opera)onsresearch
WhatisAr*ficialIntelligence
(JohnMcCarthy,BasicQues*ons)
• 
• 
Whatisar*ficialintelligence?
Itisthescienceandengineeringofmakingintelligentmachines,especially
intelligentcomputerprograms.Itisrelatedtothesimilartaskofusing
computerstounderstandhumanintelligence,butAIdoesnothaveto
confineitselftomethodsthatarebiologicallyobservable.
• 
• 
Yes,butwhatisintelligence?
Intelligenceisthecomputa)onalpartoftheabilitytoachievegoalsinthe
world.Varyingkindsanddegreesofintelligenceoccurinpeople,many
animalsandsomemachines.
• 
Isn'tthereasoliddefini*onofintelligencethatdoesn'tdependonrela*ng
ittohumanintelligence?
Notyet.Theproblemisthatwecannotyetcharacterizeingeneralwhat
kindsofcomputa)onalprocedureswewanttocallintelligent.We
understandsomeofthemechanismsofintelligenceandnotothers.
• 
• 
Morein:hGp://www-formal.stanford.edu/jmc/wha*sai/node1.html
TheTuringtest
CanMachinethink?A.M.Turing,1950
•  Testrequirescomputerto“passitselfoff”
ashuman
–  Necessary?
–  Sufficient?
•  Requires:
–  Naturallanguage
–  Knowledgerepresenta)on
–  Automatedreasoning
–  Machinelearning
–  (vision,robo)cs)forfulltest
Act/ThinkHumanly/Ra)onally
•  ActHumanly
–  Turingtest
•  ThinkHumanly
–  Introspec)on;Cogni)vescience
•  Thinkra)onally
–  Logic;represen)ng&reasoningoverproblems
•  Ac)ngra)onally
–  Agents;sensing&ac)ng;feedbacksystems
Agents
•  Anagentisanythingthatcanbeviewedas
perceivingitsenvironmentthroughsensorsand
ac)nguponthatenvironmentthroughactuators
•  Humanagent:
–  Sensors:eyes,ears,…
–  Actuators:hands,legs,mouth…
•  Robo)cagent
–  Sensors:cameras,rangefinders,…
–  Actuators:motors
Agentsandenvironments
Compare:StandardEmbeddedSystemStructure
sensors
ADC
microcontroller
ASIC
FPGA
DAC
actuators
Agentsandenvironments
•  Theagentfunc)onmapsfrompercepthistoriesto
ac)ons:
[f:P*àA]
•  Theagentprogramrunsonthephysicalarchitectureto
producef
•  agent=architecture+program
VacuumWorld
•  Percepts:loca)on,contents
–  e.g.,[A,dirty]
•  Ac)ons:{lem,right,vacuum,…}
Ra)onalagents
•  Ra)onalAgent:Foreachpossibleperceptsequence,a
ra)onalagentshouldselectanac)onthatisexpectedto
maximizeitsperformancemeasure,basedonthe
evidenceprovidedbytheperceptsequenceand
whateverbuilt-inknowledgetheagenthas.
•  Performancemeasure:Anobjec)vecriterionforsuccess
ofanagent'sbehavior(“cost”,“reward”,“u)lity”)
•  E.g.,performancemeasureofavacuum-cleaneragent
couldbeamountofdirtcleanedup,amountof)me
taken,amountofelectricityconsumed,amountofnoise
generated,etc.
Ra)onalagents
•  Ra)onalityisdis)nctfromomniscience(all-knowing
withinfiniteknowledge)
•  Agentscanperformac)onsinordertomodifyfuture
perceptssoastoobtainusefulinforma)on(informa)on
gathering,explora)on)
•  Anagentisautonomousifitsbehaviorisdeterminedby
itsownpercepts&experience(withabilitytolearnand
adapt)withoutdependingsolelyonbuild-inknowledge
Taskenvironment
•  Todesignara)onalagent,mustspecifytaskenv.
•  Example:automatedtaxisystem
–  Performancemeasure
“PEAS”
•  Safety,des)na)on,profits,legality,comfort,…
–  Environment
•  Citystreets,freeways;traffic,pedestrians,weather,…
–  Actuators
•  Steering,brakes,accelerator,horn,…
–  Sensors
•  Video,sonar,radar,GPS/naviga)on,keyboard,…
PEAS
•  Example:Agent=Medicaldiagnosissystem
Performancemeasure:Healthypa)ent,minimizecosts,lawsuits
Environment:Pa)ent,hospital,staff
Actuators:Screendisplay(ques)ons,tests,diagnoses,treatments,
referrals)
Sensors:Keyboard(entryofsymptoms,findings,pa)ent's
answers)
PEAS
•  Example:Agent=Part-pickingrobot
•  Performancemeasure:Percentageofpartsincorrectbins
•  Environment:Conveyorbeltwithparts,bins
•  Actuators:Jointedarmandhand
•  Sensors:Camera,jointanglesensors
Environmenttypes
•  Fullyobservable(vs.par)allyobservable):Anagent'ssensorsgive
itaccesstothecompletestateoftheenvironmentateachpoint
in)me.
•  Determinis)c(vs.stochas)c):Thenextstateoftheenvironment
iscompletelydeterminedbythecurrentstateandtheac)on
executedbytheagent.(Iftheenvironmentisdeterminis)c
exceptfortheac)onsofotheragents,thentheenvironmentis
strategic)
•  Episodic(vs.sequen)al):Anagent’sac)onisdividedintoatomic
episodes.Decisionsdonotdependonpreviousdecisions/ac)ons.
Environmenttypes
•  Sta)c(vs.dynamic):Theenvironmentisunchangedwhilean
agentisdelibera)ng.(Theenvironmentissemidynamicifthe
environmentitselfdoesnotchangewiththepassageof)mebut
theagent'sperformancescoredoes)
•  Discrete(vs.con)nuous):Alimitednumberofdis)nct,clearly
definedperceptsandac)ons.
Howdowerepresentorabstractormodeltheworld?
•  Singleagent(vs.mul)-agent):Anagentopera)ngbyitselfinan
environment.Doestheotheragentinterferewithmy
performancemeasure?
task
environm.
observable
determ./
stochastic
episodic/
sequential
static/
dynamic
discrete/
continuous
agents
crossword
puzzle
fully
determ.
sequential
static
discrete
single
chess with
clock
fully
strategic
sequential
semi
discrete
multi
taxi
driving
partial
stochastic
sequential
dynamic
continuous
multi
medical
diagnosis
partial
stochastic
sequential
dynamic
continuous
single
image
analysis
fully
determ.
episodic
semi
continuous
single
partpicking
robot
partial
stochastic
episodic
dynamic
continuous
single
refinery
controller
partial
stochastic
sequential
dynamic
continuous
single
interact.
Eng. tutor
partial
stochastic
sequential
dynamic
discrete
multi
poker
back
gammon
task
environm.
observable
determ./
stochastic
episodic/
sequential
static/
dynamic
discrete/
continuous
agents
crossword
puzzle
fully
determ.
sequential
static
discrete
single
chess with
clock
fully
strategic
sequential
semi
discrete
multi
poker
partial
stochastic
sequential
static
discrete
multi
taxi
driving
partial
stochastic
sequential
dynamic
continuous
multi
medical
diagnosis
partial
stochastic
sequential
dynamic
continuous
single
image
analysis
fully
determ.
episodic
semi
continuous
single
partpicking
robot
partial
stochastic
episodic
dynamic
continuous
single
refinery
controller
partial
stochastic
sequential
dynamic
continuous
single
interact.
Eng. tutor
partial
stochastic
sequential
dynamic
discrete
multi
back
gammon
task
environm.
observable
determ./
stochastic
episodic/
sequential
static/
dynamic
discrete/
continuous
agents
crossword
puzzle
fully
determ.
sequential
static
discrete
single
chess with
clock
fully
strategic
sequential
semi
discrete
multi
poker
partial
stochastic
sequential
static
discrete
multi
back
gammon
fully
stochastic
sequential
static
discrete
multi
taxi
driving
partial
stochastic
sequential
dynamic
continuous
multi
medical
diagnosis
partial
stochastic
sequential
dynamic
continuous
single
image
analysis
fully
determ.
episodic
semi
continuous
single
partpicking
robot
partial
stochastic
episodic
dynamic
continuous
single
refinery
controller
partial
stochastic
sequential
dynamic
continuous
single
interact.
Eng. tutor
partial
stochastic
sequential
dynamic
discrete
multi
Agenttypes
Fivebasictypesinorderofincreasinggenerality:
•  TableDrivenagents
•  Simplereflexagents
•  Model-basedreflexagents
•  Goal-basedagents
•  U)lity-basedagents
TableDrivenAgent.
table lookup
for entire history
current state of decision process
Simplereflexagents
NO MEMORY
Fails if environment
is partially observable
example: vacuum cleaner world
Model-basedreflexagents
description of
current world state
Model the state of the world by:
modeling how the world changes
how its actions change the world
• This can work even with partial information
• It’s is unclear what to do
without a clear goal
Goal-basedagents
Goals provide reason to prefer one action over the other.
We need to predict the future: we need to plan & search
U)lity-basedagents
Some solutions to goal states are better than others.
Which one is best is given by a utility function.
Which combination of goals is preferred?
Learningagents
How does an agent improve over time?
By monitoring it’s performance and suggesting
better modeling, new action rules, etc.
Evaluates
current
world
state
changes
action
rules
suggests
explorations
“old agent”=
model world
and decide on
actions
to be taken
Summary
•  WhatisAr*ficialIntelligence?
–  modelinghumans’thinking,ac)ng,shouldthink,shouldact.
•  Intelligentagents
–  Wewanttobuildagentsthatactra)onally
–  Maximizeexpectedperformancemeasure
•  Taskenvironment–PEAS
–  Yielddesignconstraints
•  Real-WorldApplica*onsofAI
–  AIisintegratedinabroadrangeofproducts&systems
•  Reading
–  Today:Ch.1&2inR&N
–  Fornextweek:Ch.3inR&N(search)