+ //console.log(moves1.map(m => { return [this.getNotation(m), m.eval]; }));
+
+ let candidates = [0]; //indices of candidates moves
+ for (let j=1; j<moves1.length && moves1[j].eval == moves1[0].eval; j++)
+ candidates.push(j);
+ let currentBest = moves1[_.sample(candidates, 1)];