Breadth-First Search
- Initialize FIFO queue; add an initial candidate to it
- Initialize visited candidate set
- Loop Forever
- Remove the head of the queue
- If the queue is empty, quit with failure
- If the candidate has been visited, skip the rest of the inner loop
- If not, add the candidate to the visited set
- Evaluate the candidate
- If the candidate is a solution, quit and return it
- Otherwise:
- Generate some new candidates from the candidate
- Add the new candidates to the end of the queue