GDSolver

class GDSolver(model: Costable, n_steps: int, action_noise=0.0, device='cpu')[source]

Bases: Module

Gradient Descent Solver.

property action_dim: int
configure(*, action_space, n_envs: int, config) None[source]
property horizon: int
init_action(actions=None)[source]

Initialize the action tensor for the solver.

set self.init - initial action sequences (n_envs, horizon, action_dim)

property n_envs: int
set_seed(seed: int) None[source]

Set random seed for deterministic behavior.

Parameters:

seed – Random seed to use for numpy and torch

solve(info_dict, init_action=None) Tensor[source]

Solve the planning optimization problem using gradient descent.