public override void InheritFrom(AgentAlgorithm otherAlgo)//候補集合、初期値を引き継ぐ。 { if (otherAlgo is IAATBasedAgent) { AgentSpec spec = (otherAlgo as IAATBasedAgent).publishSpec(); Thought = new Thought(spec.PriorBelief); CandidateSelector = spec.CandidateSelector; Body = otherAlgo.Body; //候補集合と現在の重要視度だけは引き継ぐ } else { throw new Exception(otherAlgo.GetType().Name + "は互換性のない型です。"); } }
//*** constructor and properties ***// public Agent() { thought = new Thought(RandomPool.Get("setenv").NextNormal(0.5, 0.1));//ランダム要素はここだけ Initialize(); }