mirror of
https://github.com/illiumst/marl-factory-grid.git
synced 2025-07-05 17:11:35 +02:00
Documentation
This commit is contained in:

committed by
Steffen Illium

parent
604c0c6f57
commit
855f53b406
@ -3,7 +3,7 @@ from typing import Union
|
||||
from marl_factory_grid.environment.actions import Action
|
||||
from marl_factory_grid.utils.results import ActionResult
|
||||
|
||||
from marl_factory_grid.modules.clean_up import constants as d, rewards as r
|
||||
from marl_factory_grid.modules.clean_up import constants as d
|
||||
|
||||
from marl_factory_grid.environment import constants as c
|
||||
|
||||
@ -11,7 +11,10 @@ from marl_factory_grid.environment import constants as c
|
||||
class Clean(Action):
|
||||
|
||||
def __init__(self):
|
||||
super().__init__(d.CLEAN_UP, r.CLEAN_UP_VALID, r.CLEAN_UP_FAIL)
|
||||
"""
|
||||
Attempts to reduce dirt amount on entity's position.
|
||||
"""
|
||||
super().__init__(d.CLEAN_UP, d.REWARD_CLEAN_UP_VALID, d.REWARD_CLEAN_UP_FAIL)
|
||||
|
||||
def do(self, entity, state) -> Union[None, ActionResult]:
|
||||
if dirt := next((x for x in state.entities.pos_dict[entity.pos] if "dirt" in x.name.lower()), None):
|
||||
|
Reference in New Issue
Block a user