rlpyt icon indicating copy to clipboard operation
rlpyt copied to clipboard

Dqn nonframe state

Open kargarisaac opened this issue 4 years ago • 4 comments

  • Add dqn for non-frame state spaces
  • Add loading and evaluation code for the trained model

kargarisaac avatar Apr 07 '20 07:04 kargarisaac

Example_9 file contains using dqn for cartpole with a custom model and evaluation function.

kargarisaac avatar Apr 07 '20 07:04 kargarisaac

Thank you! That explains why DQN did not work for my tasks. Your pull request is, however, quite complicated. Wouldn't just changing self.replay_buffer = ReplayCls(**replay_kwargs) into self.replay_buffer = ReplayCls(**replay_kwargs) if self.ReplayBufferCls is None else self.ReplayBufferCls(**replay_kwargs) in the DQN algorithm solve that issue?

petrikvladimir avatar Apr 09 '20 07:04 petrikvladimir

@petrikvladimir It does if you set the class as input. I just added the same settings as the atari env for non-atari envs to do it automatically.

kargarisaac avatar Apr 09 '20 13:04 kargarisaac

@astooke, is there any issue with this merge? This would really be a useful functionality to have officially

Adithya-MN avatar Nov 01 '20 14:11 Adithya-MN