Shell of a BFS and a basic goal comparator