/// <summary> /// Initialize Knowledge model : /// update NetworkKnowledges /// </summary> /// <param name="agentId"></param> /// <param name="entity"></param> /// <param name="cognitiveArchitecture"></param> /// <param name="network"></param> /// <param name="model"></param> public KnowledgeModel(IAgentId agentId, KnowledgeModelEntity entity, CognitiveArchitecture cognitiveArchitecture, GraphMetaNetwork network, RandomGenerator model) { if (entity is null) { throw new ArgumentNullException(nameof(entity)); } if (network == null) { throw new ArgumentNullException(nameof(network)); } if (cognitiveArchitecture == null) { throw new ArgumentNullException(nameof(cognitiveArchitecture)); } On = entity.IsAgentOn(); _agentId = agentId; _knowledgeNetwork = network.Knowledge; _actorKnowledgeNetwork = network.ActorKnowledge; _knowledgeAndBeliefs = cognitiveArchitecture.KnowledgeAndBeliefs; _messageContent = cognitiveArchitecture.MessageContent; _model = model; }
public CognitiveArchitecture() { KnowledgeAndBeliefs = new KnowledgeAndBeliefs(); InternalCharacteristics = new InternalCharacteristics(); TasksAndPerformance = new TasksAndPerformance(); MessageContent = new MessageContent(); InteractionCharacteristics = new InteractionCharacteristics(); InteractionPatterns = new InteractionPatterns(); }
/// <summary> /// Clone KnowledgeAndBeliefs /// </summary> /// <param name="knowledgeAndBeliefs"></param> public void CopyTo(KnowledgeAndBeliefs knowledgeAndBeliefs) { if (knowledgeAndBeliefs is null) { throw new ArgumentNullException(nameof(knowledgeAndBeliefs)); } knowledgeAndBeliefs.HasInitialKnowledge = HasInitialKnowledge; knowledgeAndBeliefs.HasKnowledge = HasKnowledge; knowledgeAndBeliefs.HasInitialBelief = HasInitialBelief; knowledgeAndBeliefs.DefaultBeliefLevel = DefaultBeliefLevel; knowledgeAndBeliefs.HasBelief = HasBelief; }
public void CopyTo(CognitiveArchitecture cognitive) { if (cognitive is null) { throw new ArgumentNullException(nameof(cognitive)); } KnowledgeAndBeliefs.CopyTo(cognitive.KnowledgeAndBeliefs); InternalCharacteristics.CopyTo(cognitive.InternalCharacteristics); TasksAndPerformance.CopyTo(cognitive.TasksAndPerformance); MessageContent.CopyTo(cognitive.MessageContent); InteractionCharacteristics.CopyTo(cognitive.InteractionCharacteristics); InteractionPatterns.CopyTo(cognitive.InteractionPatterns); }
/// <summary> /// Initialize Beliefs model : /// update NetworkBeliefs /// </summary> /// <param name="agentId"></param> /// <param name="entity"></param> /// <param name="cognitiveArchitecture"></param> /// <param name="network"></param> /// <param name="model"></param> public BeliefsModel(IAgentId agentId, BeliefModelEntity entity, CognitiveArchitecture cognitiveArchitecture, GraphMetaNetwork network, RandomGenerator model) { if (network == null) { throw new ArgumentNullException(nameof(network)); } if (cognitiveArchitecture == null) { throw new ArgumentNullException(nameof(cognitiveArchitecture)); } _agentId = agentId; _beliefNetwork = network.Belief; _actorBeliefNetwork = network.ActorBelief; _knowledgeAndBeliefs = cognitiveArchitecture.KnowledgeAndBeliefs; _messageContent = cognitiveArchitecture.MessageContent; _model = model; Entity = entity ?? throw new ArgumentNullException(nameof(entity)); }