Example #1
0
    /// <summary>
    /// Reads the configuration document and passes some object instances
    /// around so different objects can refer to each other.
    /// </summary>
    void Start()
    {
        // If writeAllGenerations == true then all generations will be saved.
        // The time stamp will allow to distinguish different experiments.
        timeStamp = DateTime.Now.ToString("HHmm");
        InitSavePaths();
        InitGUI();
        Utility.DebugLog = true;
        InitExperiment();
        manual_ea = new NeatManualEvolution <NeatGenome>(this, fitness_in_manual);
        SetRaycastLayers();
        CheckUnitTag();
        StartGenomePopulation();

        // We need to load the champion now (in case we want to add a new module
        // without starting an evolutionary process first, so the program builds
        // the base on the correct genome, instead of a random genome if we skip
        // this step).
        if (LoadChampion() != null)
        {
            _ea.CurrentChampGenome = LoadChampion();
        }
        uiManager.InstantiateLoadedElements();
    }
Example #2
0
    public void SetDecoderInManualEA(NeatManualEvolution <NeatGenome> manual_ea)
    {
        IGenomeDecoder <NeatGenome, IBlackBox> genomeDecoder = CreateGenomeDecoder();

        manual_ea.Decoder = genomeDecoder;
    }