SlideShare a Scribd company logo
1 of 29
Download to read offline
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

More Related Content

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

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-searchTaymoor Nazmy
 
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.pptxYousef Aburawi
 
Artificial Intelligence
Artificial IntelligenceArtificial Intelligence
Artificial IntelligenceJay Nagar
 
Ai lecture 04(unit-02)
Ai lecture  04(unit-02)Ai lecture  04(unit-02)
Ai lecture 04(unit-02)vikas dhakane
 
Ai lecture 06(unit-02)
Ai lecture 06(unit-02)Ai lecture 06(unit-02)
Ai lecture 06(unit-02)vikas dhakane
 
CptS 440 / 540 Artificial Intelligence
CptS 440 / 540 Artificial IntelligenceCptS 440 / 540 Artificial Intelligence
CptS 440 / 540 Artificial Intelligencebutest
 
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-11feb08Praveen 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.uniformedsearchPalGov
 
Artificial Intelligence Searching Techniques
Artificial Intelligence Searching TechniquesArtificial Intelligence Searching Techniques
Artificial Intelligence Searching TechniquesDr. C.V. Suresh Babu
 
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...Asst.prof M.Gokilavani
 
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.pptDr. Naushad Varish
 
3 problem-solving-
3 problem-solving-3 problem-solving-
3 problem-solving-Mhd Sb
 

Similar to 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-
 

More from 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
 

Recently uploaded

Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingNeil Barnes
 
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...Florian Roscheck
 
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一fhwihughh
 
Data Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxData Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxFurkanTasci3
 
Customer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxCustomer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxEmmanuel Dauda
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptxthyngster
 
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024thyngster
 
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort servicejennyeacort
 
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...soniya singh
 
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...Pooja Nehwal
 
9654467111 Call Girls In Munirka Hotel And Home Service
9654467111 Call Girls In Munirka Hotel And Home Service9654467111 Call Girls In Munirka Hotel And Home Service
9654467111 Call Girls In Munirka Hotel And Home ServiceSapana Sha
 
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Jack DiGiovanna
 
How we prevented account sharing with MFA
How we prevented account sharing with MFAHow we prevented account sharing with MFA
How we prevented account sharing with MFAAndrei Kaleshka
 
Predictive Analysis - Using Insight-informed Data to Determine Factors Drivin...
Predictive Analysis - Using Insight-informed Data to Determine Factors Drivin...Predictive Analysis - Using Insight-informed Data to Determine Factors Drivin...
Predictive Analysis - Using Insight-informed Data to Determine Factors Drivin...ThinkInnovation
 
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一F La
 
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfSocial Samosa
 

Recently uploaded (20)

Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data Storytelling
 
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
 
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
 
Data Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxData Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptx
 
Customer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxCustomer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptx
 
E-Commerce Order PredictionShraddha Kamble.pptx
E-Commerce Order PredictionShraddha Kamble.pptxE-Commerce Order PredictionShraddha Kamble.pptx
E-Commerce Order PredictionShraddha Kamble.pptx
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
 
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
 
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
 
Decoding Loan Approval: Predictive Modeling in Action
Decoding Loan Approval: Predictive Modeling in ActionDecoding Loan Approval: Predictive Modeling in Action
Decoding Loan Approval: Predictive Modeling in Action
 
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
 
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
 
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
 
9654467111 Call Girls In Munirka Hotel And Home Service
9654467111 Call Girls In Munirka Hotel And Home Service9654467111 Call Girls In Munirka Hotel And Home Service
9654467111 Call Girls In Munirka Hotel And Home Service
 
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
 
How we prevented account sharing with MFA
How we prevented account sharing with MFAHow we prevented account sharing with MFA
How we prevented account sharing with MFA
 
Predictive Analysis - Using Insight-informed Data to Determine Factors Drivin...
Predictive Analysis - Using Insight-informed Data to Determine Factors Drivin...Predictive Analysis - Using Insight-informed Data to Determine Factors Drivin...
Predictive Analysis - Using Insight-informed Data to Determine Factors Drivin...
 
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
 
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一
 
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
 

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