SlideShare a Scribd company logo
1 of 52
Download to read offline
OBJECT AUTOMATION
Introduction to AI Search
Algorithms
Agents
o Perceiving its environment through sensors and acting
upon that environment through actuators
Agent
?
Sensors
Actuators
Environment
Percepts
Actions
https://inst.eecs.berkeley.edu/~cs188/su20/
Agents
o Percept: Agent’s perceptual inputs at any given instant
o Percept Sequence: History of all perceptions
o Agent’s choice of action at any given instant can depend on
the entire percept sequence of observed to date
o An agent function describes agent behavior and is a
mapping from given percept sequence to a given action
The Structures of Agent
o Till now, we discussed about agent behavior
o How behavior is implemented?
o agent = architecture + program
o Input: Current percept, and agent function
Simple Reflex Agents
o Select actions base on the current
percept
o Simple reflex behaviors occur
even in more complex
environments
o Condition action rule
o if car-in-front-is-braking then
initiate-braking
https://inst.eecs.berkeley.edu/~cs188/su20/
Model based Reflex Agents
https://inst.eecs.berkeley.edu/~cs188/su20/
Problem-solving Agents
o The process of looking for a sequence of actions that
reaches the goal is called search
o A search algorithm takes a problem as input and
returns a solution in the form of an action sequence
o Execution phase: Recommended actions are carried
out
o Formulate, search, and execute
Travelling in Romania
https://inst.eecs.berkeley.edu/~cs188/su20/
Travelling in Romania
State space:
Cities
Successor function:
Roads: Go to adjacent city with
cost = distance
Start state:
Arad
Goal test:
Is state == Bucharest?
Solution?
State Space Graphs
o State space graph: A mathematical
representation of a search problem
o Nodes are (abstracted) world configurations
o Arcs represent successors (action results)
o The goal test is a set of goal nodes (maybe
only one)
o In a state space graph, each state occurs
only once!
o We can rarely build this full graph in
memory (it’s too big), but it’s a useful
idea
https://inst.eecs.berkeley.edu/~cs188/su20/
State Space Graphs
o State space graph: A mathematical
representation of a search problem
o Nodes are (abstracted) world configurations
o Arcs represent successors (action results)
o The goal test is a set of goal nodes (maybe
only one)
o In a state space graph, each state occurs
only once!
o 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
https://inst.eecs.berkeley.edu/~cs188/su20/
Search Trees
o A search tree:
o A “what if” tree of plans and their outcomes
o The start state is the root node
o Children correspond to successors
o Nodes show states, but correspond to PLANS that achieve those states
o For most problems, we can never actually build the whole tree
“E”, 1.0
“N”, 1.0
This is now / start
Possible futures
https://inst.eecs.berkeley.edu/~cs188/su20/
State Space Graphs vs. Search Trees
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 in the
search tree is an entire
PATH in the state space
graph.
Search Tree
State Space Graph
https://inst.eecs.berkeley.edu/~cs188/su20/
Quiz: State Space Graphs vs. Search Trees
S G
b
a
Consider this 4-state graph: How big is its search tree (from S)?
https://inst.eecs.berkeley.edu/~cs188/su20/
Quiz: State Space Graphs vs. Search Trees
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
… …
https://inst.eecs.berkeley.edu/~cs188/su20/
Tree Search
https://inst.eecs.berkeley.edu/~cs188/su20/
Search Example: Romania
https://inst.eecs.berkeley.edu/~cs188/su20/
Searching with a Search Tree
o Search:
o Expand out potential plans (tree nodes)
o Maintain a fringe of partial plans under
consideration
o Try to expand as few tree nodes as possible
https://inst.eecs.berkeley.edu/~cs188/su20/
General Tree Search
o Important ideas:
o Fringe
o Expansion
o Exploration strategy
o Main question: which fringe nodes to
explore?
Example: Tree Search
S
G
d
b
p q
c
e
h
a
f
r
https://inst.eecs.berkeley.edu/~cs188/su20/
Example: Tree Search
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
https://inst.eecs.berkeley.edu/~cs188/su20/
Depth-First Search
https://inst.eecs.berkeley.edu/~cs188/su20/
Depth-First Search
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
q
p
h
f
d
b
a
c
e
r
Strategy: expand a deepest
node first
Implementation: Fringe is a
LIFO stack
https://inst.eecs.berkeley.edu/~cs188/su20/
Breadth-First Search
https://inst.eecs.berkeley.edu/~cs188/su20/
Breadth-First Search
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
Search
Tiers
Strategy: expand a shallowest
node first
Implementation: Fringe is a
FIFO queue
https://inst.eecs.berkeley.edu/~cs188/su20/
Quiz: DFS vs BFS
https://inst.eecs.berkeley.edu/~cs188/su20/
Uniform Cost Search
https://inst.eecs.berkeley.edu/~cs188/su20/
Uniform Cost Search
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
Strategy: expand a cheapest node
first:
Fringe is a priority queue (priority:
cumulative cost)
S
G
d
b
p q
c
e
h
a
f
r
3 9 1
16
4
11
5
7
13
8
10
11
17 11
0
6
3
9
1
1
2
8
8
2
15
1
2
Cost
contours
2
https://inst.eecs.berkeley.edu/~cs188/su20/
Informed Search
https://inst.eecs.berkeley.edu/~cs188/su20/
Search Heuristics
▪ A heuristic is:
▪ A function that estimates how close a state is to a goal
▪ Designed for a particular search problem
▪ Examples: Manhattan distance, Euclidean distance for
pathing
10
5
11.2
https://inst.eecs.berkeley.edu/~cs188/su20/
Example: Heuristic Function
h(x)
https://inst.eecs.berkeley.edu/~cs188/su20/
Greedy Search
https://inst.eecs.berkeley.edu/~cs188/su20/
Example: Heuristic Function
h(x)
Greedy Search
o Expand the node that seems closest…
o What can go wrong?
https://inst.eecs.berkeley.edu/~cs188/su20/
A* Search
https://inst.eecs.berkeley.edu/~cs188/su20/
Combining UCS and Greedy
o Uniform-cost orders by path cost, or backward cost g(n)
o Greedy orders by goal proximity, or forward cost h(n)
o A* Search orders by the sum: f(n) = g(n) + h(n)
S a d
b
G
h=5
h=6
h=2
1
8
1
1
2
h=6
h=0
c
h=7
3
e h=1
1
Example: Teg Grenager
S
a
b
c
e
d
d
G
G
g = 0
h=6
g = 1
h=5
g = 2
h=6
g = 3
h=7
g = 4
h=2
g = 6
h=0
g = 9
h=1
g = 10
h=2
g = 12
h=0
https://inst.eecs.berkeley.edu/~cs188/su20/
When should A* terminate?
o Should we stop when we enqueue a goal?
o No: only stop when we dequeue a goal
S
B
A
G
2
3
2
2
h = 1
h = 2
h = 0
h = 3
https://inst.eecs.berkeley.edu/~cs188/su20/
Is A* Optimal?
o What went wrong?
o Actual bad goal cost < estimated good goal cost
o We need estimates to be less than actual costs!
A
G
S
1 3
h = 6
h = 0
5
h = 7
https://inst.eecs.berkeley.edu/~cs188/su20/
Admissible Heuristics
Idea: Admissibility
Inadmissible (pessimistic) heuristics break
optimality by trapping good plans on the
fringe
Admissible (optimistic) heuristics slow down
bad plans but never outweigh true costs
https://inst.eecs.berkeley.edu/~cs188/su20/
Admissible Heuristics
o A heuristic h is admissible (optimistic) if:
where is the true cost to a nearest goal
o Examples:
o Coming up with admissible heuristics is most of what’s
involved in using A* in practice.
15
A* Applications
o Video games
o Pathing / routing problems
o Resource planning problems
o Robot motion planning
o Language analysis
o …
https://inst.eecs.berkeley.edu/~cs188/su20/
A*: Summary
o A* uses both backward costs and (estimates of) forward
costs
o A* is optimal with admissible / consistent heuristics
o Heuristic design is key: often use relaxed problems
https://inst.eecs.berkeley.edu/~cs188/su20/
Good Behavior: The Concept of Rationality
o A rational agent – One does the right thing
o What is right thing?
o Consider the consequences of the agent behavior
o Agent’s action depends on the perception
o The sequence of agents’ action triggers different environment
states
o If the sequences are desirable, then performance is better
Good Behavior: The Concept of Rationality
o Can we define success in our own opinions?
o No fixed performance measure for all agents and tasks
o Let us assume that for vacuum cleaner, performance
measure is the amount of dirt cleaned
o How a rational agent can perform?
o Can we have reward?
o It is better to design performance measures according to
what one actually wants in the environment, rather than
according to how one thinks the agent should behave
Good Behavior: The Concept of Rationality
o Rationality depends on
o The performance measure that defines the criterion of success
o The agent’s prior knowledge of the environment
o The actions that the agent can perform
o The agent’s percept sequence to date
o For each possible percept sequence, a rational agent should
select an action that is expected to maximize its
performance measure, given the evidence provided by the
percept sequence and whatever built-in knowledge the
agent has.
Omniscience, learning, and autonomy
o What is the difference between rationality and omniscience?
o An omniscient agent knows the actual outcome of its
actions and can act accordingly
o Rationality maximizes expected performance, while
perfection maximizes actual performance
o Rationality does not require omniscience. Why?
Omniscience, learning, and autonomy
o If an agent does not look both ways before crossing a busy
road, then its percept sequence will not tell it that there is a
large truck approaching at high speed
o Is it OK to cross road?
Omniscience, learning, and autonomy
o It would not be rational to cross the road given this
uninformative percept sequence
o A rational agent should choose the “looking” action before
stepping into the street
o Doing actions in order to modify future
percepts—sometimes called information gathering
o A rational agent not only to gather information but also to
learn as much as possible from what it perceives.
Omniscience, learning, and autonomy
o In a priori environment, agent need not learn, but need to
act correctly
o An agent relies on the prior knowledge of its designer
rather than on its own percepts, we say that the agent lacks
autonomy
o A rational agent should be autonomous—it should learn
what it can to compensate for partial or incorrect prior
knowledge
Omniscience, learning, and autonomy
o After sufficient experience of its environment, the behavior
of a rational agent can become effectively independent of its
prior knowledge

