mirror of
https://github.com/illiumst/marl-factory-grid.git
synced 2025-05-23 07:16:44 +02:00
updated factory concept
This commit is contained in:
parent
a57b99b5a5
commit
385e6868dd
@ -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)
|
|
13
environments/factory/simple_factory.py
Normal file
13
environments/factory/simple_factory.py
Normal 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)
|
Loading…
x
Reference in New Issue
Block a user