mirror of
https://github.com/wassname/DeepRL.git
synced 2026-09-10 11:40:58 +08:00
Merge branch 'master' of https://github.com/ShangtongZhang/DeepRL
This commit is contained in:
@@ -33,6 +33,7 @@ class AdvantageActorCritic:
|
||||
|
||||
steps += 1
|
||||
total_reward += reward
|
||||
reward = config.reward_shift_fn(reward)
|
||||
|
||||
if deterministic:
|
||||
if terminal:
|
||||
|
||||
@@ -34,6 +34,7 @@ class NStepQLearning:
|
||||
|
||||
steps += 1
|
||||
total_reward += reward
|
||||
reward = config.reward_shift_fn(reward)
|
||||
|
||||
if deterministic:
|
||||
if terminal:
|
||||
|
||||
@@ -34,6 +34,7 @@ class OneStepQLearning:
|
||||
|
||||
steps += 1
|
||||
total_reward += reward
|
||||
reward = config.reward_shift_fn(reward)
|
||||
|
||||
if deterministic:
|
||||
if terminal:
|
||||
|
||||
@@ -37,6 +37,7 @@ class OneStepSarsa:
|
||||
|
||||
steps += 1
|
||||
total_reward += reward
|
||||
reward = config.reward_shift_fn(reward)
|
||||
|
||||
if deterministic:
|
||||
if terminal:
|
||||
|
||||
@@ -104,6 +104,7 @@ class ProximalPolicyOptimization:
|
||||
advs.append(cum_adv)
|
||||
advantages = advs[::-1]
|
||||
returns = list(returns)
|
||||
|
||||
replay.feed([states, actions, returns, advantages])
|
||||
|
||||
batched_rewards /= batched_episode
|
||||
|
||||
Reference in New Issue
Block a user