Questions tagged [jenetics]

Jenetics is an is an open-source Java library for implementing genetic/evolutionary algorithms and genetic programming. Use this tag for questions that involve the usage of Jenetics.

Jenetics is an open-source Java library for genetic and evolutionary algorithms as well as genetic programming. Related libraries mostly offer an imperative API to interact with the given evolution, whereas Jenetics uses an EvolutionStream that implements the Java Stream interface.

Features

34 questions
1
vote
1 answer

jenetics: Set EvolutionStream limit outside of stream()

There are several possibilities in jenetics to set termination limits to EvolutionStream, see the documentation. The limits are usually applied directly on the stream, e.g. Phenotype result = engine.stream() …
raedma
  • 293
  • 1
  • 12
1
vote
2 answers

Genetic Algorithm Fitness and Cross Over selection

I'm attempting to use a genetic algorithm to arrange a random list of seats for a given section in a classroom so that all the groups in that classroom sit together. Here is my current attempt, I'm unclear about the best way to improve this…
C.N
  • 218
  • 1
  • 9
1
vote
1 answer

Recombination to create a new genotype by swapping chromosomes

The Jenetics documentation specifies that recombination creates a new chromosome by combining parts of two (or more) parent chromosomes. Based on this, the library also provides concrete implementations for various crossover techniques. Is there an…
varlog23
  • 43
  • 4
1
vote
1 answer

Jenetics constraint seems to have no effect

I have implemented a variant of the knapsack problem using Jenetics as follows: @Value public class Knapsack { public static void main( final String[] args ) { final var knapsackEngine = Engine.builder( Knapsack::fitness,…
beatngu13
  • 7,201
  • 6
  • 37
  • 66
1
vote
2 answers

Jenetics: proper usage of codec with column Genotype

currently I am working on a Jenetics (link to jenetics) implementation to optimize a particle accelerator beam line. My fitness function calls accelerator detector devices and is defined as follows: private double fitness(final DoubleChromosome…
WolfiG
  • 1,059
  • 14
  • 31
1
vote
1 answer

Command line error while building jenetics library

I'm attempting to build the Java jenetics library for genetic algorithms as per this website. However, as can be seen in the image below I'm having some issues that I'm not able to resolve. Am I missing something from the instructions or have I…
youjustreadthis
  • 622
  • 3
  • 9
  • 24
0
votes
0 answers

Java Jenetics lib. Fitness progress stops in the first few generations

I am trying to solve a problem using a genetic algorithm: A gene stores ints approximately in the range of 0 to 500. The size of one genotype is approximately in the range of 10 to 10000. This genotype looks like: [13, 476, 3, 89...] The population…
0
votes
1 answer

Jenetics jpx. Read gpx file and time when watch was stopped

I am using jenetics jpx to read GPX files in java. That's works well. The gpx files are taken from my watch, from running sessions. I am reading the track points and would like to know if there is a way to determine, in the GPX file, when the watch…
Gilles
  • 357
  • 3
  • 20
0
votes
1 answer

Calculating fitness in Knapsack problem in Jenetics

I am trying to understand how evolution and fitness function work. I implemented my own Knapsack problem, which tries to find 3 most valuable items from a given set. It is my own cost function: static int counter=1; static double…
0
votes
2 answers

Custom Genotype in Jenetics for nesting

I'm using Jenetics to nest a list of polygons using NoFitPolygon I have a function that gived a list of polygon nests them following the order in the list. I adapted the TravellingSalesman problem in order to have a genotype that represent the list…
0
votes
2 answers

Jenetics: how to interpret and get the result of a chromosome?

I practice using this library, Jenetics.io. In their manual they have an example, Traveling salesman. The example only shows the minimum path found, but does not show the point set or point order of the solution. How do I get the set of points of…
0
votes
1 answer

ContextNotActiveException with Quarkus and Jenetics

First time using Quarkus, it's probably a noob question but I have no idea how to resolve. I'm trying to set up an endpoint which should run a Genetic Algorithm (made with Jenetics) and return the result. This is the endpoint…
Andrea
  • 675
  • 1
  • 13
  • 34
0
votes
2 answers

How to force dependency / linkage of genes in a genetic algorithm?

For a current project, I want to use genetic algorithms - currently I had a look at the jenetics library. How can I force that some genes are dependent on each other? I want to map CSS on the gene, f.e. I have genes indicating if an image is…
lydiaP
  • 123
  • 1
  • 13
0
votes
1 answer

Jenetics library default initial population and fitness calculation

i am using Jenetics in order to get the best individual that maximizes the problem. How does the population size affects the individuals ? Imagine that i have this initial population read from file put into a list while( (line =…
Alex
  • 3
  • 1
0
votes
1 answer

How to plot the fitness of different generations in my GA using jenetics

In general how would you print out or plot the fitness scores of each generation created using the jenetics library? More specific on my own code: private static double clashes(final Genotype> gt) { // Calculate the path…
Allan
  • 5
  • 2