Took away explicit deleting since the next_state variable gets used in another slot
This commit is contained in:
		
							parent
							
								
									2caf869fd6
								
							
						
					
					
						commit
						736e73a1f7
					
				
					 1 changed files with 0 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -15,8 +15,6 @@ class ReplayMemory(object):
 | 
			
		|||
        """Saves a transition."""
 | 
			
		||||
        if len(self.memory) < self.capacity:
 | 
			
		||||
            self.memory.append(None)
 | 
			
		||||
        if self.memory[self.position] is not None:
 | 
			
		||||
            del self.memory[self.position]
 | 
			
		||||
        self.memory[self.position] = Transition(*args)
 | 
			
		||||
        self.position = (self.position + 1) % self.capacity
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue