SlideShare una empresa de Scribd logo
1 de 29
Descargar para leer sin conexión
Instructor: Tamer Elsayed
[Many slides were created by Dan Klein and Pieter Abbeel at UC Berkeley (ai.berkeley.edu)]
Ch 3: 3.1-3.4
 What’s the difference between General AI and Narrow AI?
 What do we mean by “acting rational”?
 What’s the course in one sentence?
 What are the key lessons we can leverage from the brain?
2
 Agents that Plan Ahead
 Search Problems
3
4
 Reflex agents:
 Choose action based on current percept (and maybe memory)
 May have memory or a model of the world’s current state
 Do not consider the future consequences of their actions
 Consider how the world IS
 Can a reflex agent be rational?
5
6
7
 Planning agents:
 Ask “what if”
 Decisions based on (hypothesized) consequences of actions
 Must have a model of how the world evolves in response to actions
 Must formulate a goal (test)
 Consider how the world WOULD BE
 Optimal vs. complete planning
 Planning vs. replanning
8
9
10
11
 A search problem consists of:
 A state space
 A successor function
(with actions, costs)
 A start state and a goal test
 A solution is a sequence of actions (a plan) which transforms the start
state to a goal state.
“N”, 1.0
“E”, 1.0
12
13
 State space:
 Cities
 Successor function:
 Roads: Go to adjacent city with
cost = distance
 Start state:
 Arad
 Goal test:
 Is state == Bucharest?
 Solution?
14
 Problem: Pathing
 States: (x,y) location
 Successor: update location
only
 Goal test: is (x,y)=END
 Problem: Eat-All-Dots
 States: {(x,y), dot booleans}
 Successor: update location
and possibly a dot boolean
 Goal test: dots all false
The world state includes every last detail of the environment
A search state keeps only the details needed for planning (abstraction)
15
 World state:
 Agent positions: 120
 Food count: 30
 Ghost positions: 12
 Agent facing: NSEW
 How many
 World states?
120x(230)x(122)x4
 States for pathing?
120
 States for eat-all-dots?
120x(230)
16
 Problem: eat all dots while keeping the ghosts scared at all times.
 What does the state space have to specify?
 (agent position, dot booleans, power dot booleans, ghost positions, remaining
scared time)
17
18
 State space graph: A mathematical
representation of a search problem
 Nodes are (abstracted) world configurations
 Arcs represent successors (action results)
 The goal test is a set of goal nodes (maybe only one)
 In a state space graph, each state occurs only
once!
 We can rarely build this full graph in memory
(it’s too big), but it’s a useful idea.
19
 State space graph: A mathematical
representation of a search problem
 Nodes are (abstracted) world configurations
 Arcs represent successors (action results)
 The goal test is a set of goal nodes (maybe only one)
 In a state space graph, each state occurs only
once!
 We can rarely build this full graph in memory
(it’s too big), but it’s a useful idea
S
G
d
b
p
q
c
e
h
a
f
r
Tiny state space graph for a tiny
search problem
20
 A search tree:
 A “what if” tree of plans and their outcomes
 The start state is the root node
 Children correspond to successors
 Nodes show states, but correspond to PLANS that achieve those states
 For most problems, we can never actually build the whole tree
“E”, 1.0
“N”, 1.0
This is now / start
Possible futures
21
S
a
b
d p
a
c
e
p
h
f
r
q
q c G
a
q
e
p
h
f
r
q
q c G
a
S
G
d
b
p q
c
e
h
a
f
r
We construct both
on demand – and
we construct as
little as possible.
Each NODE in the
search tree is an
entire PATH in the
state space graph.
Search Tree
State Space Graph
22
S G
b
a
Consider this 4-state graph:
Important: Lots of repeated structure in the search tree!
How big is its search tree (from S)?
s
b
b G a
a
G
a G b G
… …
24
25
26
 Search:
 Expand out potential plans (tree nodes)
 Maintain a fringe of partial plans under consideration
 Try to expand as few tree nodes as possible
27
 Important ideas:
 Fringe
 Expansion
 Exploration strategy
 Main question: which fringe nodes to explore?
28
S
G
d
b
p q
c
e
h
a
f
r
Search Tree In Code
a a p
q
h
f
r
q
c G
a
q
q
p
q
a
S
G
d
b
p q
c
e
h
a
f
r
f
d
e
r
S
d e p
e
h r
f
c G
b c
s
s  d
s  e
s  p
s  d  b
s  d  c
s  d  e
s  d  e  h
s  d  e  r
s  d  e  r  f
s  d  e  r  f  c
s  d  e  r  f  G
30
Search Tree In Code

