rlightning.policy.simple_ppo_policy¶
- class rlightning.policy.simple_ppo_policy.SimplePPOPolicy(config: PolicyConfig, role_type: PolicyRole)[source]¶
Bases:
BasePolicyA simple PPO Policy with a CNN encoder for testing purposes. it takes the actor-critic architecture.
- construct_network(env_meta, *args, **kwargs)[source]¶
Construct the neural network architecture.
- Parameters:
env_meta – Environment metadata for network configuration.
*args – Variable positional arguments.
**kwargs – Variable keyword arguments.
- get_value(obs: MockModule('torch.Tensor'))[source]¶
Compute state value
- Parameters:
obs (torch.Tensor) – Batched observation array
- Returns:
Batched state value
- Return type:
torch.Tensor
- load_state_dict(state_dict, strict=True, assign=False)[source]¶
Load trainable parameters from state_dict.
- rollout_step(env_ret: EnvRet) PolicyResponse[source]¶