use super::{Env, Policy, ReplayBufferBase};
use crate::record::Record;
use anyhow::Result;
use std::path::{Path, PathBuf};
pub trait Agent<E: Env, R: ReplayBufferBase>: Policy<E> {
fn train(&mut self) {
unimplemented!();
}
fn eval(&mut self) {
unimplemented!();
}
fn is_train(&self) -> bool {
unimplemented!();
}
fn opt(&mut self, buffer: &mut R) {
let _ = self.opt_with_record(buffer);
}
#[allow(unused_variables)]
fn opt_with_record(&mut self, buffer: &mut R) -> Record {
unimplemented!();
}
#[allow(unused_variables)]
fn save_params(&self, path: &Path) -> Result<Vec<PathBuf>> {
unimplemented!();
}
#[allow(unused_variables)]
fn load_params(&mut self, path: &Path) -> Result<()> {
unimplemented!();
}
fn as_any_ref(&self) -> &dyn std::any::Any {
unimplemented!("as_any_ref() must be implemented for train_async()");
}
fn as_any_mut(&mut self) -> &mut dyn std::any::Any {
unimplemented!("as_any_mut() must be implemented for train_async()");
}
}