public NeuralAI(Animal animal, Body body, DriveSystem drives, MotorSystem motor, SensorySystem senses, Phenotype phenotype) : base(body, drives, motor, senses, phenotype) { InitNetworkLayerInfoDict(); InitLayers(); InitConnections(); GetOutputConnectionDict(); InitInputs(); InitOutputs(); Feedforward(); }
void InitBodyControl(Vector3 spawn) { if (species == "Human") { animalBody = new PrimateBody(this, spawn); motorSystem = new SimplePrimateMotorSystem(this); } else { animalBody = new AnimalBody(this, spawn); } body = animalBody; visualInputCamera = animalBody.GetGameObject().GetComponentInChildren <Camera>(); }
public override void Reset() { MotorSystem.Stop(); MotorSystem = null; LastAttackTick = Environment.TickCount; LastMoveTick = Environment.TickCount; Target = null; MotorSystem = new Timer(); MotorSystem.Interval += mThinkSpeed; MotorSystem.Elapsed += new ElapsedEventHandler(MotorSystem_TakingDecision); if (mEntity.IsAlive()) { MotorSystem.Start(); } }
public AI(Body body, DriveSystem drives, MotorSystem motor, SensorySystem senses, Phenotype phenotype) { bodyStates = body.GetStates(); bodyStateLabelList = body.GetStateLabels(); bodyStateIndexDict = body.GetStateIndices(); gameobject = body.GetGameObject(); driveStates = drives.GetStates(); driveStateLabelList = drives.GetStateLabels(); driveStateIndexDict = drives.GetStateIndices(); actionStates = motor.GetStates(); actionStateLabelList = motor.GetStateLabels(); actionStateIndexDict = motor.GetStateIndices(); traits = phenotype.GetTraits(); traitLabelList = phenotype.GetTraitLabels(); traitIndexDict = phenotype.GetTraitIndices(); visualInput = senses.GetVisualInput(); }
public override void Awake() { LastAwakeTick = Environment.TickCount; MotorSystem.Start(); }
public override void Sleep() { MotorSystem.Stop(); Target = null; mEntity.TargetUID = -1; mEntity.IsInBattle = false; }
public SimpleAI(Animal animal, Body body, DriveSystem drives, MotorSystem motor, SensorySystem senses, Phenotype traits) : base(body, drives, motor, senses, traits) { thisAnimal = animal; //InitGoalDict(); }
public static void SetMotorSystem(MotorSystem motor) { motorSystem = motor; }