cleaned up if else mess simple_factory_getting_dirty.py:47

This commit is contained in:
steffen-illium
2021-05-18 18:29:02 +02:00
parent cc5df76ef7
commit 38ffb746e3
3 changed files with 13 additions and 8 deletions

View File

@ -18,8 +18,8 @@ class SimpleFactory(BaseFactory):
dirt_slice = np.zeros((1, *self.state.shape[1:]))
self.state = np.concatenate((self.state, dirt_slice)) # dirt is now the last slice
self.spawn_dirt()
# Always: This should return state, r, done, info
return self.state, r, done, _
# Always: This should return state
return self.state
def calculate_reward(self, agent_states):
for agent_state in agent_states: