public void SetCognitiveArchitecture(CommunicationTemplate medium) { if (medium == null) { throw new ArgumentNullException(nameof(medium)); } CognitiveArchitecture = new CognitiveArchitecture(); // Communication CognitiveArchitecture.MessageContent.MaximumNumberOfBitsOfBeliefToSend = medium.MaximumNumberOfBitsOfBeliefToSend; CognitiveArchitecture.MessageContent.MaximumNumberOfBitsOfKnowledgeToSend = medium.MaximumNumberOfBitsOfKnowledgeToSend; CognitiveArchitecture.MessageContent.MinimumBeliefToSendPerBit = medium.MinimumBeliefToSendPerBit; CognitiveArchitecture.MessageContent.MinimumKnowledgeToSendPerBit = medium.MinimumKnowledgeToSendPerBit; CognitiveArchitecture.MessageContent.MinimumNumberOfBitsOfBeliefToSend = medium.MinimumNumberOfBitsOfBeliefToSend; CognitiveArchitecture.MessageContent.MinimumNumberOfBitsOfKnowledgeToSend = medium.MinimumNumberOfBitsOfKnowledgeToSend; CognitiveArchitecture.InternalCharacteristics.TimeToLive = medium.TimeToLive; // Knowledge CognitiveArchitecture.TasksAndPerformance.LearningRate = 1; CognitiveArchitecture.InternalCharacteristics.CanLearn = true; CognitiveArchitecture.KnowledgeAndBeliefs.HasKnowledge = true; }
public void Initialize() { _cognitiveArchitecture = new CognitiveArchitecture { KnowledgeAndBeliefs = { HasBelief = true, HasKnowledge = true }, MessageContent = { CanReceiveBeliefs = true, CanReceiveKnowledge = true }, InternalCharacteristics = { CanLearn = true, CanForget = true, CanInfluenceOrBeInfluence = true } }; _knowledge = new Knowledge(Network, MainOrganization.Models, "1", 1); var modelEntity = new BeliefModelEntity { On = true }; _beliefsModel = new BeliefsModel(_agentId, modelEntity, _cognitiveArchitecture, Network, MainOrganization.Models.Generator); _belief = new Belief(Network, 1, RandomGenerator.RandomUniform, BeliefWeightLevel.RandomWeight); _beliefBitsNonNeutral = _belief.InitializeBits(MainOrganization.Models.Generator, BeliefLevel.NeitherAgreeNorDisagree); _beliefBitsNeutral = _belief.InitializeBits(MainOrganization.Models.Generator, BeliefLevel.NoBelief); _actorBelief = new ActorBelief(Network.ActorBelief, _agentId, _belief.EntityId, BeliefLevel.NeitherAgreeNorDisagree); _taskBits.SetMandatory(new byte[] { 0 }); _taskBits.SetRequired(new byte[] { 0 }); }
public void Initialize() { _cognitiveArchitecture = new CognitiveArchitecture { KnowledgeAndBeliefs = { HasBelief = true, HasKnowledge = true }, MessageContent = { CanReceiveBeliefs = true, CanReceiveKnowledge = true }, InternalCharacteristics = { CanLearn = true, CanForget = true, CanInfluenceOrBeInfluence = true } }; var modelEntity = new KnowledgeModelEntity { On = true }; _knowledgeModel = new KnowledgeModel(_agentId, modelEntity, _cognitiveArchitecture, Network, RandomGenerator.RandomBinary); _knowledge = new Knowledge(Network, MainOrganization.Models, "1", 1); _knowledge1 = new Knowledge(Network, MainOrganization.Models, "1", 1); _knowledge2 = new Knowledge(Network, MainOrganization.Models, "1", 1); _knowledge3 = new Knowledge(Network, MainOrganization.Models, "1", 1); _taskBits.SetMandatory(new byte[] { 0 }); _taskBits.SetRequired(new byte[] { 0 }); _actorKnowledge0 = new ActorKnowledge(_agentId, _knowledge.EntityId, _knowledge0Bits, 0, -1); _actorKnowledge1 = new ActorKnowledge(_agentId, _knowledge1.EntityId, _knowledge1Bits, 0, -1); _actorKnowledge01 = new ActorKnowledge(_agentId, _knowledge2.EntityId, _knowledge01Bits, 0, -1); _actorKnowledgeFloat = new ActorKnowledge(_agentId, _knowledge3.EntityId, _knowledgeFloatBits, 0, -1); }
public void Set(CognitiveArchitecture cognitive) { if (cognitive is null) { throw new ArgumentNullException(nameof(cognitive)); } Cognitive.CopyTo(cognitive); }
public void InitializeModel(RandomLevel randomLevelLevel, bool modelOn) { Environment.RandomLevel = randomLevelLevel; _cognitiveArchitecture = new CognitiveArchitecture(); _cognitiveArchitecture.InternalCharacteristics.CanLearn = true; _learningModel = new LearningModel(_agentId, MainOrganization.Models, Network.Knowledge, Network.ActorKnowledge, _cognitiveArchitecture, RandomGenerator.RandomBinary, Environment.RandomLevelValue) { On = modelOn, RateOfAgentsOn = 1 }; }
public void Initialize() { _knowledge = new Knowledge(Network, MainOrganization.Models, "1", 1); _taskBits.SetMandatory(new byte[] { 0 }); _taskBits.SetRequired(new byte[] { 0 }); _forgetting.On = true; _forgetting.RateOfAgentsOn = 1; _cognitiveArchitecture = new CognitiveArchitecture(); _cognitiveArchitecture.KnowledgeAndBeliefs.HasKnowledge = true; _cognitiveArchitecture.InternalCharacteristics.ForgettingSelectingMode = ForgettingSelectingMode.Random; _internalCharacteristics = _cognitiveArchitecture.InternalCharacteristics; }
/// <summary> /// Clone the cognitive architecture of the agent /// Applying AgentTemplate /// </summary> /// <param name="agentTemplate"></param> protected void SetTemplate(CognitiveArchitectureTemplate agentTemplate) { Cognitive = new CognitiveArchitecture(); //Apply Cognitive template agentTemplate?.Set(Cognitive); }
public Database() { CognitiveArchitecture = new CognitiveArchitecture(); }