ray.rllib.env.single_agent_episode.SingleAgentEpisode.get_return#
- SingleAgentEpisode.get_return() float [source]#
Calculates an episode’s return, excluding the lookback buffer’s rewards.
The return is computed by a simple sum, neglecting the discount factor. Note that if
self
is a continuation chunk (resulting from a call toself.cut()
), the previous chunk’s rewards are NOT counted and thus NOT part of the returned reward sum.- Returns:
The sum of rewards collected during this episode, excluding possible data inside the lookback buffer and excluding possible data in a predecessor chunk.