MCPcopy Create free account
hub / github.com/YeWR/EfficientZero / _remove

Method _remove

core/replay_buffer.py:144–152  ·  view source on GitHub ↗
(self, num_excess_games)

Source from the content-addressed store, hash-verified

142 self._remove(index + 1)
143
144 def _remove(self, num_excess_games):
145 # delete game histories
146 excess_games_steps = sum([len(game) for game in self.buffer[:num_excess_games]])
147 del self.buffer[:num_excess_games]
148 self.priorities = self.priorities[excess_games_steps:]
149 del self.game_look_up[:excess_games_steps]
150 self.base_idx += num_excess_games
151
152 self.clear_time = time.time()
153
154 def clear_buffer(self):
155 del self.buffer[:]

Callers 1

remove_to_fitMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected