Skip to content

Instantly share code, notes, and snippets.

View jenetics's full-sized avatar
🙄

Franz Wilhelmstötter jenetics

🙄
View GitHub Profile
@jenetics
jenetics / DynamicGenotype.java
Created May 9, 2016 18:09
Example for dynamic Genotype/Chromosome length
import static java.lang.Math.pow;
import static org.jenetics.internal.math.random.indexes;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import java.util.stream.IntStream;
import org.jenetics.internal.util.IntRef;
class WeaselSelector<
G extends Gene<?, G>,
C extends Comparable<? super C>
>
implements Selector<G, C>
{
@Override
public Population<G, C> select(
final Population<G, C> population,
final int count,
import static java.lang.Math.PI;
import static org.jenetics.engine.EvolutionResult.toBestPhenotype;
import java.util.Set;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import org.jenetics.DoubleGene;
import org.jenetics.Genotype;
import org.jenetics.Phenotype;

Keybase proof

I hereby claim:

  • I am jenetics on github.
  • I am fwilhelm (https://keybase.io/fwilhelm) on keybase.
  • I have a public key whose fingerprint is 3C2E EC52 F948 23B8 113A 527C BE5E C76F 7C08 4F3B

To claim this, I am signing this object:

@jenetics
jenetics / Creating random seeds.md
Last active August 29, 2015 14:14
Creating random seeds

Creating random seeds

Franz Wilhelmstötter, 2015.01.25

While implementing the Jenetics library, I faced the problem of creating seed values for the Random engines I used. The usual way for doing this, is to take the current time stamp.

public static long seed() {
    return System.nanoTime();
}