rldurham

Functions

check_device()

Check if CUDA is available and return 'cuda' or 'cpu' accordingly.

env_info(env[, print_out])

Return and (optionally) print some info about action and observation states.

getwrappedattr(env, attr[, depth, try_getattr])

Attempts to unwrap an environment (by repeatedly calling env = env.env) before getting an attribute.

make(*args, **kwargs)

Drop-in replacement for gym.make to enable logging.

plot_frozenlake(env[, v, policy, ...])

A helper function to draw the frozen lake environment with state values and policy.

render(env[, clear, axis_off, show, sleep])

Helper function for rendering environments.

seed_everything([seed, env, seed_env, ...])

This uses the PyTorch Lightning seed_everything method to seed pseudo-random number generators in pytorch, numpy, and python.random.

transparent_wrapper(cls)

Decorator that tried to find attributes hidden inside wrapped environments.

Classes

InfoTracker()

Track info by recursively descending into dict and creating lists of info values.

RLDurhamEnv(env)

Light-weight environment wrapper to enable logging.

Recorder(env[, info, video, logs, ...])

VideoRecorder(*args, name_func, **kwargs)

Wrapper to record videos (adapted from gym.wrappers.RecordVideo) with a custom callback function to adapt the file name.

Modules

bipedal_walker

version_check