#include "evaluate.h"
#include "movegen.h"
#include "movepick.h"
-#include "rkiss.h"
+#include "misc.h"
#include "search.h"
#include "timeman.h"
#include "thread.h"
Move Skill::pick_move() {
- static RKISS rk;
-
- // PRNG sequence should be not deterministic
- for (int i = Time::now() % 50; i > 0; --i)
- rk.rand<unsigned>();
+ // PRNG sequence should be non-deterministic, so we seed it with the time at init
+ static PRNG rng(Time::now());
// RootMoves are already sorted by score in descending order
int variance = std::min(RootMoves[0].score - RootMoves[candidates - 1].score, PawnValueMg);
// This is our magic formula
score += ( weakness * int(RootMoves[0].score - score)
- + variance * (rk.rand<unsigned>() % weakness)) / 128;
+ + variance * (rng.rand<unsigned>() % weakness)) / 128;
if (score > maxScore)
{