Más contenido relacionado

Similar a 2.a-CMPS 403-F20-Session 2-Search Problems.pdf

CptS 440 / 540 Artificial Intelligence
CptS 440 / 540 Artificial IntelligenceCptS 440 / 540 Artificial Intelligence
CptS 440 / 540 Artificial Intelligence
butest
 
Cs344 lect15-robotic-knowledge-inferencing-prolog-11feb08
Cs344 lect15-robotic-knowledge-inferencing-prolog-11feb08Cs344 lect15-robotic-knowledge-inferencing-prolog-11feb08
Cs344 lect15-robotic-knowledge-inferencing-prolog-11feb08
Praveen Kumar
 
Jarrar.lecture notes.aai.2011s.ch3.uniformedsearch
Jarrar.lecture notes.aai.2011s.ch3.uniformedsearchJarrar.lecture notes.aai.2011s.ch3.uniformedsearch
Jarrar.lecture notes.aai.2011s.ch3.uniformedsearch
PalGov
 
2.Problems Problem Spaces and Search.ppt
2.Problems Problem Spaces and Search.ppt2.Problems Problem Spaces and Search.ppt
2.Problems Problem Spaces and Search.ppt
Dr. Naushad Varish
 

Similar a 2.a-CMPS 403-F20-Session 2-Search Problems.pdf (20)

Classical Planning
Classical PlanningClassical Planning
Classical Planning
 
Artificial intelligent Lec 3-ai chapter3-search
Artificial intelligent Lec 3-ai chapter3-searchArtificial intelligent Lec 3-ai chapter3-search
Artificial intelligent Lec 3-ai chapter3-search
 
Lecture 2
Lecture 2Lecture 2
Lecture 2
 
AI_03_Solving Problems by Searching.pptx
AI_03_Solving Problems by Searching.pptxAI_03_Solving Problems by Searching.pptx
AI_03_Solving Problems by Searching.pptx
 
Artificial Intelligence
Artificial IntelligenceArtificial Intelligence
Artificial Intelligence
 
Ai lecture 04(unit-02)
Ai lecture  04(unit-02)Ai lecture  04(unit-02)
Ai lecture 04(unit-02)
 
Ai lecture 06(unit-02)
Ai lecture 06(unit-02)Ai lecture 06(unit-02)
Ai lecture 06(unit-02)
 
CptS 440 / 540 Artificial Intelligence
CptS 440 / 540 Artificial IntelligenceCptS 440 / 540 Artificial Intelligence
CptS 440 / 540 Artificial Intelligence
 
state-spaces29Sep06.ppt
state-spaces29Sep06.pptstate-spaces29Sep06.ppt
state-spaces29Sep06.ppt
 
Cs344 lect15-robotic-knowledge-inferencing-prolog-11feb08
Cs344 lect15-robotic-knowledge-inferencing-prolog-11feb08Cs344 lect15-robotic-knowledge-inferencing-prolog-11feb08
Cs344 lect15-robotic-knowledge-inferencing-prolog-11feb08
 
RPT_AI-06_A_Planning Intro.ppt
RPT_AI-06_A_Planning Intro.pptRPT_AI-06_A_Planning Intro.ppt
RPT_AI-06_A_Planning Intro.ppt
 
l2.pptx
l2.pptxl2.pptx
l2.pptx
 
Jarrar.lecture notes.aai.2011s.ch3.uniformedsearch
Jarrar.lecture notes.aai.2011s.ch3.uniformedsearchJarrar.lecture notes.aai.2011s.ch3.uniformedsearch
Jarrar.lecture notes.aai.2011s.ch3.uniformedsearch
 
l2.pptx
l2.pptxl2.pptx
l2.pptx
 
Artificial Intelligence Searching Techniques
Artificial Intelligence Searching TechniquesArtificial Intelligence Searching Techniques
Artificial Intelligence Searching Techniques
 
AI3391 Session 13 searching with Non-Deterministic Actions and partial observ...
AI3391 Session 13 searching with Non-Deterministic Actions and partial observ...AI3391 Session 13 searching with Non-Deterministic Actions and partial observ...
AI3391 Session 13 searching with Non-Deterministic Actions and partial observ...
 
