/// <summary> /// Factory method to create an agent /// Call the Initialize method /// </summary> /// <returns></returns> public new static LearnByAskingAgent CreateInstance(SymuEnvironment environment, CognitiveArchitectureTemplate template) { if (environment == null) { throw new ArgumentNullException(nameof(environment)); } var agent = new LearnByAskingAgent(environment, template); agent.Initialize(); return(agent); }
public override void SetAgents() { base.SetAgents(); LearnFromSourceAgent = LearnFromSourceAgent.CreateInstance(this, MainOrganization.Templates.Human); LearnByDoingAgent = LearnByDoingAgent.CreateInstance(this, MainOrganization.Templates.Human); LearnByAskingAgent = LearnByAskingAgent.CreateInstance(this, MainOrganization.Templates.Human); DoesNotLearnAgent = LearnAgent.CreateInstance(this, MainOrganization.Templates.Human); ExpertAgent = ExpertAgent.CreateInstance(this, MainOrganization.Templates.Human); // Active link between expert and LearnByAskingAgent to be able to exchange information ActorActor.CreateInstance(MainOrganization.ArtifactNetwork.ActorActor, LearnByAskingAgent.AgentId, ExpertAgent.AgentId); }