Trait relearn::agents::BuildAgent [−][src]
pub trait BuildAgent<OS: Space, AS: Space> {
type Agent: FullAgent<OS::Element, AS::Element>;
fn build_agent(
&self,
env: &dyn EnvStructure<ObservationSpace = OS, ActionSpace = AS>,
seed: u64
) -> Result<Self::Agent, BuildAgentError>;
}
Expand description
Build an agent instance for a given environment structure.
Associated Types
Required methods
fn build_agent(
&self,
env: &dyn EnvStructure<ObservationSpace = OS, ActionSpace = AS>,
seed: u64
) -> Result<Self::Agent, BuildAgentError>
fn build_agent(
&self,
env: &dyn EnvStructure<ObservationSpace = OS, ActionSpace = AS>,
seed: u64
) -> Result<Self::Agent, BuildAgentError>
Build an agent for the given environment structure (EnvStructure
).
The agent is built in ActorMode::Training
.
Args
env
- The structure of the environment in which the agent is to operate.seed
- A number used to seed the agent’s random state, for those agents that use deterministic pseudo-random number generation.