Esempio n. 1
0
    /// <summary>
    /// Make this the active module if it is not already.
    /// If the module has basic regulation it is also (provisionally) made
    /// the only active module (children left normal). This is so during evolution
    /// only the behaviour of this module is shown, with no interference.
    /// </summary>
    protected void EvolveContinue(List <int> childrenId)
    {
        if (!isActive)
        {
            // This will be a new evolutionary process, so we need to set this
            // module as the active module in the genome!
            uiManager.SetModuleActive(moduleId);
        }

        // If this module uses basic regulation, then we set it as the only
        // active module! (its children will also remain active!)
        //
        // USE WITH ADVANCED REGULATION IS NOT FULLY SUPPORTED YET: USE WITH
        // CAUTION!
        newLink newRegulation = new newLink();

        // Regulation from bias
        newRegulation.otherNeuron = 0;
        // With weight 1
        newRegulation.weight = 1.0;
        // Takes the ID following that of the regulatory neuron
        newRegulation.id = regulatoryId + 1;

        uiManager.MakeOnlyActiveMod(moduleId, newRegulation, childrenId);

        uiManager.LaunchEvolution();
    }