5bb63d23a7722d060f7df345a9d2b51dc98c035a,ch09/02_cartpole_reinforce.py,,,#,34

Before Change


        step_rewards = step_rewards[-1000:]

        baseline = np.mean(step_rewards)
        writer.add_scalar("baseline", baseline, step_idx)
        batch_states.append(exp.state)
        batch_actions.append(int(exp.action))
        batch_scales.append(exp.reward - baseline)

        // handle new rewards
        new_rewards = exp_source.pop_total_rewards()

After Change



    batch_episodes = 0
    batch_states, batch_actions, batch_qvals = [], [], []
    cur_states, cur_actions, cur_rewards = [], [], []

    for step_idx, exp in enumerate(exp_source):
        cur_states.append(exp.state)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: PacktPublishing/Deep-Reinforcement-Learning-Hands-On
Commit Name: 5bb63d23a7722d060f7df345a9d2b51dc98c035a
Time: 2017-12-03
Author: max.lapan@gmail.com
File Name: ch09/02_cartpole_reinforce.py
Class Name:
Method Name:


Project Name: PacktPublishing/Deep-Reinforcement-Learning-Hands-On
Commit Name: e63d343860334fb730a8e19496776431861bc177
Time: 2017-10-18
Author: max.lapan@gmail.com
File Name: ch06/01_dqn_pong.py
Class Name:
Method Name:


Project Name: PacktPublishing/Deep-Reinforcement-Learning-Hands-On
Commit Name: 7d138b5d523e538e97e51c04309dc84ca98cfbb6
Time: 2018-01-11
Author: max.lapan@gmail.com
File Name: ch12/train_scst.py
Class Name:
Method Name: