コード例 #1
0
        /// <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;
        }
コード例 #2
0
 public CognitiveArchitecture()
 {
     KnowledgeAndBeliefs        = new KnowledgeAndBeliefs();
     InternalCharacteristics    = new InternalCharacteristics();
     TasksAndPerformance        = new TasksAndPerformance();
     MessageContent             = new MessageContent();
     InteractionCharacteristics = new InteractionCharacteristics();
     InteractionPatterns        = new InteractionPatterns();
 }
コード例 #3
0
        /// <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;
        }
コード例 #4
0
        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);
        }
コード例 #5
0
        /// <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));
        }