More Related Content

Similar to Searching and Sorting Algorithms-An Introduction from Object Automation

Google Assistant po polsku - developerski punkt widzenia
Google Assistant po polsku - developerski punkt widzeniaGoogle Assistant po polsku - developerski punkt widzenia
Google Assistant po polsku - developerski punkt widzeniaArtur Skowroński
 
Reducing Resistance: Deployment as Surface
Reducing Resistance: Deployment as SurfaceReducing Resistance: Deployment as Surface
Reducing Resistance: Deployment as SurfaceJeffrey Hulten
 
Touch Drive - A touch-based multi-function controller for autonomous driving
Touch Drive - A touch-based multi-function controller for autonomous drivingTouch Drive - A touch-based multi-function controller for autonomous driving
Touch Drive - A touch-based multi-function controller for autonomous drivingJuntima Nawilaijaroen
 
EA Benefits Realization in a Digital World
EA Benefits Realization in a Digital WorldEA Benefits Realization in a Digital World
EA Benefits Realization in a Digital WorldKaine Ugwu
 
Computational Thinking & STEM = PBL in action
Computational Thinking & STEM = PBL in actionComputational Thinking & STEM = PBL in action
Computational Thinking & STEM = PBL in actionSusan S. Wells
 
Assigned to assist: Robots are not here to take your job (Industry)
Assigned to assist: Robots are not here to take your job (Industry)Assigned to assist: Robots are not here to take your job (Industry)
Assigned to assist: Robots are not here to take your job (Industry)Gestalt Robotics
 
