public static void main(final String[] args) {
		final var problem = new OnesCounting(15, 0.13);
		final var engine = Engine.builder(problem).build();

		final ISeq<BitGene> result = problem.decode(
			engine.stream()
				.limit(10)
				.collect(EvolutionResult.toBestGenotype())
		);

		System.out.println(result);
	}
Create a new Ones-Counting example with the given parameters.

@param length the length of the ones-vector
@param onesProbability the probability of ones in the created vector
jenetics.example/src/main/java/io/jenetics/example/OnesCounting.java