CH4_AI_Lecture.ppt
CH4_AI_Lecture.pptCH4_AI_Lecture.ppt
CH4_AI_Lecture.ppt
 
How Microsoft AI defeated Ms Pacman
How Microsoft AI defeated Ms PacmanHow Microsoft AI defeated Ms Pacman
How Microsoft AI defeated Ms Pacman
 
2.Problems Problem Spaces and Search.ppt
2.Problems Problem Spaces and Search.ppt2.Problems Problem Spaces and Search.ppt
2.Problems Problem Spaces and Search.ppt
 
3 problem-solving-
3 problem-solving-3 problem-solving-
3 problem-solving-
 

Más de AmirMohamedNabilSale (18)

LecccccccccccccProgrammingLecture-09.pdf
LecccccccccccccProgrammingLecture-09.pdfLecccccccccccccProgrammingLecture-09.pdf
LecccccccccccccProgrammingLecture-09.pdf
 
p1.pdf
p1.pdfp1.pdf
p1.pdf
 
9.b-CMPS 403-F20-Session 9-Intro to ML II.pdf
9.b-CMPS 403-F20-Session 9-Intro to ML II.pdf9.b-CMPS 403-F20-Session 9-Intro to ML II.pdf
9.b-CMPS 403-F20-Session 9-Intro to ML II.pdf
 
6.c-CMPS 403-F19-Session 6-Resolution.pdf
6.c-CMPS 403-F19-Session 6-Resolution.pdf6.c-CMPS 403-F19-Session 6-Resolution.pdf
6.c-CMPS 403-F19-Session 6-Resolution.pdf
 
3.b-CMPS 403-F20-Session 3-Solving CSP I.pdf
3.b-CMPS 403-F20-Session 3-Solving CSP I.pdf3.b-CMPS 403-F20-Session 3-Solving CSP I.pdf
3.b-CMPS 403-F20-Session 3-Solving CSP I.pdf
 
LectureNote2.pdf
LectureNote2.pdfLectureNote2.pdf
LectureNote2.pdf
 
Lecture_1_matrix_operations.pdf
Lecture_1_matrix_operations.pdfLecture_1_matrix_operations.pdf
Lecture_1_matrix_operations.pdf
 
ML_1.pdf
ML_1.pdfML_1.pdf
ML_1.pdf
 
232021-211025052822.pdf
232021-211025052822.pdf232021-211025052822.pdf
232021-211025052822.pdf
 
9a52019-211025074532.pdf
9a52019-211025074532.pdf9a52019-211025074532.pdf
9a52019-211025074532.pdf
 
random-211016153637.pdf
random-211016153637.pdfrandom-211016153637.pdf
random-211016153637.pdf
 
Linux.pdf
Linux.pdfLinux.pdf
Linux.pdf
 
Linux_Commands.pdf
Linux_Commands.pdfLinux_Commands.pdf
Linux_Commands.pdf
 
AI in covid 19 (1).pptx
AI in covid 19 (1).pptxAI in covid 19 (1).pptx
AI in covid 19 (1).pptx
 
COVID-19 PowerPoint.pptx
COVID-19 PowerPoint.pptxCOVID-19 PowerPoint.pptx
COVID-19 PowerPoint.pptx
 
Edu week2022.pptx
Edu week2022.pptxEdu week2022.pptx
Edu week2022.pptx
 
ML_DT.pdf
ML_DT.pdfML_DT.pdf
ML_DT.pdf
 
2.pdf
2.pdf2.pdf
2.pdf
 

Último

Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
amitlee9823
 
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
amitlee9823
 
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
amitlee9823
 
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
only4webmaster01
 
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get CytotecAbortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Riyadh +966572737505 get cytotec
 
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
amitlee9823
 
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
amitlee9823
 
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
amitlee9823
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdf
MarinCaroMartnezBerg
 
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 

Último (20)

Halmar dropshipping via API with DroFx
Halmar  dropshipping  via API with DroFxHalmar  dropshipping  via API with DroFx
Halmar dropshipping via API with DroFx
 
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
 
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
 
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
 
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
 
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get CytotecAbortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
 
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
 
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
 
Week-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interactionWeek-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interaction
 
Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdfAccredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
 
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
 
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
 
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 nightCheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdf
 
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptx
 
April 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's AnalysisApril 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's Analysis
 
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
 
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
 
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort ServiceBDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
 

