Unreal¶
Unreal ¶
UNREAL-A2C agents.
UnrealTrainer ¶
UnrealTrainer(envs, agent: UnrealA2C2, val_envs, config: UnrealTrainerConfig)
Bases: SyncMultiEnvTrainer
Trainer for the feed-forward UNREAL agent.
Source code in rlib/Unreal/feedforward.py
228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 | |
norm_obs ¶
norm_obs(obs)
normalise pixel intensity changes by recording min and max pixel observations not using per pixel normalisation because expected image is singular greyscale frame
Source code in rlib/Unreal/feedforward.py
261 262 263 264 265 | |
UnrealTrainerConfig
dataclass
¶
UnrealTrainerConfig(train_mode: TrainMode = TrainMode.NSTEP, returns: Returns = Returns.NSTEP, total_steps: int = 50000000, nsteps: int = 5, gamma: float = 0.99, lambda_: float = 0.95, validate_freq: int = 1000000, num_val_episodes: int = 50, max_val_steps: int = 10000, log_dir: str = 'logs/', model_dir: str = 'models/', save_freq: int = 0, log_scalars: bool = True, update_target_freq: int = 0, render_freq: int = 0, normalise_obs: bool = True, replay_length: int = 2000)
UnrealLSTMTrainer ¶
UnrealLSTMTrainer(envs, agent: UnrealA2C, val_envs, config: TrainerConfig)
Bases: SyncMultiEnvTrainer
Trainer for the recurrent UNREAL agent (LSTM body, action+reward feed-in).
Source code in rlib/Unreal/lstm.py
336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 | |