chapter2.pptx
chapter2.pptxchapter2.pptx
chapter2.pptxjpradha86
 
Survey results
Survey resultsSurvey results
Survey resultssundarny
 
ResearchGate - How do 'Social Networks for Scientists' Affect Libraries?
ResearchGate - How do 'Social Networks for Scientists' Affect Libraries?ResearchGate - How do 'Social Networks for Scientists' Affect Libraries?
ResearchGate - How do 'Social Networks for Scientists' Affect Libraries?Keita Bando
 
Architecting your IT career
Architecting your IT careerArchitecting your IT career
Architecting your IT careerJohn Mark Troyer
 
Getting UX Buy-in in an Enterprise Landscape
Getting UX Buy-in in an Enterprise LandscapeGetting UX Buy-in in an Enterprise Landscape
Getting UX Buy-in in an Enterprise Landscaperyngrn
 
Rosa Cano_openexpo2018_sin_texto
Rosa Cano_openexpo2018_sin_textoRosa Cano_openexpo2018_sin_texto
Rosa Cano_openexpo2018_sin_textoRosa Cano
 
How SEO Insight Reveals The Content We Need - SEOday.dk January 2018
How SEO Insight Reveals The Content We Need  - SEOday.dk January 2018How SEO Insight Reveals The Content We Need  - SEOday.dk January 2018
How SEO Insight Reveals The Content We Need - SEOday.dk January 2018Charlie Williams
 
