protected AltruismSocialManager(ISocialAgent agent) : base(agent) { this.ExternalLegitimacySignal = new StatisticalQuantity(); this.InternalLegitimacySignal = new StatisticalQuantity(); this.SocialSignal = new StatisticalQuantity(); this.CumulativeSocialEncounters = new StatisticalQuantity(); }
protected StatisticsCollection GetSignalQuantityList(ISocialAgent agent) { return(new StatisticsCollection { //{"Internal L-signal", this.GetAgentQuantityAverage(agent, "Internal L-signal")}, //{"External L-signal", this.GetAgentQuantityAverage(agent, "External L-signal")} { "OtherHungerSignal", this.GetAgentQuantityAverage(agent.AgentIdx, "OtherHungerSignal") }, { "OtherWorseSignal", this.GetAgentQuantityAverage(agent.AgentIdx, "OtherWorseSignal") }, { "OtherPresenceSignal", this.GetAgentQuantityAverage(agent.AgentIdx, "OtherPresenceSignal") }, { "IntPerfSignal", this.GetAgentQuantityAverage(agent.AgentIdx, "IntPerfSignal") }, { "IntEchoSignal", this.GetAgentQuantityAverage(agent.AgentIdx, "IntEchoSignal") }, { "ExtEchoSignal", this.GetAgentQuantityAverage(agent.AgentIdx, "ExtEchoSignal") } }); }
protected virtual SocialScenario CreateTestProfile( uint testType, ISocialAgent agent, FoodSharingEnvironment environment, string envConfigFile, uint numAgents, uint maxStates, bool strongerAgent, string agentImgPrefix, uint numFoodResources, uint maxStepsWithoutEating, double hungryReward, bool seeFoodFromAfar, bool soloHunting) { return(new FoodSharingScenario(agent, environment, this) { FilePath = this.GetFilePath(testType), EnvironmentConfigFile = this.GetEnvironmentFilePath(envConfigFile), TestMeasuresFilePath = this.GetTestMeasuresFilePath(testType), FitnessText = FITNESS_TEXT, NumAgents = numAgents, MaxStates = maxStates, StrongerAgent = strongerAgent, AgentImgPrefix = agentImgPrefix, NumFoodResources = numFoodResources, MaxStepsWithoutEating = maxStepsWithoutEating, HungryReward = hungryReward, SeeFoodFromAfar = seeFoodFromAfar, SoloHunting = soloHunting, PopulationFitnessFunction = new AvgMinStdDevPopFitFunction() }); }
public int CompareTo(ISocialAgent other) { return(this.Fitness.Value.CompareTo(other.Fitness.Value)); }
public FoodSharingScenario( ISocialAgent baseAgent, ISocialEnvironment baseEnvironment, ISocialTestsConfig testsConfig) : base(baseAgent, baseEnvironment, testsConfig) { }
public SocialScenario(ISocialAgent baseAgent, ISocialEnvironment baseEnvironment, ITestsConfig testsConfig) : base(baseAgent, baseEnvironment, testsConfig) { //default fitness function this.PopulationFitnessFunction = new MeanPopFitnessFunction(); }
public AltruismMotivationManager(ISocialAgent agent) : base((ICellAgent) agent) { this.Hunger = new Need("hunger", 1, 0, 0, 0) {Value = 1}; }