Esempio n. 1
0
    public void CreateNextGenerationAndKillPrevious()   // Tady probíhá iterace jednotlivých generací
    {
        DrawBrain.Instance.HideBrain();

        var newEntityBrainList = Genetic.ChildrenBrainList(Functions.EntitiesToBrainDictionary(entityList), GA_MutationRateInPercent01, globalSeed + seedIterator);

        destroyAllEntities();

        GenerateFromBrains(newEntityBrainList);
    }
Esempio n. 2
0
    // Tady probíhá iterace jednotlivých generací
    public void NextGeneration()
    {
        // Get the average fitness
        PrintGenerationInfo();

        var newEntityBrainList = Genetic.ChildrenBrainList(Functions.EntitiesToBrainDictionary(entityList),
                                                           GA_MutationRateInPercent01, globalSeed + seedIterator);

        CleanScene();
        GenerateFromBrains(newEntityBrainList);
    }