(self, physics)
return _upright_reward(physics, deviation_angle=20) * escape_reward
Returns a reward to the agent.
Returns a reward to the agent.
Returns a reward to the agent .
def get_reward(self, physics):
    """Returns a reward to the agent."""

    # Escape reward term.
    terrain_size = physics.model.hfield_size[_HEIGHTFIELD_ID, 0]
    escape_reward = rewards.tolerance(
        physics.origin_distance(),
        bounds=(terrain_size, float('inf')),
        margin=terrain_size,
        value_at_margin=0,
        sigmoid='linear')

    return _upright_reward(physics, deviation_angle=20) * escape_reward
def get_reward ( self , physics ) : # Escape reward term. terrain_size = physics . model . hfield_size [ _HEIGHTFIELD_ID , 0 ] escape_reward = rewards . tolerance ( physics . origin_distance ( ) , bounds = ( terrain_size , float ( 'inf' ) ) , margin = terrain_size , value_at_margin = 0 , sigmoid = 'linear' ) return _upright_reward ( physics , deviation_angle = 20 ) * escape_reward