(self, policy, dynamics, reward_function, value_function,
                 gamma=0.98)
Initialization.

        See `PolicyIteration` for details.
Initialization.
Initialization .
def __init__(self, policy, dynamics, reward_function, value_function,
                 gamma=0.98):
        """Initialization.

        See `PolicyIteration` for details.
        """
        super(PolicyIteration, self).__init__()
        self.dynamics = dynamics
        self.reward_function = reward_function
        self.value_function = value_function
        self.gamma = gamma

        state_space = self.value_function.discretization.all_points
        self.state_space = tf.stack(state_space, name='state_space')

        self.policy = policy
        self.feed_dict = get_feed_dict(tf.get_default_graph())
        self._storage = {}
def __init__ ( self , policy , dynamics , reward_function , value_function , gamma = 0.98 ) : super ( PolicyIteration , self ) . __init__ ( ) self . dynamics = dynamics self . reward_function = reward_function self . value_function = value_function self . gamma = gamma state_space = self . value_function . discretization . all_points self . state_space = tf . stack ( state_space , name = 'state_space' ) self . policy = policy self . feed_dict = get_feed_dict ( tf . get_default_graph ( ) ) self . _storage = { }