コード例 #1
0
ファイル: Species.cs プロジェクト: alekscc/AvoidObstacles
        public Species(Genome representative)
        {
            Population = new List <Genome>();

            this.representative = representative;
            this.representative.SetSpecies(this);

            Population.Add(this.representative);

            //Random rand = new Random(new Random().Next());

            color = GenomeUtils.GetRandomColor3f();
        }
コード例 #2
0
 private float GetRandomWeight()
 {
     return(GenomeUtils.GetRandomWeight());
 }
コード例 #3
0
 public void ShiftWeight(float shiftStrength)
 {
     Weight *= GenomeUtils.GetRandomNumber() * shiftStrength;
 }
コード例 #4
0
 public void RandomizeWeight()
 {
     Weight = GenomeUtils.GetRandomWeight();
 }