igibson.reward_functions package

Submodules

igibson.reward_functions.collision_reward module

class igibson.reward_functions.collision_reward.CollisionReward(config)

Bases: igibson.reward_functions.reward_function_base.BaseRewardFunction

Collision reward Penalize robot collision. Typically collision_reward_weight is negative.

get_reward(task, env)

Reward is self.collision_reward_weight if there is collision in the last timestep

Parameters
  • task – task instance

  • env – environment instance

Returns

reward

igibson.reward_functions.point_goal_reward module

igibson.reward_functions.potential_reward module

class igibson.reward_functions.potential_reward.PotentialReward(config)

Bases: igibson.reward_functions.reward_function_base.BaseRewardFunction

Potential reward Assume task has get_potential implemented; Low potential is preferred (e.g. a common potential for goal-directed task is the distance to goal)

get_reward(task, env)

Reward is proportional to the potential difference between the current and previous timestep

Parameters
  • task – task instance

  • env – environment instance

Returns

reward

reset(task, env)

Compute the initial potential after episode reset

Parameters
  • task – task instance

  • env – environment instance

igibson.reward_functions.reaching_goal_reward module

igibson.reward_functions.reward_function_base module

class igibson.reward_functions.reward_function_base.BaseRewardFunction(config)

Bases: object

Base RewardFunction class Reward-specific reset and get_reward methods are implemented in subclasses

abstract get_reward(task, env)

Compute the reward at the current timestep. Overwritten by subclasses.

Parameters
  • task – task instance

  • env – environment instance

Returns

reward, info

reset(task, env)

Reward function-specific reset

Parameters
  • task – task instance

  • env – environment instance

Module contents