Faster! Faster! Accelerate your business with blazing prototypes
Faster! Faster! Accelerate your business with blazing prototypesFaster! Faster! Accelerate your business with blazing prototypes
Faster! Faster! Accelerate your business with blazing prototypesOSCON Byrum
 
Design for Startups
Design for StartupsDesign for Startups
Design for StartupsPek Pongpaet
 

Similar to Searching and Sorting Algorithms-An Introduction from Object Automation (20)

Google Assistant po polsku - developerski punkt widzenia
Google Assistant po polsku - developerski punkt widzeniaGoogle Assistant po polsku - developerski punkt widzenia
Google Assistant po polsku - developerski punkt widzenia
 
Reducing Resistance: Deployment as Surface
Reducing Resistance: Deployment as SurfaceReducing Resistance: Deployment as Surface
Reducing Resistance: Deployment as Surface
 
Touch Drive - A touch-based multi-function controller for autonomous driving
Touch Drive - A touch-based multi-function controller for autonomous drivingTouch Drive - A touch-based multi-function controller for autonomous driving
Touch Drive - A touch-based multi-function controller for autonomous driving
 
EA Benefits Realization in a Digital World
EA Benefits Realization in a Digital WorldEA Benefits Realization in a Digital World
EA Benefits Realization in a Digital World
 
Computational Thinking & STEM = PBL in action
Computational Thinking & STEM = PBL in actionComputational Thinking & STEM = PBL in action
Computational Thinking & STEM = PBL in action
 
Assigned to assist: Robots are not here to take your job (Industry)
Assigned to assist: Robots are not here to take your job (Industry)Assigned to assist: Robots are not here to take your job (Industry)
Assigned to assist: Robots are not here to take your job (Industry)
 
AI PPT-2.pptx
AI PPT-2.pptxAI PPT-2.pptx
AI PPT-2.pptx
 
Agile and Scrum Methodology
Agile and Scrum MethodologyAgile and Scrum Methodology
Agile and Scrum Methodology
 
chapter2.pptx
chapter2.pptxchapter2.pptx
chapter2.pptx
 
Survey results
Survey resultsSurvey results
Survey results
 
DevOps introduction
DevOps introductionDevOps introduction
DevOps introduction
 
ResearchGate - How do 'Social Networks for Scientists' Affect Libraries?
ResearchGate - How do 'Social Networks for Scientists' Affect Libraries?ResearchGate - How do 'Social Networks for Scientists' Affect Libraries?
ResearchGate - How do 'Social Networks for Scientists' Affect Libraries?
 
Architecting your IT career
Architecting your IT careerArchitecting your IT career
Architecting your IT career
 
Getting UX Buy-in in an Enterprise Landscape
Getting UX Buy-in in an Enterprise LandscapeGetting UX Buy-in in an Enterprise Landscape
Getting UX Buy-in in an Enterprise Landscape
 
Rosa Cano_openexpo2018_sin_texto
Rosa Cano_openexpo2018_sin_textoRosa Cano_openexpo2018_sin_texto
Rosa Cano_openexpo2018_sin_texto
 
cofaso Presentation
cofaso Presentationcofaso Presentation
cofaso Presentation
 
How SEO Insight Reveals The Content We Need - SEOday.dk January 2018
How SEO Insight Reveals The Content We Need  - SEOday.dk January 2018How SEO Insight Reveals The Content We Need  - SEOday.dk January 2018
How SEO Insight Reveals The Content We Need - SEOday.dk January 2018
 
Atlanta Airport
Atlanta AirportAtlanta Airport
Atlanta Airport
 
Faster! Faster! Accelerate your business with blazing prototypes
Faster! Faster! Accelerate your business with blazing prototypesFaster! Faster! Accelerate your business with blazing prototypes
Faster! Faster! Accelerate your business with blazing prototypes
 
Design for Startups
Design for StartupsDesign for Startups
Design for Startups
 

