Esempio n. 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);
 }
Esempio n. 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);
 }
Esempio n. 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);
 }
Esempio n. 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);
 }
Esempio n. 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);
 }
Esempio n. 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);
 }
Esempio n. 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());
     }
 }
Esempio n. 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());
     }
 }