public ForceDNA.Genome[] ToGenomes() { ForceDNA.Genome[] gs = new ForceDNA.Genome[genomes.Length]; for (int i = 0; i < gs.Length; i++) { gs [i] = genomes [i].ToGenome(); } return(gs); }
public JSONGenome(ForceDNA.Genome gen, float score) { this.align = new JSONChrom(gen.Align); this.cohesion = new JSONChrom(gen.Cohesion); this.repulse = new JSONChrom(gen.Repulse); this.obstacle = new JSONChrom(gen.Obstacle); this.boundary = new JSONChrom(gen.Boundary); this.reward = new JSONChrom(gen.Reward); this.pathfind = new JSONPathChrom(gen.Pathfind); this.score = score; }
public override void StartGeneration(FlockControl.UnityState us) { pf.InitializeGrid(us); genome = dna.Next(); gotRewardToken = new bool[us.birds.Length]; }