From 5efe1af18bd92533154d02a90cf2181452809087 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Wed, 25 Jan 2023 06:50:10 +0300 Subject: feat: use constant RNG seed --- src/board/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/board/mod.rs b/src/board/mod.rs index 61327eb..19c25ac 100644 --- a/src/board/mod.rs +++ b/src/board/mod.rs @@ -1,4 +1,4 @@ -use rand::Rng; +use rand::{rngs::StdRng,SeedableRng,Rng}; use crate::{bitboard::{Bitboard, serialize_bitboard, bitscan, pop_count}, moves::{Move, MoveKind}, attacks::Attacks, square::Square}; use self::ttable::{TranspositionTable, TTABLE_SIZE}; @@ -126,7 +126,7 @@ impl Board { } } - let mut rng = rand::thread_rng(); + let mut rng = StdRng::seed_from_u64(228); let zobrist_seed = [(); 781].map(|_| rng.gen()); let mut board = Self { -- cgit v1.2.3