size adjust
This commit is contained in:
+5
-5
@@ -16,7 +16,7 @@ use engine::train::{train, TrainingConfig};
|
||||
fn main() {
|
||||
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();
|
||||
|
||||
@@ -26,11 +26,11 @@ fn main() {
|
||||
max_depth: 100, // unused
|
||||
model_name: String::from("Test1"),
|
||||
load_model: false,
|
||||
hidden_channels: 64,
|
||||
hidden_channels: 48,
|
||||
num_blocks: 4,
|
||||
batch_size: 1024, // num positions sampled to a batch (2048)
|
||||
num_episodes: 100, // num games generated per iteration (5000)
|
||||
buffer_max_size: 200_000, // max number of samples in the buffer
|
||||
batch_size: 1024, // num positions sampled to a batch (2048)
|
||||
num_episodes: 100, // num games generated per iteration (5000)
|
||||
buffer_max_size: 25_000, // max number of samples in the buffer
|
||||
mcts_config,
|
||||
optimizer: adam_config,
|
||||
lr: 2e-4,
|
||||
|
||||
+3
-3
@@ -119,9 +119,9 @@ pub fn train(training_config: TrainingConfig, device: impl Into<Device>) {
|
||||
let mut ply_count: usize = 0;
|
||||
|
||||
while board_state.status == BoardStateStatus::Ongoing {
|
||||
let before = Instant::now();
|
||||
// let before = Instant::now();
|
||||
let results = mcts.search(&board_state, &infer_model, &device);
|
||||
println!("{}", before.elapsed().as_millis());
|
||||
// println!("{}", before.elapsed().as_millis());
|
||||
episode_buffer.push(results);
|
||||
|
||||
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 mv = sample_move(&adjusted, &mut rng, stm).unwrap();
|
||||
println!("playing move: {}", mv);
|
||||
// println!("playing move: {}", mv);
|
||||
if episode == 0 {
|
||||
game_hist.push_str(mv.to_string().as_str());
|
||||
game_hist.push(' ');
|
||||
|
||||
Reference in New Issue
Block a user