private int getHeuristicEstimate(State newState) {
		int count = 0;
		
		ArrayList<Box> usedBoxes =  new ArrayList<Box>();
		
		
		for (Goal g : level.goals) {
				
			BoxInState bestBox = newState.boxes.get(0);
			
			for (BoxInState b : newState.boxes) {
				
				if (!usedBoxes.contains(b.b) && g.getId() == Character.toLowerCase(b.b.getId())
						&& heuristicDistance(b.f, g) < heuristicDistance(bestBox.f, g)
						){
					bestBox = b;
					usedBoxes.add(b.b);
				}
			}
			if ( !(bestBox.f instanceof Goal && ((Goal) bestBox.f).getId() == Character.toLowerCase(bestBox.b.getId()))) {
				count += heuristicDistance(bestBox.f, g);
				//TODO Make this work with multi-agents
				count += heuristicDistance(newState.agents.get(0).f, bestBox.f);
			}	
		}
		
//		try {
//			Thread.sleep(500);
//		} catch (InterruptedException e) {
//			// TODO Auto-generated catch block
//			e.printStackTrace();
//		}
		
//		count -= (noOfGoalsFulfilled(newState) * 5);
//		System.err.println(Arrays.toString(getIdentifierStringForState(newState)));
//		System.err.println(count);
		return count;
	}