From 7c50a6d07b10e7dfd4052d22cfad585cc824b908 Mon Sep 17 00:00:00 2001 From: Henri Bourcereau Date: Mon, 5 Jan 2026 10:14:58 +0100 Subject: [PATCH] refact: remove dqn_simple --- bot/Cargo.toml | 4 ---- client_cli/src/app.rs | 22 ++++++++-------------- 2 files changed, 8 insertions(+), 18 deletions(-) diff --git a/bot/Cargo.toml b/bot/Cargo.toml index ce1ee5a..fa782fd 100644 --- a/bot/Cargo.toml +++ b/bot/Cargo.toml @@ -9,10 +9,6 @@ edition = "2021" name = "burn_train" path = "src/burnrl/main.rs" -[[bin]] -name = "train_dqn_simple" -path = "src/dqn_simple/main.rs" - [dependencies] pretty_assertions = "1.4.0" serde = { version = "1.0", features = ["derive"] } diff --git a/client_cli/src/app.rs b/client_cli/src/app.rs index 88a8b42..0c297dc 100644 --- a/client_cli/src/app.rs +++ b/client_cli/src/app.rs @@ -1,5 +1,5 @@ use bot::{ - BotStrategy, DefaultStrategy, DqnBurnStrategy, DqnStrategy, ErroneousStrategy, RandomStrategy, + BotStrategy, DefaultStrategy, DqnBurnStrategy, ErroneousStrategy, RandomStrategy, StableBaselines3Strategy, }; use itertools::Itertools; @@ -25,11 +25,11 @@ pub struct App { impl App { // Constructs a new instance of [`App`]. pub fn new(args: AppArgs) -> Self { - let bot_strategies: Vec> = args - .bot - .as_deref() - .map(|str_bots| { - str_bots + let bot_strategies: Vec> = + args.bot + .as_deref() + .map(|str_bots| { + str_bots .split(",") .filter_map(|s| match s.trim() { "dummy" => { @@ -43,7 +43,6 @@ impl App { } "ai" => Some(Box::new(StableBaselines3Strategy::default()) as Box), - "dqn" => Some(Box::new(DqnStrategy::default()) as Box), "dqnburn" => { Some(Box::new(DqnBurnStrategy::default()) as Box) } @@ -52,11 +51,6 @@ impl App { Some(Box::new(StableBaselines3Strategy::new(path)) as Box) } - s if s.starts_with("dqn:") => { - let path = s.trim_start_matches("dqn:"); - Some(Box::new(DqnStrategy::new_with_model(path)) - as Box) - } s if s.starts_with("dqnburn:") => { let path = s.trim_start_matches("dqnburn:"); Some(Box::new(DqnBurnStrategy::new_with_model(&path.to_string())) @@ -65,8 +59,8 @@ impl App { _ => None, }) .collect() - }) - .unwrap_or_default(); + }) + .unwrap_or_default(); let schools_enabled = false; let should_quit = bot_strategies.len() > 1; Self {