remove python stuff & simple DQN implementation
This commit is contained in:
parent
3d01e8fe06
commit
480b2ff427
19 changed files with 608 additions and 989 deletions
|
|
@ -1,4 +1,4 @@
|
|||
use bot::{BotStrategy, DefaultStrategy, ErroneousStrategy, StableBaselines3Strategy};
|
||||
use bot::{BotStrategy, DefaultStrategy, DqnStrategy, ErroneousStrategy, StableBaselines3Strategy};
|
||||
use itertools::Itertools;
|
||||
|
||||
use crate::game_runner::GameRunner;
|
||||
|
|
@ -37,11 +37,18 @@ impl App {
|
|||
}
|
||||
"ai" => Some(Box::new(StableBaselines3Strategy::default())
|
||||
as Box<dyn BotStrategy>),
|
||||
"dqn" => Some(Box::new(DqnStrategy::default())
|
||||
as Box<dyn BotStrategy>),
|
||||
s if s.starts_with("ai:") => {
|
||||
let path = s.trim_start_matches("ai:");
|
||||
Some(Box::new(StableBaselines3Strategy::new(path))
|
||||
as Box<dyn BotStrategy>)
|
||||
}
|
||||
s if s.starts_with("dqn:") => {
|
||||
let path = s.trim_start_matches("dqn:");
|
||||
Some(Box::new(DqnStrategy::new_with_model(path))
|
||||
as Box<dyn BotStrategy>)
|
||||
}
|
||||
_ => None,
|
||||
})
|
||||
.collect()
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@ OPTIONS:
|
|||
- dummy: Default strategy selecting the first valid move
|
||||
- ai: AI strategy using the default model at models/trictrac_ppo.zip
|
||||
- ai:/path/to/model.zip: AI strategy using a custom model
|
||||
- dqn: DQN strategy using native Rust implementation with Burn
|
||||
- dqn:/path/to/model: DQN strategy using a custom model
|
||||
|
||||
ARGS:
|
||||
<INPUT>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue