Upload
april-caldwell
View
215
Download
1
Tags:
Embed Size (px)
Citation preview
II. Intelligent agents
1. Rational agent
2. Agent & its environment
3. Example: a simple agent
4. Rationality?
5. Task environment:A. PEAS
B. Properties of the task environment
6. Agent properties
Rational Agent: Generalities
• We seek agent with best performance for given capabilities:– function from percept history to action:
f: P* -> Af: P* -> A
– environment(s) + task(s)– computational limitations: given machine
resources
Rationality – complete def.
• For each possible percept sequence & For each possible percept sequence & task in a given environment, a rational task in a given environment, a rational agent should select an action that is agent should select an action that is expected to expected to maximize its performance maximize its performance measuremeasure, given the evidence provided by , given the evidence provided by the percept sequence, its resources, its the percept sequence, its resources, its performance measure and whatever built-performance measure and whatever built-in knowledge the agent has.in knowledge the agent has.
Test: Is the agent rational?Test: Is the agent rational?
A.- environment + what is known about the environment?B.- task + what is known about the given task?C.- machine resources + what is known about the given
machine resources?D.- percept sequence + what is known about the precept
sequence up to date?E.- agent actionsF.- is there a performance measure?G.- After the questions above are answered, we have to
check if the performance measure is maximized
Conclusion agents
• Agent is ‘something’ that perceives & acts in an environment.– Extra exercise: find alternative definitions!
• A Rational Agent acts so that it maximizes the performance measure.
• A task environment includes: performance measure, external env., actuators, sensors.
• Basic agent program design: reflex, model/ goal/ utility –based, learning agents
Homework 2 – part I
1. Develop a PEAS description for an automatic bus (e.g., Phileas) a chess playing robot (e.g, Deep Blue) and your own agent; give the proprieties of the task environment for each; select a suitable agent design.
2. Define a rational agent in a limited, closed world, as you will be using for your project, and show that it is rational (use the complete definition of rationality defined in C2 and the rationality test).
Outline
II. Intelligent agents
III. Search1. Uninformed
2. InformedA. Heuristic
B. Local
C. Online
3. Constraints satisfaction
Search applications
• Obvious:– Finding Olympic Games schedule on the Web.– Finding the cheapest trip between here and Tokyo.– A robot navigating an environment strewn with
obstacles.– A web-crawler indexing web pages
• Less Obvious:– Playing Chess– Job Shop Scheduling– Planning a party
Search ingredients
• nodesnodes : locations
• arcsarcs : connections between nodes– directeddirected : only be traversed in one direction
• netnet or graphgraph : collection of arcs & nodes– treetree : if node has unique parent (w one
exception)– rootroot : exception; has no parents
Search
– If we want to search through this graph from S to F this graph can be viewed as a tree.
L
S
O
P Q
F
M
N F
F
F
L
S
O
P
Q
F
M
N
General search
• Offline, simulated exploration of state-space
• Generating successors of already explored states (expanding)
General search example
Arad
Zerind Sibiu Timisoara
Arad Oradea Fagarash RamnicuValcea
Sibiu Bucharest
Strategy characteristics• order node expansion =?
• parameters:– Completeness: solution?
– Optimality: best solution? – Complexity:
• Time: max no. steps to solution
• Space: nodes in memo
• parameters of complexity computation:– bb: max branching factor of search tree
– dd: depth of least-cost solution
– mm: max depth of state space
Arad Oradea Arad
Breadth-first example
Arad
Zerind Sibiu Timisoara
Oradea Fagarash RamnicuValcea Arad Lugoj
Arad Oradea Arad
Breadth-first example
Arad
Zerind Sibiu Timisoara
Oradea Fagarash RamnicuValcea
SibiuBucharest
Arad Lugoj
ZerindSibiu
Timisoara
ZerindSibiu
ZerindSibiu
Timisoara
ZerindSibiu
Sibiu
CraiovaPitesti
ZerindSibiu
Timisoara
Timisoara
Mehadia
Proprieties of breadth-first search
• Complete?Complete?
• Time?Time?
• Space?Space?
• Optimal?Optimal?
Proprieties of breadth-first search
• Complete?Complete? Yes (if: b, d finite)
• Time?Time? O(bd+1)
• Space?Space? O(bd+1)
• Optimal?Optimal? Yes (if: b, d finite & cost/step=1)
• Problem: space!!
Iterative deepening search
• Depth first search with growing depth
ll = allowed maximal depth in tree
Proprieties of iterative deepening search
• Complete?Complete? Yes (b,d finite)
• Time?Time? (d+1) + db + (d-1)b2 + …+ bd = O(bd)
• Space?Space? O(bd)
• Optimal?Optimal? Yes (b,d finite & cost/step=1)
Homework 2 – part II
3. Compute the proprieties of the depth-first search (completeness, time -, space complexity, optimality). Hint: some of the memory can be freed after usage.