/// <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); }
/// <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); }
/// <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); }
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()); } }
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()); } }