SEARCH And CSP Lecture Notes
Date: Wed, 10/17/01
As taken by Eric Martinson
Search Problems.............
Makes sense for well-defined problems only
Reminder :: What is a well defined problem:
We are given a <state space>, and a <search space>
We know: { Initial State(IS), Goal State(GS), Possible Operations, Goal Test }
Find: {A sequence of operations to take us from IS to GS}
HOW <search>
examples of search: BFS, DFS
In real domains, issues of control can influence search algorithms
=> Control Knowledge
=> Control Issues
GOFCS(Good Old Fashioned Computer Science)
Doesn't believe in control knowledge
They typically use lots of graph theory. For example, we can represent the entire city of Atlanta as a graph. Moving from point to point becomes a graph search problem.
BFS and DFS are common approaches to solving these problems because they are nearly exhaustive searches. However, they are blind to shortcuts in the system (i.e. control knowledge)
Control Knowledge (2 Types)
1) Knowledge from the World/Domain
=> For instance, we know that the MARTA station is always found on the left of a building.
We can remove edges which violate this positional knowledge.
8-Tile Problem
|
1 |
2 |
8 |
|
|
5 |
7 |
5 |
|
|
3 |
6 |
= Initial State |
|
|
1 |
2 |
3 |
|
|
8 |
4 |
||
|
7 |
6 |
5 |
= Goal State |
2) Heuristic Knowledge (Rule of Thumb)
For example, In chess/checkers, you're better off when you have more pieces than the other player.
In America, the downtown is generally where all the tall buildings are.
Control Issues
1) efficiency - speed, memory, etc ...
2) termination
3) completeness
4) optimality
We will be focusing on efficiency, and trade-in on the guarantees of 2-4 which are provided by GOFCS exhaustive search techniques.
Search Method Examples

Uniform Cost
Uses an Evaluation function g(n) which keeps track of the cost accumulated so far using the current path. Ignores edges whos cost will make g(n) greater than that of the best path found so far.
|
|
|
Key Idea
-If you have knowledge about the costs associated with each path, is is possible to find an optimal path to the goal
Advantages => Complete, Optimal, Terminate
Disadvantages => the efficiency savings over BFS is small
Best First
Uses an h(n) estimation function (such as Manhattan distance) to determine which paths to explore.
Advantages=> Efficient
Disadvantages=> No Guarantee of completeness or optimality
A*
Greedy Algorithm
f(n) = g(n)+h(n), minimize f(n)
Conditions of Use -- Must never over estimate h(n)
If conditions are met
Advantages => Complete, Terminates, Optimal, Optimally Efficient**
Disadvantages =>
Never over estimate h(n)
Don't often have a good h(n)
Exponential in number of expanded Nodes
**Optimally Efficient is a loose term indicating that the algorithm is better than all other general solutions. Note that for all problems there are 2 solutions which will rapidly solve the problem:
1) Where you already know the correct sequence of steps (experience, memory)
2) Where somebody gives you the answer.
A* is not an exhaustive search, but is preserves all of the advantages of an exhaustive search
Definition~
Admissible Heuristic
-- methods which never over-estimate the cost
BIASES of BOOK and GOEL
Book ~ deals with very low-level info, no models
Goel ~ "I'm interested in the entire spectrum", key interests are in the higher level stuff
CONSTRAINT SATISFACTION PROBLEM
Transitional Stmt - "[As] many problems can be viewed as Search, many problems can be viewed as Constraint Satisfaction Problems"
Example,
|
|
F |
O |
R |
T |
Y |
|
+ |
|
|
T |
E |
N |
|
+ |
|
|
T |
E |
N |
|
|
__ |
__ |
__ |
__ |
__ |
|
|
S |
I |
X |
T |
Y |
where {F,O,R,T,Y,E,N,S,I,X} = values between {0..9}
The Constraints of this Problem
Y+N+N = Y
T+E+E+{1} = T; {1} indicates an optional carry-over
.....
Definitions~
Absolute Constraints - there is nothing you can do about it, these must be met!!
Preference Constraints - soft... I'd like this to be true, but it isn't necessary
How to Solve
1) Pick a value for Y
=> If Y=2, N={0,5}
=> Pick N=0 (No carry bit in 2nd constraint), the choices you make get propagated down the chain
If you cannot meet the constraints, you have to backtrack
BackTracking~
Computer Science does only one type of backtracking:
CHRONOLOGICAL BACKTRACKING
You always change the last choice you made first. Earlier points are only changed when all choices have been exhausted. {Recursion}
DEPENDENCY-DIRECTED BACKTRACKING
Need to represent "problem-solving" Why? So we can reason about how to solve the problem. We are reasoning about reasong:
Meta-Reasoning