private Queue<State> search(State initial, State goal) {
		Queue<State> frontier = new LinkedList<State>();
		frontier.add(initial);

		Map<State, State> tracks = new HashMap<State, State>();
		tracks.put(initial, null);

		while(!frontier.isEmpty()) {
			State current = frontier.remove();

			if(current.equals(goal)) {
				Queue<State> path = Collections.asLifoQueue(new LinkedList<State>());
				while(current != null) {
					path.add(current);
					current = tracks.get(current);
				}
				return path;
			}

			for(State successor : current.successors()) {
				if(!tracks.keySet().contains(successor)) { 
					tracks.put(successor, current);
					frontier.add(successor);
				}
			}
		}

		return null;
	}