Shmuma / ptan

PyTorch Agent Net: reinforcement learning toolkit for pytorch
MIT License
530 stars 164 forks source link

Examples under ptan/samples are outdated #15

Open liuauto opened 6 years ago

liuauto commented 6 years ago

It seems that the examples under ptan/samples are outdated. For instance, the code for creating agent in dqn_expreplay.py does not match the current definition

agent = ptan.agent.DQNAgent(model, action_selector), cuda=cuda_enabled)

While in the current class definition, the creator arguments are mismatched:

class DQNAgent(BaseAgent):

def __init__(self, dqn_model, action_selector, device="cpu", preprocessor=default_states_preprocessor):
    self.dqn_model = dqn_model
    self.action_selector = action_selector
    self.preprocessor = preprocessor
    self.device = device

Can we update the samples as well? Thanks.