updates
This commit is contained in:
+2
-3
@@ -10,7 +10,6 @@ use chess::Piece::{Bishop, Knight, Pawn, Queen, Rook};
|
||||
use chess::{Board, ChessMove, Color, MoveGen, Piece, ALL_COLORS, ALL_PIECES};
|
||||
use std::collections::HashMap;
|
||||
use std::marker::PhantomData;
|
||||
use std::time::Instant;
|
||||
|
||||
pub struct Node {
|
||||
pub prior: f32,
|
||||
@@ -168,9 +167,9 @@ impl<B: Backend> Mcts<B> {
|
||||
let state: Tensor<B, 4> =
|
||||
encode_board_state_perspective(&arena[node_idx].board_state, device)
|
||||
.reshape([1, 18, 8, 8]);
|
||||
let start = Instant::now();
|
||||
// let start = Instant::now();
|
||||
let (policy_head, value_head) = model.forward(state);
|
||||
println!("time: {:?}", start.elapsed());
|
||||
// println!("time: {:?}", start.elapsed());
|
||||
|
||||
let legal_moves: Vec<ChessMove> =
|
||||
MoveGen::new_legal(&arena[node_idx].board_state.board).collect();
|
||||
|
||||
Reference in New Issue
Block a user