More from Object Automation

RTL DESIGN IN ML WORLD_OBJECT AUTOMATION Inc
RTL DESIGN IN ML WORLD_OBJECT AUTOMATION IncRTL DESIGN IN ML WORLD_OBJECT AUTOMATION Inc
RTL DESIGN IN ML WORLD_OBJECT AUTOMATION IncObject Automation
 
CHIPS Alliance_Object Automation Inc_workshop
CHIPS Alliance_Object Automation Inc_workshopCHIPS Alliance_Object Automation Inc_workshop
CHIPS Alliance_Object Automation Inc_workshopObject Automation
 
RTL Design Methodologies_Object Automation Inc
RTL Design Methodologies_Object Automation IncRTL Design Methodologies_Object Automation Inc
RTL Design Methodologies_Object Automation IncObject Automation
 
High-Level Synthesis for the Design of AI Chips
High-Level Synthesis for the Design of AI ChipsHigh-Level Synthesis for the Design of AI Chips
High-Level Synthesis for the Design of AI ChipsObject Automation
 
AI-Inspired IOT Chiplets and 3D Heterogeneous Integration
AI-Inspired IOT Chiplets and 3D Heterogeneous IntegrationAI-Inspired IOT Chiplets and 3D Heterogeneous Integration
AI-Inspired IOT Chiplets and 3D Heterogeneous IntegrationObject Automation
 
GenAI and AI GCC State of AI_Object Automation Inc
GenAI and AI GCC State of AI_Object Automation IncGenAI and AI GCC State of AI_Object Automation Inc
GenAI and AI GCC State of AI_Object Automation IncObject Automation
 
CDAC presentation as part of Global AI Festival and Future
CDAC presentation as part of Global AI Festival and FutureCDAC presentation as part of Global AI Festival and Future
CDAC presentation as part of Global AI Festival and FutureObject Automation
 
Global AI Festivla and Future one day event
Global AI Festivla and Future one day eventGlobal AI Festivla and Future one day event
Global AI Festivla and Future one day eventObject Automation
 
Generative AI In Logistics_Object Automation
Generative AI In Logistics_Object AutomationGenerative AI In Logistics_Object Automation
Generative AI In Logistics_Object AutomationObject Automation
 
Gen AI_Object Automation_TechnologyWorkshop
Gen AI_Object Automation_TechnologyWorkshopGen AI_Object Automation_TechnologyWorkshop
Gen AI_Object Automation_TechnologyWorkshopObject Automation
 
Deploying Pretrained Model In Edge IoT Devices.pdf
Deploying Pretrained Model In Edge IoT Devices.pdfDeploying Pretrained Model In Edge IoT Devices.pdf
Deploying Pretrained Model In Edge IoT Devices.pdfObject Automation
 
AI-INSPIRED IOT CHIPLETS AND 3D HETEROGENEOUS INTEGRATION.pdf
AI-INSPIRED IOT CHIPLETS AND 3D HETEROGENEOUS INTEGRATION.pdfAI-INSPIRED IOT CHIPLETS AND 3D HETEROGENEOUS INTEGRATION.pdf
AI-INSPIRED IOT CHIPLETS AND 3D HETEROGENEOUS INTEGRATION.pdfObject Automation
 
5G Edge Computing_Object Automation workshop
5G Edge Computing_Object Automation workshop5G Edge Computing_Object Automation workshop
5G Edge Computing_Object Automation workshopObject Automation
 
Course_Object Automation.pdf
Course_Object Automation.pdfCourse_Object Automation.pdf
Course_Object Automation.pdfObject Automation
 

More from Object Automation (20)

RTL DESIGN IN ML WORLD_OBJECT AUTOMATION Inc
RTL DESIGN IN ML WORLD_OBJECT AUTOMATION IncRTL DESIGN IN ML WORLD_OBJECT AUTOMATION Inc
RTL DESIGN IN ML WORLD_OBJECT AUTOMATION Inc
 
CHIPS Alliance_Object Automation Inc_workshop
CHIPS Alliance_Object Automation Inc_workshopCHIPS Alliance_Object Automation Inc_workshop
CHIPS Alliance_Object Automation Inc_workshop
 
RTL Design Methodologies_Object Automation Inc
RTL Design Methodologies_Object Automation IncRTL Design Methodologies_Object Automation Inc
RTL Design Methodologies_Object Automation Inc
 
