Download presentation
Presentation is loading. Please wait.
Published byWillis Blair Modified over 9 years ago
1
CSCI 4310 Lecture 2: Search
2
Search Techniques Search is Fundamental to Many AI Techniques
3
Semantic Networks Nodes: objects in the domain Links: Relationships between objects OOP: link is an “is a” relationship Meaning depends on the application This abstract concept is put into practice in Ch. 4
4
Semantic Nets Book Converts to Trees
5
Search What should a goal-based program do when none of the actions it can currently perform result in a goal state? Choose an action that at least leads to a state that is closer to a goal than the current state. Heuristics Refine our search procedure, or narrow the search space.
6
Definitions State: finite representation of the world at a given time. Operator: a function that transforms one state into another ( also called rule, transition, successor function, production, action). Initial state: world state at the beginning. Goal state: desired world state (can be several) Goal test: test to determine if the goal has been reached.
7
Definitions Reachable goal: a state reachable via a sequence of operators. State space: set of all reachable states from initial state (possibly infinite). Cost function: a function that assigns a cost to each operation. The ‘path cost’ is the TOTAL cost of getting from the start to the goal. Performance: cost of the final operator sequence cost of finding the sequence Path: A sequence of actions leading from one state to another. Solution: A path from the initial state to a state that satisfies the goal test (goal state).
8
Depth First Search Uninformed search DFS applet
9
Depth First Search dfs (node v) { visit(v); for each child w of v dfs(w); } O(b m ) time complexity b: max branching factor m: max depth Can be implemented with only storing the ‘current’ path: O(bm) space
10
Depth First Search Use when all partial paths reach dead ends or become complete paths after a reasonable number of steps Can use fewer resources than BFS
11
Breadth First Search Uninformed search
12
Breadth First Search O(b d ) time and space complexity b: max branching factor d: depth of solution DEPTH 0 DEPTH 1 DEPTH 2
13
Breadth First Search BFS may use more memory, but will not get stuck in blind alleys, and will always find the shortest path first. BFS may be more appropriate when exploring very large search spaces where there is an expected solution which takes a relatively small number of steps, or when you are interested in all the solutions.
14
Summary: Uninformed Search Problem formulation and representation is key! Implementation as expanding directed graph of states and transitions Appropriate for problems where no solution is known and many combinations must be tried Problem space is of exponential size in the number of world states -- NP-hard problems Fails due to lack of space and/or time.
15
From a Higher Level Task discriminator Many AI ‘searching’ techniques DFS or BFS Heuristic Rule-based system Genetic Algorithm …
16
“Macro”-search Neural Network Rule Based Expert System Facial recognition algorithm Stair Climbing What do I do next?
17
Limited Cross-disciplinary systems We have made impressive progress in machines that… Play chess Diagnose medical problems Climb stairs But no robot can walk down stairs and then play a game of chess? Why
18
A simple example, but the task of task determination is difficult How do you do this as a human? Goal-driven behaviors and divide and conquer can help
19
Reading Chapters 2 in Winston Chapters 2-3 in Buckland
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.