use super::{Env, Policy, ReplayBufferBase};
use crate::record::Record;
use anyhow::Result;
use std::path::Path;
pub trait Agent<E: Env, R: ReplayBufferBase>: Policy<E> {
fn train(&mut self);
fn eval(&mut self);
fn is_train(&self) -> bool;
fn opt(&mut self, buffer: &mut R) -> Option<Record>;
fn save<T: AsRef<Path>>(&self, path: T) -> Result<()>;
fn load<T: AsRef<Path>>(&mut self, path: T) -> Result<()>;
}