This commit is contained in:
wassname
2018-01-15 14:05:32 +08:00
27 changed files with 673 additions and 175 deletions
+1
View File
@@ -33,6 +33,7 @@ class AdvantageActorCritic:
steps += 1
total_reward += reward
reward = config.reward_shift_fn(reward)
if deterministic:
if terminal:
+1
View File
@@ -34,6 +34,7 @@ class NStepQLearning:
steps += 1
total_reward += reward
reward = config.reward_shift_fn(reward)
if deterministic:
if terminal:
+1
View File
@@ -34,6 +34,7 @@ class OneStepQLearning:
steps += 1
total_reward += reward
reward = config.reward_shift_fn(reward)
if deterministic:
if terminal:
+1
View File
@@ -37,6 +37,7 @@ class OneStepSarsa:
steps += 1
total_reward += reward
reward = config.reward_shift_fn(reward)
if deterministic:
if terminal:
+1
View File
@@ -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