Upload folder using huggingface_hub
Browse files
neural_engine/src/main.rs
CHANGED
|
@@ -145,8 +145,8 @@ fn mcts_simulate(
|
|
| 145 |
} else {
|
| 146 |
0.0
|
| 147 |
};
|
| 148 |
-
// PUCT formula with c_puct =
|
| 149 |
-
let u =
|
| 150 |
let score = q + u;
|
| 151 |
if score > best_score {
|
| 152 |
best_score = score;
|
|
@@ -226,8 +226,8 @@ fn main() {
|
|
| 226 |
"go" => {
|
| 227 |
if let Some(ref mut sess) = session {
|
| 228 |
let mut root = MCTSNode::new(1.0);
|
| 229 |
-
//
|
| 230 |
-
for _ in 0..
|
| 231 |
mcts_simulate(&mut root, board.clone(), &mut history_moves, sess, &vocab, &inv_vocab);
|
| 232 |
}
|
| 233 |
|
|
|
|
| 145 |
} else {
|
| 146 |
0.0
|
| 147 |
};
|
| 148 |
+
// PUCT formula with c_puct = 2.0
|
| 149 |
+
let u = 2.0 * child.prior * total_sqrt / (1.0 + child.visit_count as f32);
|
| 150 |
let score = q + u;
|
| 151 |
if score > best_score {
|
| 152 |
best_score = score;
|
|
|
|
| 226 |
"go" => {
|
| 227 |
if let Some(ref mut sess) = session {
|
| 228 |
let mut root = MCTSNode::new(1.0);
|
| 229 |
+
// 1000 simulations for deeper tactical evaluation (aiming for ~2400 Elo)
|
| 230 |
+
for _ in 0..1000 {
|
| 231 |
mcts_simulate(&mut root, board.clone(), &mut history_moves, sess, &vocab, &inv_vocab);
|
| 232 |
}
|
| 233 |
|