mirror of
https://github.com/illiumst/marl-factory-grid.git
synced 2025-11-02 13:37:27 +01:00
Merge branch 'main' into refactor_rename
# Conflicts: # marl_factory_grid/modules/clean_up/groups.py # marl_factory_grid/modules/clean_up/rules.py # marl_factory_grid/modules/destinations/rules.py
This commit is contained in:
@@ -22,7 +22,7 @@ This file is used for:
|
||||
"""
|
||||
|
||||
|
||||
LEVELS_DIR = 'modules/levels' # for use in studies and experiments
|
||||
LEVELS_DIR = 'levels' # for use in studies and experiments
|
||||
STEPS_START = 1 # Define where to the stepcount; which is the first step
|
||||
|
||||
IGNORED_DF_COLUMNS = ['Episode', 'Run', # For plotting, which values are ignored when loading monitor files
|
||||
|
||||
@@ -88,11 +88,15 @@ class Gamestate(object):
|
||||
results.extend(self.rules.tick_pre_step_all(self))
|
||||
|
||||
for idx, action_int in enumerate(actions):
|
||||
agent = self[c.AGENT][idx].clear_temp_state()
|
||||
action = agent.actions[action_int]
|
||||
action_result = action.do(agent, self)
|
||||
results.append(action_result)
|
||||
agent.set_state(action_result)
|
||||
if not agent.var_is_paralyzed:
|
||||
agent = self[c.AGENT][idx].clear_temp_state()
|
||||
action = agent.actions[action_int]
|
||||
action_result = action.do(agent, self)
|
||||
results.append(action_result)
|
||||
agent.set_state(action_result)
|
||||
else:
|
||||
self.print(f"{agent.name} is paralied because of: {agent.paralyze_reasons}")
|
||||
continue
|
||||
|
||||
results.extend(self.rules.tick_step_all(self))
|
||||
results.extend(self.rules.tick_post_step_all(self))
|
||||
|
||||
Reference in New Issue
Block a user