High-Level Synthesis for the Design of AI Chips
High-Level Synthesis for the Design of AI ChipsHigh-Level Synthesis for the Design of AI Chips
High-Level Synthesis for the Design of AI Chips
 
AI-Inspired IOT Chiplets and 3D Heterogeneous Integration
AI-Inspired IOT Chiplets and 3D Heterogeneous IntegrationAI-Inspired IOT Chiplets and 3D Heterogeneous Integration
AI-Inspired IOT Chiplets and 3D Heterogeneous Integration
 
GenAI and AI GCC State of AI_Object Automation Inc
GenAI and AI GCC State of AI_Object Automation IncGenAI and AI GCC State of AI_Object Automation Inc
GenAI and AI GCC State of AI_Object Automation Inc
 
CDAC presentation as part of Global AI Festival and Future
CDAC presentation as part of Global AI Festival and FutureCDAC presentation as part of Global AI Festival and Future
CDAC presentation as part of Global AI Festival and Future
 
Global AI Festivla and Future one day event
Global AI Festivla and Future one day eventGlobal AI Festivla and Future one day event
Global AI Festivla and Future one day event
 
Generative AI In Logistics_Object Automation
Generative AI In Logistics_Object AutomationGenerative AI In Logistics_Object Automation
Generative AI In Logistics_Object Automation
 
Gen AI_Object Automation_TechnologyWorkshop
Gen AI_Object Automation_TechnologyWorkshopGen AI_Object Automation_TechnologyWorkshop
Gen AI_Object Automation_TechnologyWorkshop
 
Deploying Pretrained Model In Edge IoT Devices.pdf
Deploying Pretrained Model In Edge IoT Devices.pdfDeploying Pretrained Model In Edge IoT Devices.pdf
Deploying Pretrained Model In Edge IoT Devices.pdf
 
AI-INSPIRED IOT CHIPLETS AND 3D HETEROGENEOUS INTEGRATION.pdf
AI-INSPIRED IOT CHIPLETS AND 3D HETEROGENEOUS INTEGRATION.pdfAI-INSPIRED IOT CHIPLETS AND 3D HETEROGENEOUS INTEGRATION.pdf
AI-INSPIRED IOT CHIPLETS AND 3D HETEROGENEOUS INTEGRATION.pdf
 
5G Edge Computing_Object Automation workshop
5G Edge Computing_Object Automation workshop5G Edge Computing_Object Automation workshop
5G Edge Computing_Object Automation workshop
 
COE AI Lab Universities
COE AI Lab UniversitiesCOE AI Lab Universities
COE AI Lab Universities
 
Bootcamp_AIApps.pdf
Bootcamp_AIApps.pdfBootcamp_AIApps.pdf
Bootcamp_AIApps.pdf
 
Bootcamp_AIApps.pdf
Bootcamp_AIApps.pdfBootcamp_AIApps.pdf
Bootcamp_AIApps.pdf
 
Bootcamp_AIAppsUCSD.pptx
Bootcamp_AIAppsUCSD.pptxBootcamp_AIAppsUCSD.pptx
Bootcamp_AIAppsUCSD.pptx
 
Course_Object Automation.pdf
Course_Object Automation.pdfCourse_Object Automation.pdf
Course_Object Automation.pdf
 
Enterprise AI_New.pdf
Enterprise AI_New.pdfEnterprise AI_New.pdf
Enterprise AI_New.pdf
 
Super AI tools
Super AI toolsSuper AI tools
Super AI tools
 

Recently uploaded

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 

Recently uploaded (20)

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 

