MCPcopy Index your code
hub / github.com/rlcode/reinforcement-learning / append

Method append

4-atari-hard/2-go-explore.py:119–127  ·  view source on GitHub ↗
(self, prev_id, action, reward, done)

Source from the content-addressed store, hash-verified

117 self.fill = 0
118
119 def append(self, prev_id, action, reward, done):
120 i = self.fill
121 self.prev[i], self.act[i], self.rew[i], self.done[i] = prev_id, action, reward, done
122 self.fill += 1
123 idx = self.count
124 self.count += 1
125 if self.fill == self.chunk_size:
126 self._flush()
127 return idx
128
129 def _flush(self):
130 arrays = {"prev": self.prev[:self.fill], "act": self.act[:self.fill],

Callers 15

2-ppo.pyFile · 0.80
1-dqn.pyFile · 0.80
2-a2c.pyFile · 0.80
3-ppo.pyFile · 0.80
append_sampleMethod · 0.80
1-dqn.pyFile · 0.80
append_sampleMethod · 0.80
policy_improvementMethod · 0.80
value_iterationMethod · 0.80
get_actionMethod · 0.80
arg_maxMethod · 0.80
arg_maxMethod · 0.80

Calls 1

_flushMethod · 0.95

Tested by

no test coverage detected