Uninformed Search Reading Chapter 4 Tuesday 921 Uninformed

  • Slides: 33
Download presentation
Uninformed Search Reading: Chapter 4 (Tuesday, 9/21)

Uninformed Search Reading: Chapter 4 (Tuesday, 9/21)

Uninformed l Search through the space of possible solutions l Use no knowledge about

Uninformed l Search through the space of possible solutions l Use no knowledge about which path is likely to be best l Exception: uniform cost • Each path is given a cost 2

Characteristics l Before actually doing something to solve a puzzle, an intelligent agent explores

Characteristics l Before actually doing something to solve a puzzle, an intelligent agent explores possibilities “in its head” • Human vs. rational? • For what games, do we do this? l l l Search = “mental exploration of possibilities” Making a good decision requires exploring several possibilities Execute the solution once it’s found 3

Formulating Problems as Search Given an initial state and a goal, find the sequence

Formulating Problems as Search Given an initial state and a goal, find the sequence of actions leading through a sequence of states to the final goal state. Terms: • • • Successor function: given action and state, returns {action, successors} State space: the set of all states reachable from the initial state Path: a sequence of states connected by actions Goal test: is a given state the goal state? Path cost: function assigning a numeric cost to each path Solution: a path from initial state to goal state 4

Example: the 8 -puzzle l How would you use AI techniques to solve the

Example: the 8 -puzzle l How would you use AI techniques to solve the 8 -puzzle problem? 5

8 -puzzle URLS l http: //www. permadi. com/java/puzzle 8 l http: //www. cs. rmit.

8 -puzzle URLS l http: //www. permadi. com/java/puzzle 8 l http: //www. cs. rmit. edu. au/AI-Search/Product 6

8 Puzzle l States: integer locations of tiles l Action: left, right, up, down

8 Puzzle l States: integer locations of tiles l Action: left, right, up, down Goal test: is current state = (0 1 2 3 4 5 6 7 8)? Path cost: same for all paths Successor function: given {up, (5 2 3 0 1 8 4 7 6)} -> ? What would the state space be for this problem? l l • (0 1 2 3 4 5 6 7 8) • (0 1 2)(3 4 5) (6 7 8) 7

What are we searching? l State space vs. search space • State represents a

What are we searching? l State space vs. search space • State represents a physical configuration • Search space represents a tree/graph of possible solutions… an abstract configuration l Nodes l Expand • Abstract data structure in search space • Parent, children, depth, path cost, associated state • A function that given a node, creates all children nodes, using successsor function 8

9

9

Uninformed Search Strategies The strategy gives the order in which the search space is

Uninformed Search Strategies The strategy gives the order in which the search space is searched l l l Breadth first Depth limited search Iterative deepening Uniform cost 10

Algorithm for Breadth-first 11

Algorithm for Breadth-first 11

12

12

13

13

14

14

15

15

Visualization 16

Visualization 16

Algorithm for depth-first search 17

Algorithm for depth-first search 17

18

18

19

19

20

20

21

21

22

22

23

23

24

24

25

25

Complexity Analysis l l Completeness: is the algorithm guaranteed to find a solution when

Complexity Analysis l l Completeness: is the algorithm guaranteed to find a solution when there is one? Optimality: Does the strategy find the optimal solution? Time: How long does it take to find a solution? Space: How much memory is needed to perform the search? 26

Cost variables l Time: number of nodes generated Space: maximum number of nodes stored

Cost variables l Time: number of nodes generated Space: maximum number of nodes stored in memory Branching factor: b l Depth: d l Path length: m l l • Maximum number of successors of any node • Depth of shallowest goal node • Maximum length of any path in the state space 27

Complexity BFS vs. DFS l Optimal? l Time = l Space = l Complete?

Complexity BFS vs. DFS l Optimal? l Time = l Space = l Complete? 28

Can we combine benefits of both? l Depth limited • Select some limit in

Can we combine benefits of both? l Depth limited • Select some limit in depth to explore the problem using DFS • How do we select the limit? l Iterative deepening • DFS with depth 1 • DFS with depth 2 up to depth d 29

30

30

31

31

32

32

Three types of incompleteness l Sensorless problems l Contingency problems l Exploration problems •

Three types of incompleteness l Sensorless problems l Contingency problems l Exploration problems • Adversarial problems 33