private static BitVector algoritam2(SATFormula formula) {
		BitVector vector = new BitVector(formula.getNumberOfVariables());
		for (int i = 0; i < NUMBER_OF_ITERATIONS; i++) {
			SATFormulaStats vstat = new SATFormulaStats(formula);
			vstat.setAssignment(vector, true);
			if (vstat.isSatisfied()) {
				System.out.println("Zadovoljivo: " + vector);
				return vector;
			}
			BitVectorNGenerator generator = new BitVectorNGenerator(vector);
			MutableBitVector[] neighborhood = generator.createNeighborhood();
			int size = neighborhood.length;
			int[] fitness = new int[size];
			int max = 0;
			for (int j = 0; j < size; j++) {
				SATFormulaStats st = new SATFormulaStats(formula);
				st.setAssignment(neighborhood[j], true);
				fitness[j] = st.getNumberOfSatisfied();
				if (st.isSatisfied()) {
					System.out.println("Zadovoljivo: " + neighborhood[j].toString());
					return neighborhood[j];
				}
				if (max < fitness[j]) {
					max = fitness[j];
				}
			}
			if (max < vstat.getNumberOfSatisfied()) {
				System.out.println("Neuspjeh! Lokalni optimum!");
				return null;
			}
			List<MutableBitVector> solutions = new ArrayList<>();
			for (int j = 0; j < size; j++) {
				if (fitness[j] >= max) {
					solutions.add(neighborhood[j]);
				}
			}
			int rand = new Random().nextInt(solutions.size());
			vector = solutions.get(rand);
		}
		System.out.println("Neuspjeh! Prekoračen broj dozvoljenih iteracija!");
		return null;
	}