schola.sb3.utils.VecMergeDictActionWrapper

class schola.sb3.utils.VecMergeDictActionWrapper(venv)[source]

Bases: VecEnvWrapper

A vectorized wrapper for merging a dictionary of actions into 1 single action. All actions in the dictionary must be of compatible types.

Parameters:

venv (VecEnv) – The vectorized environment being wrapped.

Methods

__init__(venv)

close()

Clean up the environment’s resources.

env_is_wrapped(wrapper_class[, indices])

Check if environments are wrapped with a given wrapper.

env_method(method_name, *method_args[, indices])

Call instance methods of vectorized environments.

get_attr(attr_name[, indices])

Return attribute from vectorized environment.

get_images()

Return RGB images from each environment when available

getattr_depth_check(name, already_found)

See base class.

getattr_recursive(name)

Recursively check wrappers to find attribute.

render([mode])

Gym environment rendering

reset()

Reset all the environments and return an array of observations, or a tuple of observation arrays.

seed([seed])

Sets the random seeds for all environments, based on a given seed.

set_attr(attr_name, value[, indices])

Set attribute inside vectorized environments.

step(action)

Step the environments with the given action

step_async(actions)

Tell all the environments to start taking a step with the given actions.

step_wait()

Wait for the step taken with step_async().

Attributes

unwrapped

__init__(venv)[source]
Parameters:

venv (VecEnv)

reset()[source]

Reset all the environments and return an array of observations, or a tuple of observation arrays.

If step_async is still doing work, that work will be cancelled and step_wait() should not be called until step_async() is invoked again.

Returns:

observation

Return type:

ndarray | Dict[str, ndarray] | Tuple[ndarray, …]

step(action)[source]

Step the environments with the given action

Parameters:
  • actions – the action

  • action (ndarray)

Returns:

observation, reward, done, information

Return type:

Tuple[ndarray | Dict[str, ndarray] | Tuple[ndarray, …], ndarray, ndarray, List[Dict]]

step_async(actions)[source]

Tell all the environments to start taking a step with the given actions. Call step_wait() to get the results of the step.

You should not call this if a step_async run is already pending.

Parameters:

actions (ndarray)

Return type:

None

step_wait()[source]

Wait for the step taken with step_async().

Returns:

observation, reward, done, information

Return type:

Tuple[ndarray | Dict[str, ndarray] | Tuple[ndarray, …], ndarray, ndarray, List[Dict]]

Related pages

  • Visit the Schola product page for download links and more information.

Looking for more documentation on GPUOpen?

AMD GPUOpen software blogs

Our handy software release blogs will help you make good use of our tools, SDKs, and effects, as well as sharing the latest features with new releases.

GPUOpen Manuals

Don’t miss our manual documentation! And if slide decks are what you’re after, you’ll find 100+ of our finest presentations here.

AMD GPUOpen Performance Guides

The home of great performance and optimization advice for AMD RDNA™ 2 GPUs, AMD Ryzen™ CPUs, and so much more.

Getting started: AMD GPUOpen software

New or fairly new to AMD’s tools, libraries, and effects? This is the best place to get started on GPUOpen!

AMD GPUOpen Getting Started Development and Performance

Looking for tips on getting started with developing and/or optimizing your game, whether on AMD hardware or generally? We’ve got you covered!

AMD GPUOpen Technical blogs

Browse our technical blogs, and find valuable advice on developing with AMD hardware, ray tracing, Vulkan®, DirectX®, Unreal Engine, and lots more.

Find out more about our software!

AMD GPUOpen Effects - AMD FidelityFX technologies

Create wonder. No black boxes. Meet the AMD FidelityFX SDK!

AMD GPUOpen Samples

Browse all our useful samples. Perfect for when you’re needing to get started, want to integrate one of our libraries, and much more.

AMD GPUOpen developer SDKs

Discover what our SDK technologies can offer you. Query hardware or software, manage memory, create rendering applications or machine learning, and much more!

AMD GPUOpen Developer Tools

Analyze, Optimize, Profile, Benchmark. We provide you with the developer tools you need to make sure your game is the best it can be!