Example #1
0
 /// <summary>
 /// Set seed of the random numbers generator.
 /// </summary>
 ///
 /// <param name="seed">Seed value.</param>
 ///
 /// <remarks>Resets random numbers generator initializing it with
 /// specified seed value.</remarks>
 ///
 public void SetSeed(int seed)
 {
     rand = new ThreadSafeRandom(seed);
 }
Example #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UniformOneGenerator"/> class.
 /// </summary>
 ///
 /// <remarks>Initializes random numbers generator with zero seed.</remarks>
 ///
 public UniformOneGenerator()
 {
     rand = new ThreadSafeRandom(0);
 }
Example #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UniformOneGenerator"/> class.
 /// </summary>
 ///
 /// <param name="seed">Seed value to initialize random numbers generator.</param>
 ///
 public UniformOneGenerator(int seed)
 {
     rand = new ThreadSafeRandom(seed);
 }
Example #4
0
 /// <summary>
 /// Set seed of the random numbers generator.
 /// </summary>
 /// 
 /// <param name="seed">Seed value.</param>
 /// 
 /// <remarks>Resets random numbers generator initializing it with
 /// specified seed value.</remarks>
 /// 
 public void SetSeed(int seed)
 {
     rand = new ThreadSafeRandom(seed);
 }
Example #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UniformOneGenerator"/> class.
 /// </summary>
 /// 
 /// <param name="seed">Seed value to initialize random numbers generator.</param>
 /// 
 public UniformOneGenerator(int seed)
 {
     rand = new ThreadSafeRandom(seed);
 }
Example #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UniformOneGenerator"/> class.
 /// </summary>
 /// 
 /// <remarks>Initializes random numbers generator with zero seed.</remarks>
 /// 
 public UniformOneGenerator()
 {
     rand = new ThreadSafeRandom(0);
 }
Example #7
0
 public GameAINeuroEvolutionaryLearning(int size, FileStream file)
 {
     population = new List<Strategy>();
     this.size = size;
     rand = new ThreadSafeRandom();
     Strategy strategy = (Strategy)Network.Load(file);
     population.Add(strategy);
     for (int i = 0; i < size - 1; i++)
     {
         population.Add(strategy.CreateNew());
     }
 }
Example #8
0
 public GameAINeuroEvolutionaryLearning(int size)
 {
     population = new List<Strategy>();
     this.size = size;
     rand = new ThreadSafeRandom();
     Strategy strategy = new Strategy(
         //new SigmoidFunction(),
         new LineFunction(),
         Settings.MAX_CHESSES,
         Settings.NETWORK_STRUCT);
     population.Add(strategy);
     for (int i = 0; i < size - 1; i++)
     {
         population.Add(strategy.CreateNew());
     }
 }