Lecture03 Uninformed Search (Part 1)
Lecture03 Uninformed Search (Part 1)
Lecture03 Uninformed Search (Part 1)
Fundamentals
Lecture 3 – Solving Problems
by Searching (Uninformed
Searches)
Part 1
"move the blank up, down, left or right" than specifying actions that move
the individual tiles or the tiles in a particular location because the
branching factor of the search will be much less.”
Solving Problems By Searching – Uninformed Searches
The 8-puzzle problem Continued ...
• States: a state description specifies the location of
each of the eight tiles in one of the nine squares.
• Operators: blank moves left, right, up, or down.
• Goal test: state matches the goal configuration
shown in the right.
• Path: each step costs 1, so that the path cost is just
the length of the path.
In this example,
the two queens
on the corners
are the only
queens threatening
each other.
Datatype node
components: STATE, PARENT-NODE, OPERATOR, DEPTH, PATH-COST
Solving Problems By Searching – Uninformed Searches
Nodes and States continued ...
• Node is a data structure to represent search tree for a particular
problem
• State represents a configuration of the world
• Fringe or frontier
• A collection of nodes that are waiting to be expanded
• A set of nodes can be represented as a queue with following operations
• MAKE-QUEUE(element,…) creates a queue with the given elements
• EMPTY?(queue) returns true if there are no more elements in the queue.
• FIRST(queue) returns the first element of the queue.
• REMOVE-FIRST(queue) returns FIRST(queue) and removes it.
• INSERT(element, queue) inserts an element into the queue and returns the
queue.
• INSERT-ALL(elements, queue) inserts a set of elements into the queue and returns
the queue.
Front Back