Gene pool with unique values


I want to make a gene pool with just unique values. Is that possible and how do I do that?
I want to use it to as the genome for octopus, but I need the values to be unique.

Thanks in advance!


Depends on whether you have more distinct values than genes. If yes, then it is at least theoretically possible.

What needs to happen when two values are the same? Should one of them be slightly moved? Both?

It’s easy enough generating -say- N different values, but I suspect the fact that you’re using a Gene pool means you have limited freedom as to the indexing of the values.

Typical ways to generate different values are:

  1. Create a set of different values, then randomise the ordering.
  2. Create more values than you need, then create a Set out of them, then reduce the set cardinality to your desired count.