c395079717340c8a92b1635f8b40a5ba39c513e5,contents/9_Deep_Deterministic_Policy_Gradient_DDPG/DDPG.py,Actor,learn,#Actor#Any#,72
Before Change
// instead of above method, I use a hard replacement here
if self.t_replace_counter % self.t_replace_iter == 0:
self.sess.run([tf.assign(t, e) for t, e in zip(self.t_params, self.e_params)])
self.t_replace_counter += 1
def choose_action(self, s):
After Change
def learn(self, s): // batch update
self.sess.run(self.train_op, feed_dict={S: s})
if self.replacement["name"] == "soft":
self.sess.run(self.soft_replace)
else:
if self.t_replace_counter % self.replacement["rep_iter_a"] == 0:
self.sess.run(self.hard_replace)
self.t_replace_counter += 1
def choose_action(self, s):
s = s[np.newaxis, :] // single state
return self.sess.run(self.a, feed_dict={S: s})[0] // single action
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 8
Instances
Project Name: MorvanZhou/Reinforcement-learning-with-tensorflow
Commit Name: c395079717340c8a92b1635f8b40a5ba39c513e5
Time: 2017-08-09
Author: morvanzhou@gmail.com
File Name: contents/9_Deep_Deterministic_Policy_Gradient_DDPG/DDPG.py
Class Name: Actor
Method Name: learn
Project Name: HyperGAN/HyperGAN
Commit Name: c8f075268f7e5645a77eef21591a62a07e7e8baa
Time: 2017-02-28
Author: mikkel@255bits.com
File Name: hypergan/trainers/sgd_trainer.py
Class Name:
Method Name: run
Project Name: HyperGAN/HyperGAN
Commit Name: 9c8dc8d6eb3208d8d442311853ca5859b0ac04aa
Time: 2017-02-21
Author: mikkel@255bits.com
File Name: hypergan/trainers/adam_trainer.py
Class Name:
Method Name: run
Project Name: MorvanZhou/Reinforcement-learning-with-tensorflow
Commit Name: c395079717340c8a92b1635f8b40a5ba39c513e5
Time: 2017-08-09
Author: morvanzhou@gmail.com
File Name: contents/9_Deep_Deterministic_Policy_Gradient_DDPG/DDPG.py
Class Name: Critic
Method Name: learn