updated factory concept

This commit is contained in:
romue 2021-05-07 15:54:18 +02:00
parent a57b99b5a5
commit 385e6868dd
2 changed files with 13 additions and 7 deletions

View File

@ -61,10 +61,3 @@ class BaseFactory(object):
def step_core(self, collisions_vec, actions, r): def step_core(self, collisions_vec, actions, r):
return 0 return 0
if __name__ == '__main__':
factory = BaseFactory(n_agents=1)
print(factory.state)
state, r, done, _ = factory.step(0)
print(state)

View File

@ -0,0 +1,13 @@
from environments.factory.base_factory import BaseFactory
class SimpleFactory(BaseFactory):
def __init__(self, *args, max_dirt=5, **kwargs):
super(SimpleFactory, self).__init__(*args, **kwargs)
if __name__ == '__main__':
factory = SimpleFactory(n_agents=1, max_dirt=2)
print(factory.state)
state, r, done, _ = factory.step(0)
print(state)