We also provide several wrappers that you can use to modify the environment in various ways.
from gym_unrealcv.envs.wrappers import configUE
configUE.ConfigUEWrapper(env, docker=False, resolution=(160, 160), display=None,
offscreen=False, use_opengl=False, nullrhi=False,
gpu_id=None, sleep_time=5, comm_mode='tcp')
from gym_unrealcv.envs.wrappers import time_dilation
env = time_dilation.TimeDilationWrapper(env, reference_fps=30, update_steps=60)
The EarlyDoneWrapper is used to end the episode early based on certain conditions. Users could modify the source code for different tasks. This can be useful for preventing episodes from running for too long.
from gym_unrealcv.envs.wrappers import early_done
env = early_done.EarlyDoneWrapper(env, max_lost_steps=100)
The RandomPopulationWrapper randomly populates the environment with a specified number of agents:
env = augmentation.RandomPopulationWrapper(env, num_min=5, num_max=10, random_target=False)