DQN

class DQN(model, gamma=None, lr=None)[源代码]

基类:parl.core.paddle.algorithm.Algorithm

__init__(model, gamma=None, lr=None)[源代码]

DQN algorithm

参数
  • model (parl.Model) – forward neural network representing the Q function.

  • gamma (float) – discounted factor for accumulative reward computation

  • lr (float) – learning rate.

learn(obs, action, reward, next_obs, terminal)[源代码]

update the Q function (self.model) with DQN algorithm

predict(obs)[源代码]

use self.model (Q function) to predict the action values