There are 2 basic ways to perform a search:

- Blind search -- can only move according to position in search.
- Heuristic search -- use
*domain-specific*information to decide where to search next.

**Blind Search**
**Depth-First Search**

- Set
*L*to be a list of the initial nodes in the problem. - If
*L*is empty,*fail*otherwise pick the first node*n*from*L* - If
*n*is a goal state, quit and return path from initial node. - Otherwise remove
*n*from*L*and add to the front of*L*all of*n*'s children. Label each child with its path from initial node. Return to 2.

**Note**: All numbers in Fig 1 refer to order visited in
search.

**Breadth-First Search**

- Set
*L*to be a list of the initial nodes in the problem. - If
*L*is empty,*fail*otherwise pick the first node*n*from*L* - If
*n*is a goal state, quit and return path from initial node. - Otherwise remove
*n*from*L*and add to the end of*L*all of*n*'s children. Label each child with its path from initial node. Return to 2.

**Note**: All numbers in Fig 1 refer to order visited in
search.

dave@cs.cf.ac.uk