Beispiel #1
0
        public async void Load()
        {
            //await GernerateBug(GeneratorController.SafeRandom().Next(1, 3), GeneratorController.SafeRandom().Next(2, 6));
            await GernerateBug(4, 0);
            mBugStructur = GetBugStructur();

            SetDefaults();
        }
Beispiel #2
0
        public void Load(BugDNA dna)
        {
            GenerateBug(dna.Stucture);
            mBugStructur = dna.Stucture;

            MutationRate = dna[BugValue.MutationRate];
            Speed = dna[BugValue.Speed];
            TurnMomentum = dna[BugValue.TurnMomentum];
            FoodHealth = dna[BugValue.FoodHealth];
            SightDistance = dna[BugValue.SightDistance];

            pBrain = new Brain(false);
            pBrain.SetNeuronValues(dna.Weights, dna.Bases);

            CalculateValues();
        }