artificial intelligence [intelligent agents paradigm]
DESCRIPTION
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]. PROBLEM SOLVING BY SEARCHING. Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information Technology Institute of Applied Computer Systems Department of Systems Theory and Design - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/1.jpg)
ARTIFICIAL INTELLIGENCE[INTELLIGENT AGENTS PARADIGM]
Professor Janis Grundspenkis
Riga Technical University
Faculty of Computer Science and Information Technology
Institute of Applied Computer Systems
Department of Systems Theory and Design
E-mail: [email protected]
PROBLEM SOLVING BY SEARCHING
![Page 2: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/2.jpg)
Problem Solving by Searching (1)
• Problem Solving Agent(one kind of a Goal-Based Agent)
–Relevant feature:Decision making what to do by finding sequence of actions that leads to desired states
![Page 3: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/3.jpg)
Problem Solving by Searching (2)
• How problem is solved?Step 1. Goal formulationStep 2. Problem formulation – a process of
deciding what actions and states to considerStep 3. Search – systematic exploration of the
sequence of alternative states that appear in a problem solving process
Step 4. Solution – an action sequenceStep 5. Execution – recommended actions can
be accomplished
![Page 4: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/4.jpg)
Simple-Problem-Solving Agent
> PerceptUpdate-State(state, percept)
> GoalFormulate-Goal(state)
> ProblemsFormulate-Problem(state, goal)
> Current stateSearch(problem)
> ActionRecommendation(state, action)
Return: action
![Page 5: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/5.jpg)
Problem Types (1)
• Single-state problem– Percepts give enough information to tell
exactly which state is it
– Agent knows exactly what each of its actions does
– Agent can calculate exactly which state it will be in after any sequence of actions
![Page 6: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/6.jpg)
Problem Types (2)
• Multiple-state problem– Percepts give not enough information to
tell which state is it
– Agent knows all the effects of its actions
– Agent must reason about sets of states that it might get to
![Page 7: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/7.jpg)
Basic Elements of a Problem Definition
• A problem is a collection of information that the agent can use to decide what to do
• Information specification for single-state problem definition
Basic elements:– States– Actions
![Page 8: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/8.jpg)
State Space of the Problem
• State space is the set of all states reachable from the initial state by any sequence of actions– The initial state is the state that the agent
knows itself to be in– The goal state corresponds to the solution of
the problem– The operator describes an action in terms of
which state will be reached by carrying out the action in a particular state
![Page 9: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/9.jpg)
State Space Representation of the Problem Using Graph
• The nodes of a graph corresponds to particular problem solution states
• The arcs correspond to steps in a problem-solving process
• Initial states form root of the graph and correspond to the given information in a problem instance
• Goal states of the problem corresponds to the solutions to a problem instance
![Page 10: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/10.jpg)
Formal State Space Representation of the Problem (1)
• A state space is represented by a four-tuple
[N, A, IS, GS], where
N is the set of nodes or states of the graph
A is the set of arcs between nodes
![Page 11: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/11.jpg)
Formal State Space Representation of the Problem (2)
• A state space is represented by a four-tuple
[N, A, IS, GS], where
IS is the non-empty set that contains the initial states of the problem
(IS N)
GS is the non-empty set that contains the goal states of the problem
(GS N)
![Page 12: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/12.jpg)
Testing the Goal States
• Agent can apply the goal test to a single-state description to determine if it is a goal state
• Description of the goal states:– Explicit set of possible goal states– A measurable property of the states
encountered in the search– A property of the path developed in the
search
![Page 13: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/13.jpg)
Paths in the State Space
• Each path that does reach the goal is called a complete path
• Each path that does no reach the goal is called a partial path
• A solution path is a complete path through the graph from a node in IS to a node in GS
• A path cost function g is a function that assigns a cost to a path
• The cost of a path is the sum of the costs of the individual actions along the path
![Page 14: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/14.jpg)
Measuring Problem-Solving Performance
• Three ways to measure the effectiveness of a search:– Does a search find a solution at all?– Is a solution good (one with a low path cost)?– What is the search cost associated with the
time and memory required to find a solution?
• The total cost of the search:Total cost = Path cost + Search
cost
![Page 15: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/15.jpg)
Searching for Solutions (1)
• Search process builds up a search tree (subgraph of the state space)
• Search starts from the search node that corresponds to the initial state (the root of the search tree)
• Determining the children of a state is called expanding the state
![Page 16: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/16.jpg)
Searching for Solutions (2)
• At each step, the search algorithm chooses one leaf node to expand– Leaf nodes have not successors
(children)Two cases:• They have not been expanded• They were expanded, but generated the
empty set
• Nodes that are waiting to be expanded are called a frontier
![Page 17: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/17.jpg)
Search Algorithms for Agents
• INPUT: instances of data type PROBLEM
• OUTPUT: solution path• Data type PROBLEM has four
components:– Initial state– Operators– Goal test– Path cost function
![Page 18: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/18.jpg)
Distinction Between Nodes and States
• A node is a data structure used to represent the search tree for a particular problem instance as generated by a particular problem
• A state represents a configuration of the world and is characterized by a set of features
![Page 19: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/19.jpg)
Data Structure for Search Trees
• Node v is data structure with five components:– The corresponding state in the state space– The node that generates node v (the parent
node)– The operator that was applied to generate v– The depth of the node v (the number of
nodes on the path from the search node to v)– The path cost of the path from the search
node to v
![Page 20: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/20.jpg)
Classification of Search Strategies (1)
If available information is specified:• Uninformed Search (Blind Search)
No information is available about:• the number of steps• the path cost
from the current state to the goal
• Informed Search (Heuristic Search)Problem-specific knowledge is used
![Page 21: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/21.jpg)
Classification of Search Strategies (2)
If the search direction is specified:• Data-Driven Search (Forward
Chaining)– Search starts from the node(s) representing
the given facts of the problem, applies operators to produce new nodes that lead to a goal
– Searching forwards means generating successors successively starting from the initial (root) node
![Page 22: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/22.jpg)
Classification of Search Strategies (3)
If the search direction is specified:• Goal-Driven Search (Backward
Chaining)– Search starts from the goal, applies operators
that could produce the goal, and chains backward to the given facts of the problem
– Searching backwards means generating predecessors successively starting from the goal node
![Page 23: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/23.jpg)
Classification of Search Strategies (4)
If the order in which nodes are expanded is specified:
• Breadth-First Search• Uniform Cost Search• Depth-First Search• Depth-Limited Search• Iterative Deepening
Search• Bidirectional Search
UninformedSearch
![Page 24: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/24.jpg)
Classification of Search Strategies (5)
If the order in which nodes are expanded is specified:
• Best-First Search
– Greedy Search (minimizing theestimate cost to reach the goal)
– A* Search (minimizing the totalpath cost)
InformedSearch
![Page 25: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/25.jpg)
Classification of Search Strategies (6)
If the order in which nodes are expanded is specified:
• Memory Bounded Search
– IDA* Search (IterativeDeepening A* search)
– SMA* Search (SimplifiedMemory-Bounded A*)
InformedSearch
![Page 26: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/26.jpg)
Classification of Search Strategies (7)
If the order in which nodes are expanded is specified:
• Iterative ImprovementAlgorithms
– Hill-Climbing Search
– Random-Restart Hill-Climbing
– Simulated Annealing
– Beam Search
InformedSearch
![Page 27: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/27.jpg)
UninformedSearch Strategies (1)
• Breadth-First Search–This search expands the shallowest
node in the search tree first
–This search explores the space in a level-by-level fashion
![Page 28: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/28.jpg)
E
A
F
CB
IH
D G
JB- the initial node H – the goal
Iteration
0
1
2
3
4
5
6
OPEN
B
D F G
F G I J
G I J H
I J H
J H
H
CLOSED
B
B D
B D F
B D F G
B D F G I
B D F G I J
Breadth-first search
Data driven search
Goal
![Page 29: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/29.jpg)
UninformedSearch Strategies (2)
• Uniform-Cost Search–This search expands the lowest-
cost node on the frontier first
–The path cost must never decrease
g(successor(n)) g(n)for every node n
![Page 30: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/30.jpg)
UninformedSearch Strategies (3)
• Depth-First Search– This search expands the deepest node in
the search tree first– This search goes deeper into the search
space whenever this is possible
• Depth-Limited Search– This search places a limit on how deep a
depth-first search can go (imposes a cutoff on the maximum depth of a path)
![Page 31: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/31.jpg)
Iteration
0
1
2
3
4
5
OPEN
B
D F G
I J F G
J F G
F G
H G
CLOSED
B
B D
B D I
B D I J
B D I J F
Depth-first search
E
A
F
CB
IH
D G
J
Goal
B- the initial node H – the goal
Data driven search
![Page 32: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/32.jpg)
B- the initial node
F- the goal
Depth limit - 2
Iteration
0
1
2
OPEN
B0
D1 G1 E1
F2 H2 G1 E1
CLOSED
B
B D
Depth limited search
Goal
Node depth
E
F
C
I
H
D
J
A B
G
Data driven search
![Page 33: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/33.jpg)
UninformedSearch Strategies (4)
• Iterative Deepening Search– This search call depth-limited search with
increasing limits until a goal is found
– This search expands many states multiple times
• Bidirectional Search– This search goes both forwards from the initial
state and backward from the goal, and stop when the two searches meet in the middle
![Page 34: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/34.jpg)
Iteration
0
1
2
OPEN
A
C D
D F G
CLOSED
A
A C
Solution is found because the node D is found in both OPEN lists
Bidirectional search
E
F
C
I
H
D
J
A B
G
A- the initial node
J- the goal
Iteration
0
1
2
OPEN
J
G H
H C D
CLOSED
J
J G
Data-driven search Goal-driven search
![Page 35: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/35.jpg)
Evaluation of Uninformed Search Strategies
• Four Criteria– Completeness (is a solution guaranteed?)– Time Complexity (time needed for search)– Space Complexity (memory needed for
search)– Optimality (is highest-quality solution
guaranteed when there are several different solutions?)
![Page 36: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/36.jpg)
Comparing Uninformed Search Strategies (1)
Criterion Breadth-First
Uniformcost
Depth-First
Complete? + + −Time Complexity bd bd bm
Space Complexity bd bd
bm
Optimal? + + −b is the branching factor (every state can be expanded to yield b new states),d is the depth of solution, m is the maximum depth of the search tree, and l is the depth limit
![Page 37: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/37.jpg)
Comparing Uninformed Search Strategies (2)
Criterion Depth-Limited
Iterative Deepening
Bidirectional
Complete? +, if l d + +Time Complexity bl bd bd/2
Space Complexity bl bd bd/2
Optimal? − + +
b is the branching factor (every state can be expanded to yield b new states)d is the depth of solutionm is the maximum depth of the search treel is the depth limit
![Page 38: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/38.jpg)
Strengths of Uninformed Search Strategies (1)
• Breadth-First Search–This search always finds the
shortest solution path
• Uniform-Cost Search–When the cost of the path never
decrease, the first solution that is found is guaranteed to be the cheapest solution
![Page 39: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/39.jpg)
Strengths of Uninformed Search Strategies (2)
• Depth-First Search–For problems that have very many
solutions, depth-first may actually be faster than breadth-first search, because chances to find a solution after searching only a small part of the whole space is rather good
![Page 40: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/40.jpg)
Strengths of Uninformed Search Strategies (3)
• Depth-Limited Search– It avoids the pitfalls of depth-first search
• Iterative Deepening Search– It is the preferred search method when
there is a large search space and the depth of the solution is not known
• Bidirectional Search– Can enormously reduce time complexity
![Page 41: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/41.jpg)
Weaknesses of Uninformed Search Strategies (1)
• Breadth-First Search– Impractical in most cases due to the memory
requirements
– It is optimal only when all operators have the same cost
• Uniform-Cost Search– If some operators have negative cost, only an
exhaustive search of all nodes would guaranteed the optimal solution
![Page 42: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/42.jpg)
Weaknesses of Uninformed Search Strategies (2)
• Breadth-First Search(assume that 1 million nodes can be generated per second and
that a node requires 1000 bytes of storage)• At depth 2 there are 110 nodes, time needed is 0,11 milliseconds
and 107 kilobytes of memory are needed• At depth 4 there are 11110 nodes, time needed is 11 milliseconds
and 10,6 megabytes of memory are needed • At depths 6, 8, 10, 12, 14, and 16 the number of nodes is10 in
corresponding power, time needed is 1,1 seconds, 2 minutes, 3 hours, 13 days, 3,5 years, and 350 years, respectively, while 1 gigabyte, 103 gigabites, 10 terabytes, 1 petabyte, 99 petabytes, and 10 exabytes of memory are needed
• Exponential-complexity search is a problem!
![Page 43: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/43.jpg)
Weaknesses of Uninformed Search Strategies (3)
• Depth-First Search–Impractical in search trees with large
or infinite maximum depths (it can get stuck going down the wrong paths)
• Depth-Limited Search–In cases when depth limit is too small
there is no guarantee that the search will find the goal
![Page 44: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/44.jpg)
Weaknesses of Uninformed Search Strategies (4)
• Iterative Deepening Search–It is wasteful, because many states
are expanded multiple times
• Bidirectional Search–It is not always applicable and its
memory requirements may be impractical
![Page 45: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/45.jpg)
InformedSearch Strategies (1)
• Best-First Search– This search expands the node that appears to
be the best according to the evaluation function
* Greedy Search– This is one of the simplest best-first search
strategies that uses minimization of the estimated cost of the cheapest path (heuristic function h(n)) to reach the goal
– This search expands the node whose state is judged to be closest to the goal state
![Page 46: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/46.jpg)
Best first searchA
CB D
FE G
IH
10 = 0+10
6 =1+5 8 =1+7 4 =1+3
5 =2+3 7 =2+5 4 =2+2
5 =3+2 3 =3+0
Iteration
0
1
2
3
4
5
OPEN
A(10)
C(8) B(6) D(4)
B(6) E(5) D(4) G(4)
F(7) E(5) D(4) G(4)
E(5) D(4) G(4) I(3)
H(5) D(4) G(4) I(3)
CLOSED
A(10)
A(10) C(8)
A(10) C(8) B(6)
A(10) C(8) B(6) F(7)
A(10) C(8) B(6) F(7) E(5)
The best measure is the highest value
A- the initial node
H- the goal
6 Node heuristic measures
![Page 47: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/47.jpg)
InformedSearch Strategies (2)
• A* Search– This search expands the node n with the
lowest value of the estimated cost of the cheapest solution through n:
f(n) = g(n) + h(n)
![Page 48: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/48.jpg)
InformedSearch Strategies (3)
• Memory-Bounded Search– This search conserves memory
• Iterative Deepening A* Search (IDA*)– In this search each iteration is a depth-first search
that is modified to use an f-cost limit (not depth limit)– This search expands all nodes inside the contour for
the current f-cost, peeping over the contour to find out where the next contour is (contour in the state space is a set of nodes where all nodes have f(n) less than or equal to f-cost of that contour)
![Page 49: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/49.jpg)
InformedSearch Strategies (4)
• Simplified Memory-Bounded A* Search (SMA*)– This search drops nodes that are
unpromising (nodes with high f-cost) when it needs to generate a successor but has no memory left
![Page 50: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/50.jpg)
InformedSearch Strategies (5)
• Iterative Improvement Algorithms– This search explores the state space trying to
find the best value of the estimated cost, which is the optimal solution
• Hill-Climbing Search– This search continually expands nodes that
have better estimated costs of the remaining distance to the goal then previous ones
![Page 51: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/51.jpg)
Hill climbing
A
CB D
FE G
IH
10 = 0+10
9= 1+8 5 =1+4 8 =1+7
4 =2+2 2 =2+0 6 =2+4
3 =3+0 8 =3+5
Iteration
0
1
2
3
OPEN
A(10)
C(5)
E(4)
H(3)
CLOSED
A(10) B(9) D(8)
A(10) B(9) D(8) C(5) G(6)
A(10) B(9) D(8) C(5) G(6) E(4) I(8)
The best measure is the lowest value
A- the initial node
H- the goal
6 Node heuristic measures
![Page 52: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/52.jpg)
InformedSearch Strategies (6)
• Simulated Annealing– This search picks a randomly selected
successor of the current node. If the move improves the situation, it is always executed. Otherwise, the algorithm makes the move with some probability less than 1
– The probability decreases exponentially with the “badness” of the move calculated as the difference of values between next and current states
![Page 53: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/53.jpg)
InformedSearch Strategies (7)
• Beam Search–This search proceeds as in
breadth-first search, except that only the best W states are chosen at each level
![Page 54: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/54.jpg)
Beam searchA
CB D
FE G
IH
10 =0+10
6 =1+5 8 =1+7 4 =1+3
5 =2+3 7 =2+5 4 =2+2
4 = 3+1 3 =3+0
Iterācija
0
1
2
3
OPEN
A(10)
C(8) B(6)
F(7) E(5)
H(4) I(3)
The goal is reached
CLOSED
A(10) D(4)
A(10) D(4) C(8) B(6) G(4)
A(10) D(4) C(8) B(6) G(4) F(7) E(5)
The best measure is the highest value
A- the initial node
H- the goal
Beam width - 2
6 Node heuristic measures
![Page 55: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/55.jpg)
Strengths of Informed Search Strategies (1)
More information leads to reduced time and space complexity. The time complexity depends on the quality of the heuristic function
• Best-First Search
– This search can find solutions more effectively than uninformed search
– It is good when there is natural measure of goal distance and a good partial path may look like a bad option before more promising partial paths are played out
![Page 56: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/56.jpg)
Strengths of Informed Search Strategies (2)
* Greedy Search– This search substantially reduces the time
and space complexity if a good heuristic function is used
– This search cuts the search cost considerably
* A* Search– This search is optimally efficient for any given
heuristic function (no other optimal algorithm is guaranteed to expand fewer nodes)
![Page 57: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/57.jpg)
Strengths of Informed Search Strategies (3)
• Memory-Bounded Search– This search conserves memory
* IDA* Search– IDA* only goes through two or three
iterations since typically f only increases two or three times along any solution path
![Page 58: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/58.jpg)
Strengths of Informed Search Strategies (4)
* SMA Search–SMA* can make use of all available
memory to carry out the search, and avoids repeated states as far as its memory allows
–Given a reasonable amount of memory, SMA* can solve significantly more difficult problems than A*
![Page 59: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/59.jpg)
Strengths of Informed Search Strategies (5)
• Iterative Improvement Algorithms–This search keeps track of only the
current state and do not look ahead beyond the immediate neighbors of that state
![Page 60: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/60.jpg)
Strengths of Informed Search Strategies (6)
* Hill-Climbing Search– This search does not maintain a search
tree, so the node data structure need only record the state and its evaluation
– It is good when there is a natural measure of distance from each place to the goal and a good path is likely to be among the partial paths that appear to be good at each choice point
![Page 61: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/61.jpg)
Strengths of Informed Search Strategies (7)
* Random-Restart Hill-Climbing Search
– This search eventually finds the optimal solution if enough iterations are allowed
– Usually a reasonably good solution can be found after a small number of iterations
* Simulated Annealing
– This search provides a way to escape local maxima by picking a random move instead of the best move
– It is applied widely to large-scale optimization tasks
![Page 62: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/62.jpg)
Strengths of Informed Search Strategies (8)
* Beam Search– This search moves downward only through the
best W nodes at each level, the other nodes are ignored
– The number of nodes explored remains manageable, even if there is a great deal of branching and the search is deep
– It is good when there is natural measure of goal distance and a good path is likely to be among the partial path that appear to be good at all levels
![Page 63: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/63.jpg)
Weaknesses of Informed Search Strategies (1)
Because heuristics use limited information they can lead a search algorithm to a suboptimal solution or fail to find any solution at all
• Best-First Search– In this search evaluation function
sometimes can lead search astray. It is not good when the branching factor is too large
![Page 64: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/64.jpg)
Weaknesses of Informed Search Strategies (2)
* Greedy Search– This search is susceptible to false starts
– heuristic may cause unnecessary nodes to be expanded. The algorithm is neither complete nor optimal
* A* Search– This search is not an answer to all
searching needs because at the worst case exponential growth will occur
![Page 65: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/65.jpg)
Weaknesses of Informed Search Strategies (3)
• Memory-Bounded Search
* IDA* Search– If the heuristic value is different for every
state then each contour only included one more state than the previous contour, and IDA* will expand N2 nodes in N iterations (too long to wait in complex domains)
![Page 66: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/66.jpg)
Weaknesses of Informed Search Strategies (4)
* SMA* Search– On very hard problems this search is
forced to continually switch back and forth between a set of candidate solution paths
– Extra time is required for repeated generation of the same nodes, and as a consequence memory limitations can make a problem intractable from the point of view of computation time (algorithm is not optimal)
![Page 67: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/67.jpg)
Weaknesses of Informed Search Strategies (5)
• Interactive Improvement Algorithms* Hill-Climbing Search
– This search suffers from local maxima (on it the algorithm will halt even though the solution may be far from satisfactory), plateaux (the search will conduct a random walk because the evaluation function is essentially flat), ridges (if there are not operators that move directly to the top of the ridge, the search may oscillate from side to side, making little progress)
![Page 68: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/68.jpg)
Weaknesses of Informed Search Strategies (6)
* Random-Restart Hill-Climbing Search– If it is a complex problem the solution is not
guaranteed due to the inherent limitation of heuristic search
* Simulated Annealing– In cases when the values of the parameter
used to determine the probability of allowing moves are not lowered slowly enough the algorithm will not find a global optimum
![Page 69: ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]](https://reader035.vdocuments.us/reader035/viewer/2022062500/5681599f550346895dc6ea9f/html5/thumbnails/69.jpg)
Weaknesses of Informed Search Strategies (7)
* Beam Search–The solution is not guaranteed due
to the inherent limitations of heuristic search (the algorithm is not complete)