From dd9b3d6cd0fd26866f6b8680347cecd9de6e6ed5 Mon Sep 17 00:00:00 2001 From: Rak Laptudirm Date: Fri, 7 Jun 2024 01:48:37 +0530 Subject: [PATCH] chore: hopefully fix policy inference --- src/mcts/policy.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mcts/policy.rs b/src/mcts/policy.rs index 1641596..4077fab 100644 --- a/src/mcts/policy.rs +++ b/src/mcts/policy.rs @@ -50,7 +50,12 @@ impl PolicyNetwork { let from_subnet = &self.subnets[(mov.source() as usize).min(49)]; let from_vec = from_subnet.out(feats); - let to_subnet = &self.subnets[50 + (mov.target() as usize).min(48)]; + let target = if mov.is_single() { + 63 + } else { + mov.target() as usize + }; + let to_subnet = &self.subnets[50 + (target).min(48)]; let to_vec = to_subnet.out(feats); from_vec.dot(&to_vec)