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
5
votes
2 answers

Why more than one chromosome per solution (or genotype)?

I am trying to get started using the Jenetics JAVA library for genetic algorithms and there is something I don't understand from my GA limited backgroud; As I understand a GA generates a population of Arrays of m elements, where each array is a…
Santi Peñate-Vera
  • 1,053
  • 4
  • 33
  • 68
4
votes
1 answer

Static function as parameter (::) throws errors

Using the jenetics Genetic Algorithm library, but I'm almost positive that it is independent of the issue. It seems as though Java is not understanding the double-colon expression, which was introduced in Java 8. Java 8 is installed and Gradle is…
Russell Hueske
  • 151
  • 2
  • 11
3
votes
1 answer

Jenetics custom gene/chromosome

I have started experimenting with the Jenetics library, however I am having some issues with trying to make a very easy "custom" set of gene/chromosomes. What I tried to do was to create a custom chromosome with a different (random) number of…
Alexandr
  • 708
  • 9
  • 29
3
votes
1 answer

Jenetics HelloWorld in Scala

I'm trying to run a Jenetics HelloWorld example from Scala. import org.jenetics.{BitChromosome, BitGene, Genotype} import org.jenetics.engine.{Engine, EvolutionResult} object BitCounting extends App { val genotypeFactory =…
Tomas Zaoral
  • 499
  • 2
  • 5
  • 11
2
votes
2 answers

Constraints when creating a Genotype using Jenetics

I am experimenting with the Multi-objective Optimization Problem (MOP) using Jenetics. A toy problem I created is to select two subsets from a given set, maximizing their total sum, given each subset has a limit. However I want to ensure that the…
varlog23
  • 43
  • 4
2
votes
1 answer

Using the Jenetics Library

Assuming I want to use the Jenetics library for a problem and I intend to have say 20 generations. However I want to apply Elitism for the first 10 generations and disable it for the remaining generations. How do I go about it?
user2987773
  • 407
  • 5
  • 18
2
votes
3 answers

Defining constraints in Jenetics

I have previously worked with the MOEA Framework, which knows the concept of constraints. That is, a solution to a problem might have a good fitness, but is infeasible. For instance, when working with the knapsack problem, a particular combination…
beatngu13
  • 7,201
  • 6
  • 37
  • 66
2
votes
1 answer

Multi-objective problem with non-primitive types in Jenetics

I would like to implement a multi-objective knapsack problem with two knapsacks in Jenetics, but I struggle with some typing issues. I had a look at the DTLZ1 problem from the Jenetics manual—which is to my knowledge the only MOO example…
beatngu13
  • 7,201
  • 6
  • 37
  • 66
2
votes
0 answers

How to import Jenetics Library in Eclipse

First post here, I hope it's not too dumb, but I tried for several hours and can't find a solution. I want to play around with evolutionary algorithms and therefor tried to import the Jenetics Library. I downloaded the zip and tried to import it…
Voli Bear
  • 21
  • 1
2
votes
1 answer

Jenetics: how do I access evolution result (or statistics) at each step?

I am working on an optimization engine based on the Jenetics framework (link to jenetics.io). I have a evolution engine definition as follows: final Thread engineStream = new Thread(() -> { final MinMax> best =…
WolfiG
  • 1,059
  • 14
  • 31
2
votes
1 answer

Only one chromosome shows good results using Jenetics

I am using Jenetics library to solve a problem with ga. I am extending the official example to use several chromosomes like this: List arr = new ArrayList<>(); arr.add(BitChromosome.of(16, 0.5)); …
antonpuz
  • 3,256
  • 4
  • 25
  • 48
2
votes
2 answers

Difference between theses two kind of Genotype

What is the difference between use a Genotype with N (an arbitrary > 0 number) Chromosomes with 1 (one) Gene and a Genotype with 1 (one) Chromosome with N (the same number) genes? In code: // 3 chromosomes with 1 gene each Genotype.of( …
Dyorgio
  • 1,114
  • 13
  • 23
2
votes
1 answer

Jenetics , how to find subset of set using GA

I am trying to find best subset of set. Imagine that we need to find subset of objects. We have got some fitness function for this subset. So at the beginning we should make a population of subsets and then using GA we should try to find the best…
tomo_s
  • 35
  • 7
1
vote
1 answer

Haskell equivalent of Kotlin's invariant types

In Kotlin i can do sealed class Substance { object Uranus : Substance() object Mercury: Substance() object Ammonia : Substance() } data class DangerousBox(val item: T) fun main() { val uranus =…
1
vote
1 answer

jenetics: Fitness: Assign an object to the determination of fitness & complex fitness result type

I am using an IntegerChromosome which is an encoding for the actual problem. To determine the fitness I have to decode from the IntegerChromosome, or more the IntegerGene values, to the actual base type for the optimization problem. So, e.g.…
raedma
  • 293
  • 1
  • 12
1
2 3