2.a-CMPS 403-F20-Session 2-Search Problems.pdf

  • 1. Instructor: Tamer Elsayed [Many slides were created by Dan Klein and Pieter Abbeel at UC Berkeley (ai.berkeley.edu)] Ch 3: 3.1-3.4
  • 2.  What’s the difference between General AI and Narrow AI?  What do we mean by “acting rational”?  What’s the course in one sentence?  What are the key lessons we can leverage from the brain? 2
  • 3.  Agents that Plan Ahead  Search Problems 3
  • 4. 4
  • 5.  Reflex agents:  Choose action based on current percept (and maybe memory)  May have memory or a model of the world’s current state  Do not consider the future consequences of their actions  Consider how the world IS  Can a reflex agent be rational? 5
  • 6. 6
  • 7. 7
  • 8.  Planning agents:  Ask “what if”  Decisions based on (hypothesized) consequences of actions  Must have a model of how the world evolves in response to actions  Must formulate a goal (test)  Consider how the world WOULD BE  Optimal vs. complete planning  Planning vs. replanning 8
  • 9. 9
  • 10. 10
  • 11. 11
  • 12.  A search problem consists of:  A state space  A successor function (with actions, costs)  A start state and a goal test  A solution is a sequence of actions (a plan) which transforms the start state to a goal state. “N”, 1.0 “E”, 1.0 12
  • 13. 13
  • 14.  State space:  Cities  Successor function:  Roads: Go to adjacent city with cost = distance  Start state:  Arad  Goal test:  Is state == Bucharest?  Solution? 14
  • 15.  Problem: Pathing  States: (x,y) location  Successor: update location only  Goal test: is (x,y)=END  Problem: Eat-All-Dots  States: {(x,y), dot booleans}  Successor: update location and possibly a dot boolean  Goal test: dots all false The world state includes every last detail of the environment A search state keeps only the details needed for planning (abstraction) 15
  • 16.  World state:  Agent positions: 120  Food count: 30  Ghost positions: 12  Agent facing: NSEW  How many  World states? 120x(230)x(122)x4  States for pathing? 120  States for eat-all-dots? 120x(230) 16
  • 17.  Problem: eat all dots while keeping the ghosts scared at all times.  What does the state space have to specify?  (agent position, dot booleans, power dot booleans, ghost positions, remaining scared time) 17
  • 18. 18
  • 19.  State space graph: A mathematical representation of a search problem  Nodes are (abstracted) world configurations  Arcs represent successors (action results)  The goal test is a set of goal nodes (maybe only one)  In a state space graph, each state occurs only once!  We can rarely build this full graph in memory (it’s too big), but it’s a useful idea. 19
  • 20.  State space graph: A mathematical representation of a search problem  Nodes are (abstracted) world configurations  Arcs represent successors (action results)  The goal test is a set of goal nodes (maybe only one)  In a state space graph, each state occurs only once!  We can rarely build this full graph in memory (it’s too big), but it’s a useful idea S G d b p q c e h a f r Tiny state space graph for a tiny search problem 20
  • 21.  A search tree:  A “what if” tree of plans and their outcomes  The start state is the root node  Children correspond to successors  Nodes show states, but correspond to PLANS that achieve those states  For most problems, we can never actually build the whole tree “E”, 1.0 “N”, 1.0 This is now / start Possible futures 21
  • 22. S a b d p a c e p h f r q q c G a q e p h f r q q c G a S G d b p q c e h a f r We construct both on demand – and we construct as little as possible. Each NODE in the search tree is an entire PATH in the state space graph. Search Tree State Space Graph 22
  • 23. S G b a Consider this 4-state graph: Important: Lots of repeated structure in the search tree! How big is its search tree (from S)? s b b G a a G a G b G … … 24
  • 24. 25
  • 25. 26
  • 26.  Search:  Expand out potential plans (tree nodes)  Maintain a fringe of partial plans under consideration  Try to expand as few tree nodes as possible 27
  • 27.  Important ideas:  Fringe  Expansion  Exploration strategy  Main question: which fringe nodes to explore? 28
  • 29. a a p q h f r q c G a q q p q a S G d b p q c e h a f r f d e r S d e p e h r f c G b c s s  d s  e s  p s  d  b s  d  c s  d  e s  d  e  h s  d  e  r s  d  e  r  f s  d  e  r  f  c s  d  e  r  f  G 30 Search Tree In Code