49dea39d34a562a46daa562051a66846326f66f4,rl_coach/agents/clipped_ppo_agent.py,ClippedPPOAgent,fill_advantages,#ClippedPPOAgent#Any#,109

Before Change


        advantages = []
        value_targets = []
        if self.policy_gradient_rescaler == PolicyGradientRescaler.A_VALUE:
            advantages = batch.total_returns() - current_state_values
        elif self.policy_gradient_rescaler == PolicyGradientRescaler.GAE:
            // get bootstraps
            episode_start_idx = 0

After Change


        // calculate advantages
        advantages = []
        value_targets = []
        total_returns = batch.n_step_discounted_rewards()

        if self.policy_gradient_rescaler == PolicyGradientRescaler.A_VALUE:
            advantages = total_returns - current_state_values
        elif self.policy_gradient_rescaler == PolicyGradientRescaler.GAE:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: NervanaSystems/coach
Commit Name: 49dea39d34a562a46daa562051a66846326f66f4
Time: 2018-11-07
Author: gal.leibovich@intel.com
File Name: rl_coach/agents/clipped_ppo_agent.py
Class Name: ClippedPPOAgent
Method Name: fill_advantages


Project Name: NervanaSystems/coach
Commit Name: 49dea39d34a562a46daa562051a66846326f66f4
Time: 2018-11-07
Author: gal.leibovich@intel.com
File Name: rl_coach/agents/ppo_agent.py
Class Name: PPOAgent
Method Name: fill_advantages


Project Name: NervanaSystems/coach
Commit Name: 49dea39d34a562a46daa562051a66846326f66f4
Time: 2018-11-07
Author: gal.leibovich@intel.com
File Name: rl_coach/agents/pal_agent.py
Class Name: PALAgent
Method Name: learn_from_batch