All Projects â†’ giacomelli â†’ Geneticsharp

giacomelli / Geneticsharp

Licence: mit
GeneticSharp is a fast, extensible, multi-platform and multithreading C# Genetic Algorithm library that simplifies the development of applications using Genetic Algorithms (GAs).

Projects that are alternatives of or similar to Geneticsharp

Netfabric.hyperlinq
High performance LINQ implementation with minimal heap allocations. Supports enumerables, async enumerables, arrays and Span<T>.
Stars: ✭ 479 (-41.08%)
Mutual labels:  dotnet-standard, dotnet-core
Solid
🎯 A comprehensive gradient-free optimization framework written in Python
Stars: ✭ 546 (-32.84%)
Mutual labels:  artificial-intelligence, genetic-algorithm
Dotnet Webassembly
Create, read, modify, write and execute WebAssembly (WASM) files from .NET-based applications.
Stars: ✭ 535 (-34.19%)
Mutual labels:  dotnet-standard, dotnet-core
Linqtotwitter
LINQ Provider for the Twitter API (C# Twitter Library)
Stars: ✭ 401 (-50.68%)
Mutual labels:  dotnet-standard, dotnet-core
Mathparser.org Mxparser
Math Parser Java Android C# .NET/MONO (.NET Framework, .NET Core, .NET Standard, .NET PCL, Xamarin.Android, Xamarin.iOS) CLS Library - a super easy, rich and flexible mathematical expression parser (expression evaluator, expression provided as plain text / strings) for JAVA and C#. Main features: rich built-in library of operators, constants, math functions, user defined: arguments, functions, recursive functions and general recursion (direct / indirect). Additionally parser provides grammar and internal syntax checking.
Stars: ✭ 624 (-23.25%)
Mutual labels:  dotnet-standard, dotnet-core
Alexa Skills Dotnet
An Amazon Alexa Skills SDK for .NET
Stars: ✭ 412 (-49.32%)
Mutual labels:  dotnet-standard, dotnet-core
Unity Sdk
🎮 Unity SDK to use the IBM Watson services.
Stars: ✭ 546 (-32.84%)
Mutual labels:  artificial-intelligence, unity3d
Blog Core
Modular blog using Blazor with clean domain-driven design patterns
Stars: ✭ 345 (-57.56%)
Mutual labels:  dotnet-standard, dotnet-core
Jenetics
Jenetics - Genetic Algorithm, Genetic Programming, Evolutionary Algorithm, and Multi-objective Optimization
Stars: ✭ 616 (-24.23%)
Mutual labels:  artificial-intelligence, genetic-algorithm
Steeltoe
Steeltoe .NET Core Components: CircuitBreaker, Configuration, Connectors, Discovery, Logging, Management, and Security
Stars: ✭ 612 (-24.72%)
Mutual labels:  dotnet-standard, dotnet-core
Storage
💿 Storage abstractions with implementations for .NET/.NET Standard
Stars: ✭ 380 (-53.26%)
Mutual labels:  dotnet-standard, dotnet-core
Electron.net
Build cross platform desktop apps with ASP.NET Core (Razor Pages, MVC, Blazor).
Stars: ✭ 6,074 (+647.11%)
Mutual labels:  dotnet-standard, dotnet-core
Awesome Cms Core
Awesome CMS Core is an open source CMS built using ASP.Net Core & ReactJS with module seperation concern in mind and provide lastest trend of technology like .Net Core, React, Webpack, SASS, Background Job, Message Queue.
Stars: ✭ 352 (-56.7%)
Mutual labels:  dotnet-standard, dotnet-core
Dotnet Win32 Service
Helper classes to set up and run as windows services directly on .net core. A ServiceBase alternative.
Stars: ✭ 425 (-47.72%)
Mutual labels:  dotnet-standard, dotnet-core
Config
âš™ Config.Net - the easiest configuration framework for .NET developers
Stars: ✭ 349 (-57.07%)
Mutual labels:  dotnet-standard, dotnet-core
Pagmo2
A C++ platform to perform parallel computations of optimisation tasks (global and local) via the asynchronous generalized island model.
Stars: ✭ 540 (-33.58%)
Mutual labels:  artificial-intelligence, genetic-algorithm
Artificial Intelligence
Awesome Artificial Intelligence Projects
Stars: ✭ 330 (-59.41%)
Mutual labels:  artificial-intelligence, genetic-algorithm
Car Simulator
Autonomous car simulator (based on JavaScript & WebGL) implemented by fuzzy control system, genetic algorithm and particle swarm optimization.
Stars: ✭ 335 (-58.79%)
Mutual labels:  artificial-intelligence, genetic-algorithm
Dnsserver
Technitium DNS Server
Stars: ✭ 603 (-25.83%)
Mutual labels:  dotnet-standard, dotnet-core
Featuretoggle
Simple, reliable feature toggles in .NET
Stars: ✭ 641 (-21.16%)
Mutual labels:  dotnet-standard, dotnet-core

Build status Quality status Coverage Status License Nuget Stack Overflow

GeneticSharp is a fast, extensible, multi-platform and multithreading C# Genetic Algorithm library that simplifies the development of applications using Genetic Algorithms (GAs).

Can be used in any kind of .NET Core and .NET Framework apps, like ASP .NET MVC, ASP .NET Core, Blazor, Web Forms, UWP, Windows Forms, GTK#, Xamarin and Unity3D games.


Projects, papers, journals, books, tutorials, courses and apps using GeneticSharp

Features

Chromosomes

Fitness

Add your own fitness evaluation, implementing IFitness interface.

Populations

Generations

Operators strategy

Selections

Crossovers

Mutations

Reinsertions

Terminations

Randomizations

Task executors

Samples

BlazorAI

Blazor samples

Console samples

  • AutoConfig
  • Bitmap equality
  • Equality equation
  • Equation solver
  • Function builder
  • Ghostwriter
  • TSP (Travelling Salesman Problem)

GTK# samples

  • Bitmap equality
  • Function optimization
  • Sudoku
  • TSP (Travelling Salesman Problem)

Unity3D Samples

  • Car2D
  • TSP (Travelling Salesman Problem)
  • Wall Builder

Multi-platform

  • Mono, .NET Standard 2.0 and .NET Framework 4.6.2 support
  • Fully tested on Windows and MacOS

Code quality


Setup

.NET Standard 2.0 and .NET Framework 4.6.2

Only GeneticSharp:

install-package GeneticSharp

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

install-package GeneticSharp.Extensions

Unity3D

You should use the UnityNuGet to install GeneticSharp directly from NuGet.

Or you can use the latest GeneticSharp.unitypackage available on our release page.

Mono and .NET Framework 3.5

To install previous version that support .NET Framework 3.5:

install-package GeneticSharp -Version 1.2.0

Running samples

If you want to run the console, GTK# and Unity samples, just fork this repository and follow the instruction from our setup page wiki.

An easy way to run the Unity Samples, if you have a Android device, is download it from Google Play.

Usage

Creating your own fitness evaluation

public class MyProblemFitness : IFitness
{  
	public double Evaluate (IChromosome chromosome)
	{
		// Evaluate the fitness of chromosome.
	}
}

Creating your own chromosome

public class MyProblemChromosome : ChromosomeBase
{
	// Change the argument value passed to base constructor to change the length 
	// of your chromosome.
	public MyProblemChromosome() : base(10) 
	{
		CreateGenes();
	}

	public override Gene GenerateGene (int geneIndex)
	{
		// Generate a gene base on my problem chromosome representation.
	}

	public override IChromosome CreateNew ()
	{
		return new MyProblemChromosome();
	}
}

Running your GA

var selection = new EliteSelection();
var crossover = new OrderedCrossover();
var mutation = new ReverseSequenceMutation();
var fitness = new MyProblemFitness();
var chromosome = new MyProblemChromosome();
var population = new Population (50, 70, chromosome);

var ga = new GeneticAlgorithm(population, fitness, selection, crossover, mutation);
ga.Termination = new GenerationNumberTermination(100);

Console.WriteLine("GA running...");
ga.Start();

Console.WriteLine("Best solution found has {0} fitness.", ga.BestChromosome.Fitness);

Templates for dotnet new

If you're using .NET Core, you can install GeneticSharp.Templates:

dotnet new -i GeneticSharp.Templates

There are 4 templates in GeneticSharp.Templates:

TSP Blazor application

A Blazor client application template with GeneticSharp ready to run a Travelling Salesman Problem (TSP).

dotnet new GeneticSharpTspBlazorApp -n MyNamespace -o MyOutoputFolder

Console application

A console application template with GeneticSharp, you just need to implement the chromosome and fitness function.

dotnet new GeneticSharpConsoleApp -n MyNamespace -o MyOutoputFolder

TSP Console application

A console application template with GeneticSharp ready to run a Travelling Salesman Problem (TSP).

dotnet new GeneticSharpTspConsoleApp -n MyNamespace -o MyOutoputFolder

TSP Unity3D

A Unity3D template with GeneticSharp ready to run a Travelling Salesman Problem (TSP).

dotnet new GeneticSharpTspUnity3d -n MyNamespace -o MyOutoputFolder

FAQ

Having troubles?


How to improve it?

Create a fork of GeneticSharp.

Did you change it? Submit a pull request.

License

Licensed under the The MIT License (MIT). In others words, you can use this library for developement any kind of software: open source, commercial, proprietary, etc.

Thanks to

  • AppVeyor: open source license for continuous integration.
  • JetBrains: open source license for all products pack.
  • SMASHINGLOGO: GeneticSharp's logo.
  • SonarCloud: open source license for online inspection.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].