6X6DDDY32EIHOKTZ2PXAE4G7DJGRC46MCQGWNV2EATJUAHHUDSUAC
X5QZYNRWTJ34XIIFY23MMQOGV6KASGYSRUMWL3U3A7GSV5JJERTAC
LT2L5OITYEO7I6P5WA35E5FJ5AUGPMLFYYKPVI4WLBIH65AINECQC
UXWFBRYCNZIYOGP6MGMT5KGY6NFS566QDDJJZIP3YJODQI5QIHDAC
U3JHTSEMJLXNKOMAQJQPZKRW6GRPHYLG6DK53XVADIETKVCS2MFQC
KN2H7F5CIEAKA5XQ4NQXAZV25VNZ6AV7Q3M2FVOX2JF7JKMDFDCAC
WN26XTZ7IZN4WNAVXZ4NKD4CXIU7IC6V7BFNVICNMQUVHBZXBNCAC
5DXEINBALWSESZ4NDJOQKB4JOIQKEOTPVQQJ7TS2GRWS4JLRYXFQC
5H3MOKBPGSOSPZW2VIGCWZC5DUTTMJ7PYRERELC7ANHMNPGM3JEQC
gameState: gameState,
backpropObserver: backpropObserver,
move: move,
parent: this,
root: root,
c: c,
depth: depth + 1,
nnpv: nnpv,
useValueAfterDepth: useValueAfterDepth,
valueThreshold: valueThreshold);
gameState: gameState,
backpropObserver: backpropObserver,
move: move,
parent: this,
root: root,
c: c,
depth: depth + 1,
nnpv: nnpv,
useValueAfterDepth: useValueAfterDepth,
valueThreshold: valueThreshold,
); //q: initialQs[move] ?? 0);
var ucb = ((winsByPlayer[player] ?? 0 + (draws * 0)) / visits) +
(c * priorScore * sqrt(log(parent!.visits.toDouble() / visits)));
return ucb;
if (priorScore == 1.0) {
return ((winsByPlayer[player] ?? 0 + (draws * 0.5)) / visits) +
(c * sqrt(log(parent!.visits.toDouble()) / visits));
} else {
// Q[s][a] + c_puct*P[s][a]*sqrt(sum(N[s]))/(1+N[s][a])
return q +
c *
priorScore *
sqrt(parent!.visits.toDouble()) /
(1.0 + visits.toDouble());
}