Skip to content

Bug fix

  • Runtime exception on .NET 4.6.2 #58

NuGet update

Only GeneticSharp:

update-package GeneticSharp

GeneticSharp and extensions (TSP, AutoConfig, Bitmap equality, Equality equation, Equation solver, Function builder, etc):

update-package GeneticSharp.Extensions

Unity3d

The bug #58 does not affect the Unity3d package, so you can still use the 2.4.0 version.

Assets 2
Jan 24, 2019
Performance improvements.

@giacomelli giacomelli released this Jan 19, 2019 · 50 commits to master since this release

The additions of this version are the two new crossovers implementations and a new option of ITaskExecutor that use TPL.

Crossovers

Alternating-position (AP)

The alternating position crossover operator (Larrañaga et al. 1996a) simply creates an offspring by selecting alternately the next element of the first parent and the next element of the second parent, omitting the elements already present in the offspring.

Voting Recombination Crossover (VR)

It can be seen as a P-sexual crossover operator, where p (parents number) is a natural number greater than, or equal to, 2.

It starts by defining a threshold, which is a natural number smaller than, or equal to p.

Next, for every; i E {l, 2, . . .N} the set of ith elements of all the parents is considered. If in this set an element occurs at least the threshold number of times, it is copied into the offspring.

TPL

Three new classes were implemented to run some key points of a genetic algorithm using TPL.

Those new classes can be used alone, but normally you will use all them together. You can see a sample usage at unit test Start_TplManyGenerations_Optimization.

TplTaskExecutor:

An ITaskExecutor's implementation that executes the tasks in a parallel fashion using Task Parallel Library (TPL).

TplPopulation

Represents a population of candidate solutions (chromosomes) using TPL to create them.

TplOperatorsStrategy

A new interface called IOperatorsStrategy was added to GeneticAlgorithm as an option. Two options of operators strategy were created, the default one, called DefaultOperatorsStrategy and the new one called TplOperatosStrategy.


Thanks to

I would like to thanks to EMostafaAli and Alexey I. for opened some issues and made small pull requests and Dan for contributing with the TPL implementations.

Let's evolve!

Assets 3
Jan 14, 2019
Fix issues #49 and #50.
Nov 3, 2018
Improved Sudoku extensions code coverage.

@giacomelli giacomelli released this Nov 3, 2018 · 111 commits to master since this release

The additions of this version are the new whole sample and extensions showing how to use GeneticSharp to solve a Sudoku.

The GeneticSharp.Extensions project receive those new features:

Multiple

MultipleChromosome

Compound chromosome to artificially increase genetics diversity by evolving a list of chromosomes instead of just one.
Sub-genes are inlined into a single compound list of genes.

MultipleFitness

Fitness class that can evaluate a compound chromosome by summing over the evaluation of its sub-chromosomes.

Sudoku

ISudokuChromosome:

Represents each type of chromosome for solving a sudoku is simply required to output a list of candidate sudokus.

SudokuBoard

A class that represents a Sudoku, fully or partially completed.
Holds a list of 81 int for cells, with 0 for empty cells.
Can parse strings and files from most common formats and displays the sudoku in an easy to read format.

SudokuCellsChromosome

This simple chromosome simply represents each cell by a gene with a value between 1 and 9, accounting for the target mask if given.

SudokuFitness

Evaluates a sudoku chromosome for completion by counting duplicates in rows, columns, boxes, and differences from the target mask.

SudokuPermutationsChromosome

This more elaborated chromosome manipulates rows instead of cells, and each of its 9 gene holds an integer for the index of the row's permutation amongst all that respect the target mask.
Permutations are computed once when a new Sudoku is encountered, and stored in a static dictionary for further reference.

SudokuRandomPermutationsChromosome

This chromosome aims at increasing genetic diversity of SudokuPermutationsChromosome, which exhibits only 9 permutation genes.
Here, instead, an arbitrary number of Sudokus are generated where for each row, a random gene is picked amongst an arbitrary number of corresponding permutation genes.

Samples

GTK# sample
gtk-sudoku-sample


Thanks to

I would like to thanks to Jean-Sylvain Boige (@jsboige) for contributing with those great new samples and extensions and for use GeneticSharp in his Artificial Intelligence course in French engineering schools (course).

Take a look on the pull-request for fore details about those new features: New Sudoku extension and GTK# sample #43.

Let's evolve!

Assets 3
Oct 31, 2018
More code improvements suggested from Sonar.
Oct 31, 2018
Code quality improved with suggestions from Sonar.

@giacomelli giacomelli released this Oct 30, 2018 · 146 commits to master since this release

Features

  • Add constructor with values to FloatingPointChromosome #33
  • New NuGet version #44

Bug fix

  • Bug/Error when using ParallelTaskExecutor #40
Assets 2
Oct 5, 2018
Create issue templates: bug report, feature request and question.
You can’t perform that action at this time.