feat(spiel_bot): cli spiel_bot strategy
This commit is contained in:
parent
e7d13c9a02
commit
ad30d09311
7 changed files with 281 additions and 4 deletions
|
|
@ -1,3 +1,4 @@
|
|||
use spiel_bot::strategy::{AzBotStrategy, DqnSpielBotStrategy};
|
||||
use trictrac_bot::{
|
||||
BotStrategy, DefaultStrategy, DqnBurnStrategy, ErroneousStrategy, RandomStrategy,
|
||||
StableBaselines3Strategy,
|
||||
|
|
@ -56,6 +57,27 @@ impl App {
|
|||
Some(Box::new(DqnBurnStrategy::new_with_model(&path.to_string()))
|
||||
as Box<dyn BotStrategy>)
|
||||
}
|
||||
"az" => {
|
||||
Some(Box::new(AzBotStrategy::new_mlp(None)) as Box<dyn BotStrategy>)
|
||||
}
|
||||
s if s.starts_with("az:") && !s.starts_with("az-") => {
|
||||
let path = s.trim_start_matches("az:");
|
||||
Some(Box::new(AzBotStrategy::new_mlp(Some(path))) as Box<dyn BotStrategy>)
|
||||
}
|
||||
"az-resnet" => {
|
||||
Some(Box::new(AzBotStrategy::new_resnet(None)) as Box<dyn BotStrategy>)
|
||||
}
|
||||
s if s.starts_with("az-resnet:") => {
|
||||
let path = s.trim_start_matches("az-resnet:");
|
||||
Some(Box::new(AzBotStrategy::new_resnet(Some(path))) as Box<dyn BotStrategy>)
|
||||
}
|
||||
"az-dqn" => {
|
||||
Some(Box::new(DqnSpielBotStrategy::new(None)) as Box<dyn BotStrategy>)
|
||||
}
|
||||
s if s.starts_with("az-dqn:") => {
|
||||
let path = s.trim_start_matches("az-dqn:");
|
||||
Some(Box::new(DqnSpielBotStrategy::new(Some(path))) as Box<dyn BotStrategy>)
|
||||
}
|
||||
_ => None,
|
||||
})
|
||||
.collect()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue