(self, sample_lists)
Run iteration of BADMM-based guided policy search.

        Args:
            sample_lists: List of SampleList objects for each condition.
Run iteration of BADMM-based guided policy search.
Run iteration of BADMM - based guided policy search .
def iteration(self, sample_lists):
        """
        Run iteration of BADMM-based guided policy search.

        Args:
            sample_lists: List of SampleList objects for each condition.
        """
        for m in range(self.M):
            self.cur[m].sample_list = sample_lists[m]

        self._set_interp_values()
        self._update_dynamics()  # Update dynamics model using all sample.
        self._update_step_size()  # KL Divergence step size.

        for m in range(self.M):
            # save initial kl for debugging / visualization
            self.cur[m].pol_info.init_kl = self._policy_kl(m)[0]

        # Run inner loop to compute new policies.
        for inner_itr in range(self._hyperparams['inner_iterations']):
            #TODO: Could start from init controller.
            if self.iteration_count > 0 or inner_itr > 0:
                # Update the policy.
                self._update_policy(inner_itr)
            for m in range(self.M):
                self._update_policy_fit(m)  # Update policy priors.
            if self.iteration_count > 0 or inner_itr > 0:
                step = (inner_itr == self._hyperparams['inner_iterations'] - 1)
                # Update dual variables.
                for m in range(self.M):
                    self._policy_dual_step(m, step=step)
            self._update_trajectories()

        self._advance_iteration_variables()
def iteration ( self , sample_lists ) : for m in range ( self . M ) : self . cur [ m ] . sample_list = sample_lists [ m ] self . _set_interp_values ( ) self . _update_dynamics ( ) # Update dynamics model using all sample. self . _update_step_size ( ) # KL Divergence step size. for m in range ( self . M ) : # save initial kl for debugging / visualization self . cur [ m ] . pol_info . init_kl = self . _policy_kl ( m ) [ 0 ] # Run inner loop to compute new policies. for inner_itr in range ( self . _hyperparams [ 'inner_iterations' ] ) : #TODO: Could start from init controller. if self . iteration_count > 0 or inner_itr > 0 : # Update the policy. self . _update_policy ( inner_itr ) for m in range ( self . M ) : self . _update_policy_fit ( m ) # Update policy priors. if self . iteration_count > 0 or inner_itr > 0 : step = ( inner_itr == self . _hyperparams [ 'inner_iterations' ] - 1 ) # Update dual variables. for m in range ( self . M ) : self . _policy_dual_step ( m , step = step ) self . _update_trajectories ( ) self . _advance_iteration_variables ( )