0% found this document useful (0 votes)
35 views

Uninformed Search: CS 4804 Fall 2020

The document discusses uninformed search methods for problem solving agents. It introduces depth-first search, breadth-first search, and uniform-cost search. Depth-first search explores the deepest paths in the search tree first, while breadth-first search explores all neighbors of the initial node before moving to the next depth. Uniform-cost search expands the lowest-cost nodes first based on an evaluation function. The document also covers the time and space complexity of these algorithms and provides examples to illustrate search problems and solutions.

Uploaded by

Tryer
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views

Uninformed Search: CS 4804 Fall 2020

The document discusses uninformed search methods for problem solving agents. It introduces depth-first search, breadth-first search, and uniform-cost search. Depth-first search explores the deepest paths in the search tree first, while breadth-first search explores all neighbors of the initial node before moving to the next depth. Uniform-cost search expands the lowest-cost nodes first based on an evaluation function. The document also covers the time and space complexity of these algorithms and provides examples to illustrate search problems and solutions.

Uploaded by

Tryer
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 30

Uninformed Search

CS 4804 Fall 2020


Virginia Tech
Today’s Topics

• Search Problems
• Uninformed Search Methods
– Depth-First Search
– Breadth-First Search
– Uniform-Cost Search
• Homework logistics
Search Problem
Suggested
day plan
Problem-solving agent

• Agents that plan ahead


• Use atomic representation
– States of the world are considered as whole
– No internal structure visible to the problem-solving
algorithms
• Uninformed algorithms
– Agent is unable to estimate how far it is from the goal
Search Problems and solutions
• A state space
• Initial state (Start state)
• Goal state(s)
• Actions(s)
• Transition model: RESULT(s, a)
• Action cost function: Action-Cost(s, a, s’)
A solution is a sequence of actions (path) which
transforms the initial state to a goal state
An optimal solution has the lowest path cost among all
solutions
Example: Traveling in Romania
Example: 8-puzzle
State Space Graph
• A state space graph is a
mathematical representation of a
search problem
– Nodes are world configurations
(abstracted)
– Arcs represent successors
(action results)
– The goal test is a set of goal
nodes (maybe only one)
• In a search graph, each state
occurs only once.
Search Tree

• Each node is corresponding to a state in the


state space
• The start state is the root node
• Each edge is corresponding to an action
• Children nodes correspond to successors
• Each node encodes an entire path and
corresponds to plans to achieve that state
Search Algorithms
• Input: Search problem
• Output: solution or an indication of failure
• Superimpose a search tree over the state space
graph
Best-first Search
How do we decide
which node from the
frontier to expand next?

Priority queue

f(n): evaluation function

Select node with


minimum f(n) value

A node that represents


a path to a goal
Algorithm’s Performance

• Completeness: Guaranteed to find a solution if


one exists or correctly report failure
• Cost optimality: Find the lowest path cost
solution
• Time complexity: Number of operations to find
the solution
• Space complexity: Amount of memory needed to
find the solution
Uninformed Search Strategies

No clue about how close a state is to the goal(s)

• Breadth-First Search
• Depth-First Search
• Uniform-Cost Search
Breadth-First Search

• All actions have the same cost


• FIFO queue
• Completeness: If a solution exists, Yes
• Cost optimality: only if costs are all the same
• Time complexity: O(bd)
• Space complexity: O(bd)
Depth-
First m
Search
Depth-First Search
• Finds the “leftmost” solution in the search tree
• LIFO queue
• Completeness: No
• Cost optimality: Doesn’t care about costs, No
• Time complexity: O(bm)
• Space complexity: O(bm)
Depth-limited Search

• DFS with a depth limit L


• Depth limit can be chosen based on knowledge
of the problem
• Completeness: No
• Cost optimality: No
• Time complexity: O(bL)
• Space complexity: O(bL)
Iterative Deepening Search
• Depth-limited search with depth L=1, then L=2, …
• Until goal state found
• Completeness: Yes
• Cost optimality: Only if costs are all the same
• Time complexity: O(bd)
• Space complexity: O(bd)
Bidirectional Search
• Search forward from the initial state and search
backwards from the goal state(s)
• Run bidirectional best-first search
• Completeness: Yes
• Cost optimality: Yes
• Time complexity: O(bd/2)
• Space complexity: O(bd/2)
Uniform-cost Search
• Dijkstra’s algorithm
• Actions have different costs
• Expand nodes in order of cost from the initial state
• Completeness: Yes
• Cost optimality: Yes
• Time complexity: O(b1+[C*/e])
• Space complexity: O(b1+[C*/e])
• 𝜖 a lower bound on the cost of each action, with 𝜖 > 0
Uniform-Cost Search (UCS)

• S->R: 80
• S->R->P: 177
• S->F: 99
• S->F->B: 310
• S->R->P->B: 278
Evaluation
Recap: UCS
Recap: DFS / BFS / UCS
Project 0 - Programming

• To become familiar with Python


• To become familiar with Unix basic
• To become familiar with autograder
• To become familiar with a version control
repository for your program. GitHub or Bitbucket
or etc.
• (Optional) to become familiar with Docker or
AWS
Homework 0 - Written

• Also in Canvas
• Check your knowledge (No grade)
Python Tutorial

• https://github.com/CS4804/tutorial
Reading and Next Class

• Uninformed Search, AIMA 3.1-3.4


• Next: Informed Search, AIMA 3.5-3.6

You might also like