public static void search(SearchNode root) {
		//use hash set for the fringe
		Set<SearchNode> fringe = new HashSet<SearchNode>();
		fringe.add(root);
		while(!fringe.isEmpty()){
			//find the min h+g for the nodes in the fringe
			SearchNode curr = findMinGPlusH(fringe);
			if(!curr.getState().isGoal()){	
				//generate the successor nodes
				List<? extends SearchNode> succList = curr.getSuccessors();
				for(int i = 0; i < succList.size(); i++){
					SearchNode succ = succList.get(i);
					if(!fringe.contains(succ)) fringe.add(succ);
				}
			}
			// find the goal state
			else{
				curr.printSolution();
				return;
			}
		}
		System.out.println("Error! No solution found!");
	}