@Override
	public Solution search(Puzzle puzzle) {
		fringe.add(new Node(puzzle.getInitialState(), null, null));
		while (!fringe.isEmpty()) {
			Node selectedNode = fringe.poll();
			if (puzzle.getGoalTest().isGoalState(selectedNode.getState())) {
				return new Solution(selectedNode, getNodeExpanded());
			}
			closedList.add(selectedNode);
			LinkedList<Node> expansion = selectedNode.expandNode();
			for (Node n : expansion) {
				if (!closedList.contains(n) && !fringe.contains(n))
					fringe.add(n);
			}
		}
		return new Solution(null, getNodeExpanded());
	}