/// <summary> /// Given the IGEPOrganism's immediate surroundings (i.e. the "input"), /// "Runs" the IGEPOrganism which results in its Behavior (i.e. the "ouput"). /// </summary> /// <returns></returns> public IGEPBehavior Behave(IGEPSurroundings surroundings) { this.GlobalRegistry.Clear(); this.ResultsRegistry.Clear(); this.AssignGeneIdentifiers(); var success = true; foreach (var chromosome in this) { if (!chromosome.Behave(new GEPChromosomeSurroundings(surroundings)).Success) { success = false; break; } } return new GEPBehavior(success: success); ; }
public GEPPhenome(IGEPOrganism organism, IGEPSurroundings surroundings) : base(organism: organism, surroundings: surroundings) { }
/// <summary> /// /// </summary> /// <param name="organismSurroundings">The data passed to the parent IGEPOrganism.</param> public GEPChromosomeSurroundings(IGEPSurroundings organismSurroundings) : base(organismSurroundings) { }
protected GEPPhenomeBase(IGEPOrganism organism, IGEPSurroundings surroundings) : base(organism: organism, surroundings: surroundings) { }
protected GEPChromosomeSurroundingsBase(IGEPSurroundings organismSurroundings) : base(organismSurroundings) { }