https://github.com/nightblade9/genetic-engine
A lightweight solution allowing you to solve problems using genetic programming and genetic algorithms.
https://github.com/nightblade9/genetic-engine
ai genetic-engine genetic-programming
Last synced: about 1 month ago
JSON representation
A lightweight solution allowing you to solve problems using genetic programming and genetic algorithms.
- Host: GitHub
- URL: https://github.com/nightblade9/genetic-engine
- Owner: nightblade9
- Created: 2019-09-09T15:43:55.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-02-26T13:30:53.000Z (over 5 years ago)
- Last Synced: 2025-01-02T02:13:55.308Z (10 months ago)
- Topics: ai, genetic-engine, genetic-programming
- Language: C#
- Homepage:
- Size: 138 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Genetic Engine
[](https://travis-ci.com/nightblade9/genetic-engine)
A simple genetic engine, for applying genetic programming or genetic algorithms to your C# projects.
You can see the `SampleSolutions` project as a sample. It uses genetic programming to derive an algorithm to generate solutions to various problems:
- The backpacking problem (optimizing value given weight and limited capacit)
- Linear regression (curve fitting)# A Note about Fitness
Fitness must be deterministic. Since we calculate it in parallel, make sure all of your variables, references, etc. are copied. If they're not, or if there's use of random, you will end up with fitness dropping for no reason between generations, and an exception throws.
The reason is not related to elitism being broken; it's because the same solution, when evaluated in multiple threads or multiple times, results in a different fitness calculation. Check your code carefully. Use locks if nothing else works, but be prepared for slow evaluation.