mirror of
https://github.com/illiumst/marl-factory-grid.git
synced 2025-12-13 10:50:36 +01:00
Merge branch 'main' into 'unit_testing'
# Conflicts: # marl_factory_grid/algorithms/static/TSP_dirt_agent.py # marl_factory_grid/utils/config_parser.py
This commit is contained in:
@@ -10,7 +10,7 @@ class DestAction(Action):
|
||||
|
||||
def __init__(self):
|
||||
"""
|
||||
Attempts to wait at destination.
|
||||
The agent performing this action attempts to wait at the destination in order to receive a reward.
|
||||
"""
|
||||
super().__init__(d.DESTINATION, d.REWARD_WAIT_VALID, d.REWARD_WAIT_FAIL)
|
||||
|
||||
|
||||
@@ -38,7 +38,11 @@ class Destination(Entity):
|
||||
|
||||
def has_just_been_reached(self, state):
|
||||
"""
|
||||
Checks if the destination has just been reached based on the current state.
|
||||
Checks if the destination has been reached in the last environment step.
|
||||
|
||||
:return: the agent that has just reached the destination or whether any agent in the environment has
|
||||
performed actions equal to or exceeding the specified limit
|
||||
:rtype: Union[Agent, bool]
|
||||
"""
|
||||
if self.was_reached():
|
||||
return False
|
||||
|
||||
@@ -12,7 +12,7 @@ from marl_factory_grid.modules.destinations.entitites import Destination
|
||||
|
||||
ANY = 'any'
|
||||
ALL = 'all'
|
||||
SIMULTANEOUS = 'simultanious'
|
||||
SIMULTANEOUS = 'simultaneous'
|
||||
CONDITIONS = [ALL, ANY, SIMULTANEOUS]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user