Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions epg/agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ def update(self, obs, acts, rews, dones, ppo_factor, inner_opt_freq):
act_pad = np.zeros((self._buffer_size - acts.shape[0], acts.shape[1]), dtype=np.float32)
pad = np.hstack([obs_pad, act_pad, rew_pad[:, None], auxs_pad[:, None], done_pad[:, None]])
traj = np.vstack([pad, traj])
traj[:, obs.shape[1] + acts.shape[1]] = epg_rews
traj[:, -1] = dones
traj[0:len(epg_rews), obs.shape[1] + acts.shape[1]] = epg_rews
traj[0:len(dones), -1] = dones

# Since the buffer length can be larger than the set of new samples, we truncate the
# trajectories here for PPO.
Expand Down