protected boolean loopDetection(List<Formula> goals) {
		for(Formula f : goals) {
			if(f.getClass().equals(Implies.class)) {
				Implies i = (Implies) f;
				if(
						inKnowledge(i.left()) && (
							goals.contains(i.right()) ||
							incompleteGoals.contains(i.right())	
						)
				  )
					return true;
			}
		}
		
		return false;
	}