size adjust

This commit is contained in:
2026-08-25 13:51:55 -04:00
parent d3bc5fbd53
commit 55dc0bf737
2 changed files with 8 additions and 8 deletions
+5 -5
View File
@@ -16,7 +16,7 @@ use engine::train::{train, TrainingConfig};
fn main() { fn main() {
let device = Device::cuda(DeviceIndex::default()); let device = Device::cuda(DeviceIndex::default());
let mcts_config = MctsConfig::new(150, 1.0, 0.05, 0.25, 128); let mcts_config = MctsConfig::new(200, 1.0, 0.05, 0.25, 128);
let adam_config = AdamConfig::new(); let adam_config = AdamConfig::new();
@@ -26,11 +26,11 @@ fn main() {
max_depth: 100, // unused max_depth: 100, // unused
model_name: String::from("Test1"), model_name: String::from("Test1"),
load_model: false, load_model: false,
hidden_channels: 64, hidden_channels: 48,
num_blocks: 4, num_blocks: 4,
batch_size: 1024, // num positions sampled to a batch (2048) batch_size: 1024, // num positions sampled to a batch (2048)
num_episodes: 100, // num games generated per iteration (5000) num_episodes: 100, // num games generated per iteration (5000)
buffer_max_size: 200_000, // max number of samples in the buffer buffer_max_size: 25_000, // max number of samples in the buffer
mcts_config, mcts_config,
optimizer: adam_config, optimizer: adam_config,
lr: 2e-4, lr: 2e-4,
+3 -3
View File
@@ -119,9 +119,9 @@ pub fn train(training_config: TrainingConfig, device: impl Into<Device>) {
let mut ply_count: usize = 0; let mut ply_count: usize = 0;
while board_state.status == BoardStateStatus::Ongoing { while board_state.status == BoardStateStatus::Ongoing {
let before = Instant::now(); // let before = Instant::now();
let results = mcts.search(&board_state, &infer_model, &device); let results = mcts.search(&board_state, &infer_model, &device);
println!("{}", before.elapsed().as_millis()); // println!("{}", before.elapsed().as_millis());
episode_buffer.push(results); episode_buffer.push(results);
let temp = if ply_count < 30 { 1.0 } else { 0.0 }; let temp = if ply_count < 30 { 1.0 } else { 0.0 };
@@ -130,7 +130,7 @@ pub fn train(training_config: TrainingConfig, device: impl Into<Device>) {
let stm = board_state.board.side_to_move(); let stm = board_state.board.side_to_move();
let mv = sample_move(&adjusted, &mut rng, stm).unwrap(); let mv = sample_move(&adjusted, &mut rng, stm).unwrap();
println!("playing move: {}", mv); // println!("playing move: {}", mv);
if episode == 0 { if episode == 0 {
game_hist.push_str(mv.to_string().as_str()); game_hist.push_str(mv.to_string().as_str());
game_hist.push(' '); game_hist.push(' ');