Searching and Sorting Algorithms-An Introduction from Object Automation

  • 1. OBJECT AUTOMATION Introduction to AI Search Algorithms
  • 2. Agents o Perceiving its environment through sensors and acting upon that environment through actuators Agent ? Sensors Actuators Environment Percepts Actions https://inst.eecs.berkeley.edu/~cs188/su20/
  • 3. Agents o Percept: Agent’s perceptual inputs at any given instant o Percept Sequence: History of all perceptions o Agent’s choice of action at any given instant can depend on the entire percept sequence of observed to date o An agent function describes agent behavior and is a mapping from given percept sequence to a given action
  • 4. The Structures of Agent o Till now, we discussed about agent behavior o How behavior is implemented? o agent = architecture + program o Input: Current percept, and agent function
  • 5. Simple Reflex Agents o Select actions base on the current percept o Simple reflex behaviors occur even in more complex environments o Condition action rule o if car-in-front-is-braking then initiate-braking https://inst.eecs.berkeley.edu/~cs188/su20/
  • 6. Model based Reflex Agents https://inst.eecs.berkeley.edu/~cs188/su20/
  • 7. Problem-solving Agents o The process of looking for a sequence of actions that reaches the goal is called search o A search algorithm takes a problem as input and returns a solution in the form of an action sequence o Execution phase: Recommended actions are carried out o Formulate, search, and execute
  • 9. Travelling in Romania State space: Cities Successor function: Roads: Go to adjacent city with cost = distance Start state: Arad Goal test: Is state == Bucharest? Solution?
  • 10. State Space Graphs o State space graph: A mathematical representation of a search problem o Nodes are (abstracted) world configurations o Arcs represent successors (action results) o The goal test is a set of goal nodes (maybe only one) o In a state space graph, each state occurs only once! o We can rarely build this full graph in memory (it’s too big), but it’s a useful idea https://inst.eecs.berkeley.edu/~cs188/su20/
  • 11. State Space Graphs o State space graph: A mathematical representation of a search problem o Nodes are (abstracted) world configurations o Arcs represent successors (action results) o The goal test is a set of goal nodes (maybe only one) o In a state space graph, each state occurs only once! o 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 https://inst.eecs.berkeley.edu/~cs188/su20/
  • 12. Search Trees o A search tree: o A “what if” tree of plans and their outcomes o The start state is the root node o Children correspond to successors o Nodes show states, but correspond to PLANS that achieve those states o For most problems, we can never actually build the whole tree “E”, 1.0 “N”, 1.0 This is now / start Possible futures https://inst.eecs.berkeley.edu/~cs188/su20/
  • 13. State Space Graphs vs. Search Trees 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 in the search tree is an entire PATH in the state space graph. Search Tree State Space Graph https://inst.eecs.berkeley.edu/~cs188/su20/
  • 14. Quiz: State Space Graphs vs. Search Trees S G b a Consider this 4-state graph: How big is its search tree (from S)? https://inst.eecs.berkeley.edu/~cs188/su20/
  • 15. Quiz: State Space Graphs vs. Search Trees 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 … … https://inst.eecs.berkeley.edu/~cs188/su20/
  • 18. Searching with a Search Tree o Search: o Expand out potential plans (tree nodes) o Maintain a fringe of partial plans under consideration o Try to expand as few tree nodes as possible https://inst.eecs.berkeley.edu/~cs188/su20/
  • 19. General Tree Search o Important ideas: o Fringe o Expansion o Exploration strategy o Main question: which fringe nodes to explore?
  • 20. Example: Tree Search S G d b p q c e h a f r https://inst.eecs.berkeley.edu/~cs188/su20/
  • 21. Example: Tree Search 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 https://inst.eecs.berkeley.edu/~cs188/su20/
  • 23. Depth-First Search 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 q p h f d b a c e r Strategy: expand a deepest node first Implementation: Fringe is a LIFO stack https://inst.eecs.berkeley.edu/~cs188/su20/
  • 25. Breadth-First Search 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 Search Tiers Strategy: expand a shallowest node first Implementation: Fringe is a FIFO queue https://inst.eecs.berkeley.edu/~cs188/su20/
  • 26. Quiz: DFS vs BFS https://inst.eecs.berkeley.edu/~cs188/su20/
  • 28. Uniform Cost Search 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 Strategy: expand a cheapest node first: Fringe is a priority queue (priority: cumulative cost) S G d b p q c e h a f r 3 9 1 16 4 11 5 7 13 8 10 11 17 11 0 6 3 9 1 1 2 8 8 2 15 1 2 Cost contours 2 https://inst.eecs.berkeley.edu/~cs188/su20/
  • 30. Search Heuristics ▪ A heuristic is: ▪ A function that estimates how close a state is to a goal ▪ Designed for a particular search problem ▪ Examples: Manhattan distance, Euclidean distance for pathing 10 5 11.2 https://inst.eecs.berkeley.edu/~cs188/su20/
  • 34. Greedy Search o Expand the node that seems closest… o What can go wrong? https://inst.eecs.berkeley.edu/~cs188/su20/
  • 36. Combining UCS and Greedy o Uniform-cost orders by path cost, or backward cost g(n) o Greedy orders by goal proximity, or forward cost h(n) o A* Search orders by the sum: f(n) = g(n) + h(n) S a d b G h=5 h=6 h=2 1 8 1 1 2 h=6 h=0 c h=7 3 e h=1 1 Example: Teg Grenager S a b c e d d G G g = 0 h=6 g = 1 h=5 g = 2 h=6 g = 3 h=7 g = 4 h=2 g = 6 h=0 g = 9 h=1 g = 10 h=2 g = 12 h=0 https://inst.eecs.berkeley.edu/~cs188/su20/
  • 37. When should A* terminate? o Should we stop when we enqueue a goal? o No: only stop when we dequeue a goal S B A G 2 3 2 2 h = 1 h = 2 h = 0 h = 3 https://inst.eecs.berkeley.edu/~cs188/su20/
  • 38. Is A* Optimal? o What went wrong? o Actual bad goal cost < estimated good goal cost o We need estimates to be less than actual costs! A G S 1 3 h = 6 h = 0 5 h = 7 https://inst.eecs.berkeley.edu/~cs188/su20/
  • 40. Idea: Admissibility Inadmissible (pessimistic) heuristics break optimality by trapping good plans on the fringe Admissible (optimistic) heuristics slow down bad plans but never outweigh true costs https://inst.eecs.berkeley.edu/~cs188/su20/
  • 41. Admissible Heuristics o A heuristic h is admissible (optimistic) if: where is the true cost to a nearest goal o Examples: o Coming up with admissible heuristics is most of what’s involved in using A* in practice. 15
  • 42. A* Applications o Video games o Pathing / routing problems o Resource planning problems o Robot motion planning o Language analysis o … https://inst.eecs.berkeley.edu/~cs188/su20/
  • 43. A*: Summary o A* uses both backward costs and (estimates of) forward costs o A* is optimal with admissible / consistent heuristics o Heuristic design is key: often use relaxed problems https://inst.eecs.berkeley.edu/~cs188/su20/
  • 44.
  • 45. Good Behavior: The Concept of Rationality o A rational agent – One does the right thing o What is right thing? o Consider the consequences of the agent behavior o Agent’s action depends on the perception o The sequence of agents’ action triggers different environment states o If the sequences are desirable, then performance is better
  • 46. Good Behavior: The Concept of Rationality o Can we define success in our own opinions? o No fixed performance measure for all agents and tasks o Let us assume that for vacuum cleaner, performance measure is the amount of dirt cleaned o How a rational agent can perform? o Can we have reward? o It is better to design performance measures according to what one actually wants in the environment, rather than according to how one thinks the agent should behave
  • 47. Good Behavior: The Concept of Rationality o Rationality depends on o The performance measure that defines the criterion of success o The agent’s prior knowledge of the environment o The actions that the agent can perform o The agent’s percept sequence to date o For each possible percept sequence, a rational agent should select an action that is expected to maximize its performance measure, given the evidence provided by the percept sequence and whatever built-in knowledge the agent has.
  • 48. Omniscience, learning, and autonomy o What is the difference between rationality and omniscience? o An omniscient agent knows the actual outcome of its actions and can act accordingly o Rationality maximizes expected performance, while perfection maximizes actual performance o Rationality does not require omniscience. Why?
  • 49. Omniscience, learning, and autonomy o If an agent does not look both ways before crossing a busy road, then its percept sequence will not tell it that there is a large truck approaching at high speed o Is it OK to cross road?
  • 50. Omniscience, learning, and autonomy o It would not be rational to cross the road given this uninformative percept sequence o A rational agent should choose the “looking” action before stepping into the street o Doing actions in order to modify future percepts—sometimes called information gathering o A rational agent not only to gather information but also to learn as much as possible from what it perceives.
  • 51. Omniscience, learning, and autonomy o In a priori environment, agent need not learn, but need to act correctly o An agent relies on the prior knowledge of its designer rather than on its own percepts, we say that the agent lacks autonomy o A rational agent should be autonomous—it should learn what it can to compensate for partial or incorrect prior knowledge
  • 52. Omniscience, learning, and autonomy o After sufficient experience of its environment, the behavior of a rational agent can become effectively independent of its prior knowledge