Example #1
0
 /// <summary>
 /// The training will be started from randomly generated AIs
 /// </summary>
 /// <param name="gc"></param>
 public Simulation(Models.GameConfiguration gc)
 {
     this.gc = gc;
     ais     = new AiPlayed[gc.NumberOfAIs];
     for (int i = 0; i < ais.Length; i++)
     {
         ais[i] = new AiPlayed(new Brain(gc.NeuronCount, gc.LayerCount, gc.MemoryNeuronCount), ais.Length);
     }
 }
Example #2
0
 /// <summary>
 /// The training will be based on the given <paramref name="baseBrain"/>, with the first AI being the one given, and the rest being its children
 /// </summary>
 /// <param name="baseBrain"></param>
 /// <param name="gc"></param>
 public Simulation(Brain baseBrain, Models.GameConfiguration gc)
 {
     this.gc = gc;
     ais     = new AiPlayed[gc.NumberOfAIs];
     ais[0]  = new AiPlayed(baseBrain, ais.Length);
     for (int i = 1; i < ais.Length; i++)
     {
         ais[i] = new AiPlayed(baseBrain.GenerateChild(gc.BaseEvolutionFactor), ais.Length);
     }
 }