https://github.com/werediver/sandbox
Playing with genetic programming (grammatical evolution)
https://github.com/werediver/sandbox
Last synced: about 1 year ago
JSON representation
Playing with genetic programming (grammatical evolution)
- Host: GitHub
- URL: https://github.com/werediver/sandbox
- Owner: werediver
- Created: 2018-05-19T09:12:05.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-07-14T19:13:49.000Z (almost 8 years ago)
- Last Synced: 2024-10-19T07:53:25.377Z (over 1 year ago)
- Language: Swift
- Size: 61.5 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# A grammatical evolution playground
This is a [genetic programming](https://en.wikipedia.org/wiki/Genetic_programming) (GP) system inspired by the [grammatical evolution](https://en.wikipedia.org/wiki/Grammatical_evolution) (GE) technique.
Unlike a classical GE system, this one uses a _subtree_ crossover and a _subtree-local_ mutation operator, thus eliminating the destructive effect of (naive) GE genetic operators, and always operates on valid pruned genotypes.
Unlike a classical GP system, this one operates on linear genotypes mapping them to executable phenotypes by applying a grammar-based transformation.
## Santa Fe Trail problem
Santa Fe Trail problem is used as a test problem during the development of the system.
Here is [a short video](https://youtu.be/InpbbgpDQkg) demonstrating the system in work! (and no, it does not always find a solution so fast; somewhere around six to eight out of ten times it doesn't find one at all)
## Running
```
$ swift run
```