Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
maik97 committed Sep 29, 2021
1 parent fb285d8 commit c984bf5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion wacky_rl/agents/a2c.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,19 @@
from wacky_rl.losses import ActorLoss
from wacky_rl.transform import ExpectedReturnsCalculator
from wacky_rl.trainer import Trainer
from wacky_rl.logger import StatusPrinter


class A2C(AgentCore):

def __init__(self, env, approximate_contin=False):
def __init__(self, env, approximate_contin=False, logger=None):
super(A2C, self).__init__()

if logger is None:
self.logger = StatusPrinter('a2c')
else:
self.logger = logger

self.approximate_contin = approximate_contin
self.memory = BufferMemory()
self.calc_returns = ExpectedReturnsCalculator()
Expand Down
2 changes: 1 addition & 1 deletion wacky_rl/agents/ppo.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def __init__(self, env, approximate_contin=True, logger=None):
super(PPO, self).__init__()

if logger is None:
self.logger = StatusPrinter('test')
self.logger = StatusPrinter('ppo')
else:
self.logger = logger

Expand Down

0 comments on commit c984bf5

Please sign in to comment.