rlightning.engine.async_rsl_rl_engine

Async RSL-RL engine implementation.

Provides an async engine specialization that wires environment initialization, policy setup, buffer initialization, and initial weight synchronization for training.

class rlightning.engine.async_rsl_rl_engine.AsyncRSLRLEngine(config: MainConfig, env_group: EnvGroup, policy_group: PolicyGroup, buffer: DataBuffer)[source]

Bases: AsyncRLEngine

Async RSL-RL engine.

rollout(*args, **kwargs)[source]

Perform rollout to collect experience from environments.

Runs the rollout loop, collecting experience by stepping through environments and storing transitions in the buffer. Runs until the done_flag is set.

sync_weights() None[source]

sync weights from train policy to eval policy.

Parameters:

policy_group – Policy group containing train and eval policies.

train() None[source]

Perform training on collected experience.

Runs the training loop for the configured number of epochs, sampling from the buffer and updating the policy. Sets the new_weights_ready flag after each training step and done_flag when training completes.

update_dataset(*args, **kwargs)[source]

Update dataset from buffer to train policy.

warm_up()[source]

init and dummy run for constructing RL dataflow Performs a dummy rollout and training iteration to ensure proper dataflow construction.