All Projects → ashleve → EvOLuTIoN

ashleve / EvOLuTIoN

Licence: MIT license
A simple simulation in Unity, which uses genetic algorithm to optimize forces applied to cubes

Programming Languages

C#
18002 projects
ShaderLab
938 projects

Projects that are alternatives of or similar to EvOLuTIoN

datafsm
Machine Learning Finite State Machine Models from Data with Genetic Algorithms
Stars: ✭ 14 (-68.18%)
Mutual labels:  genetic-algorithm, evolutionary-algorithms, fitness-score
Eaopt
🍀 Evolutionary optimization library for Go (genetic algorithm, partical swarm optimization, differential evolution)
Stars: ✭ 718 (+1531.82%)
Mutual labels:  genetic-algorithm, evolutionary-algorithms
Jenetics
Jenetics - Genetic Algorithm, Genetic Programming, Evolutionary Algorithm, and Multi-objective Optimization
Stars: ✭ 616 (+1300%)
Mutual labels:  genetic-algorithm, evolutionary-algorithms
Evolutionary.jl
Evolutionary & genetic algorithms for Julia
Stars: ✭ 142 (+222.73%)
Mutual labels:  genetic-algorithm, evolutionary-algorithms
NEATEST
NEATEST: Evolving Neural Networks Through Augmenting Topologies with Evolution Strategy Training
Stars: ✭ 13 (-70.45%)
Mutual labels:  genetic-algorithm, evolutionary-algorithms
Geneticalgorithmpython
Source code of PyGAD, a Python 3 library for building the genetic algorithm and training machine learning algorithms (Keras & PyTorch).
Stars: ✭ 435 (+888.64%)
Mutual labels:  genetic-algorithm, evolutionary-algorithms
Mealpy
A collection of the state-of-the-art MEta-heuristics ALgorithms in PYthon (mealpy)
Stars: ✭ 72 (+63.64%)
Mutual labels:  genetic-algorithm, evolutionary-algorithms
evoli
Genetic Algorithm and Particle Swarm Optimization
Stars: ✭ 22 (-50%)
Mutual labels:  genetic-algorithm, evolutionary-algorithms
Bluepyopt
Blue Brain Python Optimisation Library
Stars: ✭ 143 (+225%)
Mutual labels:  genetic-algorithm, evolutionary-algorithms
Evolutionary Computation Course
Jupyter/IPython notebooks about evolutionary computation.
Stars: ✭ 173 (+293.18%)
Mutual labels:  genetic-algorithm, evolutionary-algorithms
Watchmaker
The Watchmaker Framework for Evolutionary Computation
Stars: ✭ 189 (+329.55%)
Mutual labels:  genetic-algorithm, evolutionary-algorithms
tiny gp
Tiny Genetic Programming in Python
Stars: ✭ 58 (+31.82%)
Mutual labels:  genetic-algorithm, evolutionary-algorithms
GeneticAlgorithmForFeatureSelection
Search the best feature subset for you classification mode
Stars: ✭ 82 (+86.36%)
Mutual labels:  genetic-algorithm, evolutionary-algorithms
Pagmo2
A C++ platform to perform parallel computations of optimisation tasks (global and local) via the asynchronous generalized island model.
Stars: ✭ 540 (+1127.27%)
Mutual labels:  genetic-algorithm, evolutionary-algorithms
GeneticsJS
Evolutionary algorithms library for the web 🧬
Stars: ✭ 25 (-43.18%)
Mutual labels:  genetic-algorithm, evolutionary-algorithms
Applying eanns
A 2D Unity simulation in which cars learn to navigate themselves through different courses. The cars are steered by a feedforward neural network. The weights of the network are trained using a modified genetic algorithm.
Stars: ✭ 1,093 (+2384.09%)
Mutual labels:  genetic-algorithm, evolutionary-algorithms
TorchGA
Train PyTorch Models using the Genetic Algorithm with PyGAD
Stars: ✭ 47 (+6.82%)
Mutual labels:  genetic-algorithm, evolutionary-algorithms
goga
Go evolutionary algorithm is a computer library for developing evolutionary and genetic algorithms to solve optimisation problems with (or not) many constraints and many objectives. Also, a goal is to handle mixed-type representations (reals and integers).
Stars: ✭ 39 (-11.36%)
Mutual labels:  genetic-algorithm, evolutionary-algorithms
Evolutionsimulator
Evolution Simulator with Box2D
Stars: ✭ 143 (+225%)
Mutual labels:  genetic-algorithm, evolutionary-algorithms
Circle Evolution
Evolutionary Art Using Circles in Python
Stars: ✭ 237 (+438.64%)
Mutual labels:  genetic-algorithm, evolutionary-algorithms

EvOLuTIoN

A simple simulation in Unity, which uses genetic algorithm to optimize forces applied to cubes.

Download

Unity game build:
https://github.com/hobogalaxy/EvOLuTIoN/releases/download/v1.0/GenAlgBuild.zip

How Does It Work

Each cube spawns with an instance of Player.cs script that contains his array of 3D vectors. Those vectors are applied to player as forces over time.

The genetic algorithm optimises those vectors.

What it means is players don't learn how to navigate in the environment, they only memorise the vectors that enable them to get closer to the goal.

You can find the algorithm scripts in Assets>>Scripts>>AlgorithmScripts

Population.cs contains the Genetic Algorithm applied by NaturalSelection() function.

    void NaturalSelection()
    {
        SetChampion();  //finds the best player from generation

        CalculateFitness();
        CalculateFitnessSum();  //needed for selecting parents

        CopyBrain(Players[0], champion);   //best player is always reborn in next generation 
                                           //unchanged as player0

        for (int i = 1; i < playerNum; i++)
        {
            GameObject parent = SelectParent();
            CopyBrain(Players[i], parent);
            Mutate(Players[i]);
        }
        
    }

Each player has only one parent, no crossover is used.

Other mechanics:

  • The green cube is the best player from previous generation, which is always reborn without any mutations
  • Incremental learning is applied, which means each player has a certain lifespan which is increased each 5 generations. This is to give them time to master their first moves before moving on to the next ones.
  • When the first player reaches the goal, the minStep variable is assigned which is the minimum of steps he needed to take to reach the goal. From now on, if any player takes more steps then minStep, he will die. This makes them optimise their way so they get to the goal faster each generation.
  • The jumping is enabled just by giving players the abilty to have vectors mutated on Y axis (they're mutated only on X and Z by default).

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].