@Override
	public Codec<SudokuGrid, IntegerGene> codec() {
		// Encoder: Given a board, Generator.createIndividual(board) creates new
		// genotypes by filling empty cells with random numbers.
		//
		// Decoder: given a board and sequence of chromosomes, a SudokuGrid
		// object es created.
		return Codec.of(
			() -> Generator.createIndividual(board),
			chromosomes -> new SudokuGrid(board, ISeq.of(chromosomes))
		);
	}
Fitness function penalizes issues rows, columns, and issues in sub-boards (3x3).
"Issues" mean repeated numbers.
It is one of the simplest fitness function for sudoku.
jenetics.example/src/main/java/io/jenetics/example/sudoku/SudokuProblem.java