storm_kit.mpc.control.olgaussian_mpc module

MPC with open-loop Gaussian policies

class OLGaussianMPC(d_action, action_lows, action_highs, horizon, init_cov, init_mean, base_action, num_particles, gamma, n_iters, step_size_mean, step_size_cov, null_act_frac=0.0, rollout_fn=None, sample_mode='mean', hotstart=True, squash_fn='clamp', cov_type='sigma_I', seed=0, sample_params={'filter_coeffs': None, 'fixed_samples': True, 'seed': 0, 'type': 'halton'}, tensor_args={'device': device(type='cpu'), 'dtype': torch.float32}, fixed_actions=False)[source]

Bases: storm_kit.mpc.control.control_base.Controller

Inheritance diagram of OLGaussianMPC
Parameters
  • base_action (str) – Action to append at the end when shifting solution to next timestep ‘random’ : appends random action ‘null’ : appends zero action ‘repeat’ : repeats second to last action

  • num_particles (int) – Number of action sequences sampled at every iteration

_abc_impl = <_abc_data object>
_calc_val(cost_seq, act_seq)[source]

Calculate value of state given rollouts from a policy

_get_action_seq(mode='mean')[source]

Get action sequence to execute on the system based on current control distribution

Parameters

mode – {‘mean’, ‘sample’} how to choose action to be executed ‘mean’ plays mean action and ‘sample’ samples from the distribution

_shift(shift_steps=1)[source]

Predict mean for the next time step by shifting the current mean forward by one step

property entropy
property full_cov
property full_inv_cov
property full_scale_tril
generate_noise(shape, base_seed=None)[source]

Generate correlated noisy samples using autoregressive process

generate_rollouts(state)[source]

Samples a batch of actions, rolls out trajectories for each particle and returns the resulting observations, costs, actions

Parameters

state (dict or np.ndarray) – Initial state to set the simulation env to

reset_covariance()[source]
reset_distribution()[source]

Reset control distribution

reset_mean()[source]
sample_actions(state=None)[source]

Sample actions from current control distribution

property squashed_mean