mirror of
https://github.com/illiumst/marl-factory-grid.git
synced 2025-07-07 01:51:35 +02:00
automodules and small adjustments
This commit is contained in:
12
README.md
12
README.md
@ -34,7 +34,7 @@ within multi-agent environments.
|
||||
|
||||
|
||||
## Setup
|
||||
Install this environment using `pip install marl-factory-grid`. For more information click [here](docs/source/installation.rst).
|
||||
Install this environment using `pip install marl-factory-grid`. For more information refer to ['installation'](docs/source/installation.rst).
|
||||
Refer to [quickstart](_quickstart) for specific scenarios.
|
||||
|
||||
## Usage
|
||||
@ -45,11 +45,11 @@ Simply specify the requirements of your environment in a [*yaml*-configfile](mar
|
||||
If you only plan on using the environment without making any modifications, use ``quickstart_use``.
|
||||
This creates a default config-file and another one that lists all possible options of the environment.
|
||||
Also, it generates an initial script where an agent is executed in the specified environment.
|
||||
For further details on utilizing the environment, refer to the documentation [here](docs/source/usage.rst).
|
||||
For further details on utilizing the environment, refer to ['usage'](docs/source/usage.rst).
|
||||
|
||||
Existing modules include a variety of functionalities within the environment:
|
||||
- [Agents](marl_factory_grid/algorithms) implement either static strategies or learning algorithms based on the specific configuration.
|
||||
- Their action set includes opening [doors](marl_factory_grid/modules/doors/entitites.py), cleaning
|
||||
- Their action set includes opening [door entities](marl_factory_grid/modules/doors/entitites.py), cleaning
|
||||
[dirt](marl_factory_grid/modules/clean_up/entitites.py), picking up [items](marl_factory_grid/modules/items/entitites.py) and
|
||||
delivering them to designated drop-off locations.
|
||||
- Agents are equipped with a [battery](marl_factory_grid/modules/batteries/entitites.py) that gradually depletes over time if not charged at a chargepod.
|
||||
@ -59,7 +59,7 @@ delivering them to designated drop-off locations.
|
||||
|
||||
If you plan on modifying the environment by for example adding entities or rules, use ``quickstart_modify``.
|
||||
This creates a template module and a script that runs an agent, incorporating the generated module.
|
||||
More information on how to modify the levels, entities, groups, rules and assets [here](docs/source/modifications.rst).
|
||||
More information on how to modify the levels, entities, groups, rules and assets goto [modifications](docs/source/modifications.rst).
|
||||
|
||||
### Levels
|
||||
Varying levels are created by defining Walls, Floor or Doors in *.txt*-files (see [levels](marl_factory_grid/levels) for examples).
|
||||
@ -69,7 +69,7 @@ General:
|
||||
level_name: rooms # 'double', 'large', 'simple', ...
|
||||
```
|
||||
... or create your own , maybe with the help of [asciiflow.com](https://asciiflow.com/#/).
|
||||
Make sure to use `#` as [Walls](marl_factory_grid/environment/entity/wall.py), `-` as free (walkable) floor, `D` for [Walls](./modules/doors/entities.py).
|
||||
Make sure to use `#` as [Walls](marl_factory_grid/environment/entity/wall.py), `-` as free (walkable) floor, `D` for [Doors](./modules/doors/entities.py).
|
||||
Other Entites (define you own) may bring their own `Symbols`
|
||||
|
||||
### Entites
|
||||
@ -86,7 +86,7 @@ All [Entites](marl_factory_grid/environment/entity/global_entities.py) are avail
|
||||
Each of the hookes (`on_init`, `pre_step`, `on_step`, '`post_step`', `on_done`)
|
||||
provide env-access to implement customn logic, calculate rewards, or gather information.
|
||||
|
||||

|
||||

|
||||
|
||||
[Results](marl_factory_grid/environment/entity/object.py) provide a way to return `rule` evaluations such as rewards and state reports
|
||||
back to the environment.
|
||||
|
@ -1,2 +1,3 @@
|
||||
myst_parser
|
||||
sphinx-pdj-theme
|
||||
sphinx-mdinclude
|
||||
|
@ -1,14 +1,8 @@
|
||||
Code
|
||||
====
|
||||
|
||||
.. autosummary::
|
||||
:recursive:
|
||||
:toctree: generated
|
||||
|
||||
marl_factory_grid
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
:glob:
|
||||
|
||||
generated/*
|
||||
code/*
|
53
docs/source/code/marl_factory_grid.environment.entity.rst
Normal file
53
docs/source/code/marl_factory_grid.environment.entity.rst
Normal file
@ -0,0 +1,53 @@
|
||||
marl\_factory\_grid.environment.entity package
|
||||
==============================================
|
||||
|
||||
Submodules
|
||||
----------
|
||||
|
||||
marl\_factory\_grid.environment.entity.agent module
|
||||
---------------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.environment.entity.agent
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
marl\_factory\_grid.environment.entity.entity module
|
||||
----------------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.environment.entity.entity
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
marl\_factory\_grid.environment.entity.object module
|
||||
----------------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.environment.entity.object
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
marl\_factory\_grid.environment.entity.util module
|
||||
--------------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.environment.entity.util
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
marl\_factory\_grid.environment.entity.wall module
|
||||
--------------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.environment.entity.wall
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Module contents
|
||||
---------------
|
||||
|
||||
.. automodule:: marl_factory_grid.environment.entity
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
69
docs/source/code/marl_factory_grid.environment.groups.rst
Normal file
69
docs/source/code/marl_factory_grid.environment.groups.rst
Normal file
@ -0,0 +1,69 @@
|
||||
marl\_factory\_grid.environment.groups package
|
||||
==============================================
|
||||
|
||||
Submodules
|
||||
----------
|
||||
|
||||
marl\_factory\_grid.environment.groups.agents module
|
||||
----------------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.environment.groups.agents
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
marl\_factory\_grid.environment.groups.collection module
|
||||
--------------------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.environment.groups.collection
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
marl\_factory\_grid.environment.groups.global\_entities module
|
||||
--------------------------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.environment.groups.global_entities
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
marl\_factory\_grid.environment.groups.mixins module
|
||||
----------------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.environment.groups.mixins
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
marl\_factory\_grid.environment.groups.objects module
|
||||
-----------------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.environment.groups.objects
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
marl\_factory\_grid.environment.groups.utils module
|
||||
---------------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.environment.groups.utils
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
marl\_factory\_grid.environment.groups.walls module
|
||||
---------------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.environment.groups.walls
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Module contents
|
||||
---------------
|
||||
|
||||
.. automodule:: marl_factory_grid.environment.groups
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
62
docs/source/code/marl_factory_grid.environment.rst
Normal file
62
docs/source/code/marl_factory_grid.environment.rst
Normal file
@ -0,0 +1,62 @@
|
||||
marl\_factory\_grid.environment package
|
||||
=======================================
|
||||
|
||||
Subpackages
|
||||
-----------
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 4
|
||||
|
||||
marl_factory_grid.environment.entity
|
||||
marl_factory_grid.environment.groups
|
||||
|
||||
Submodules
|
||||
----------
|
||||
|
||||
marl\_factory\_grid.environment.actions module
|
||||
----------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.environment.actions
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
marl\_factory\_grid.environment.constants module
|
||||
------------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.environment.constants
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
marl\_factory\_grid.environment.factory module
|
||||
----------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.environment.factory
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
marl\_factory\_grid.environment.rewards module
|
||||
----------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.environment.rewards
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
marl\_factory\_grid.environment.rules module
|
||||
--------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.environment.rules
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Module contents
|
||||
---------------
|
||||
|
||||
.. automodule:: marl_factory_grid.environment
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
10
docs/source/code/marl_factory_grid.levels.rst
Normal file
10
docs/source/code/marl_factory_grid.levels.rst
Normal file
@ -0,0 +1,10 @@
|
||||
marl\_factory\_grid.levels package
|
||||
==================================
|
||||
|
||||
Module contents
|
||||
---------------
|
||||
|
||||
.. automodule:: marl_factory_grid.levels
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
53
docs/source/code/marl_factory_grid.modules.batteries.rst
Normal file
53
docs/source/code/marl_factory_grid.modules.batteries.rst
Normal file
@ -0,0 +1,53 @@
|
||||
marl\_factory\_grid.modules.batteries package
|
||||
=============================================
|
||||
|
||||
Submodules
|
||||
----------
|
||||
|
||||
marl\_factory\_grid.modules.batteries.actions module
|
||||
----------------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.modules.batteries.actions
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
marl\_factory\_grid.modules.batteries.constants module
|
||||
------------------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.modules.batteries.constants
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
marl\_factory\_grid.modules.batteries.entitites module
|
||||
------------------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.modules.batteries.entitites
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
marl\_factory\_grid.modules.batteries.groups module
|
||||
---------------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.modules.batteries.groups
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
marl\_factory\_grid.modules.batteries.rules module
|
||||
--------------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.modules.batteries.rules
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Module contents
|
||||
---------------
|
||||
|
||||
.. automodule:: marl_factory_grid.modules.batteries
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
53
docs/source/code/marl_factory_grid.modules.clean_up.rst
Normal file
53
docs/source/code/marl_factory_grid.modules.clean_up.rst
Normal file
@ -0,0 +1,53 @@
|
||||
marl\_factory\_grid.modules.clean\_up package
|
||||
=============================================
|
||||
|
||||
Submodules
|
||||
----------
|
||||
|
||||
marl\_factory\_grid.modules.clean\_up.actions module
|
||||
----------------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.modules.clean_up.actions
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
marl\_factory\_grid.modules.clean\_up.constants module
|
||||
------------------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.modules.clean_up.constants
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
marl\_factory\_grid.modules.clean\_up.entitites module
|
||||
------------------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.modules.clean_up.entitites
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
marl\_factory\_grid.modules.clean\_up.groups module
|
||||
---------------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.modules.clean_up.groups
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
marl\_factory\_grid.modules.clean\_up.rules module
|
||||
--------------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.modules.clean_up.rules
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Module contents
|
||||
---------------
|
||||
|
||||
.. automodule:: marl_factory_grid.modules.clean_up
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
53
docs/source/code/marl_factory_grid.modules.destinations.rst
Normal file
53
docs/source/code/marl_factory_grid.modules.destinations.rst
Normal file
@ -0,0 +1,53 @@
|
||||
marl\_factory\_grid.modules.destinations package
|
||||
================================================
|
||||
|
||||
Submodules
|
||||
----------
|
||||
|
||||
marl\_factory\_grid.modules.destinations.actions module
|
||||
-------------------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.modules.destinations.actions
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
marl\_factory\_grid.modules.destinations.constants module
|
||||
---------------------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.modules.destinations.constants
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
marl\_factory\_grid.modules.destinations.entitites module
|
||||
---------------------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.modules.destinations.entitites
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
marl\_factory\_grid.modules.destinations.groups module
|
||||
------------------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.modules.destinations.groups
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
marl\_factory\_grid.modules.destinations.rules module
|
||||
-----------------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.modules.destinations.rules
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Module contents
|
||||
---------------
|
||||
|
||||
.. automodule:: marl_factory_grid.modules.destinations
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
53
docs/source/code/marl_factory_grid.modules.doors.rst
Normal file
53
docs/source/code/marl_factory_grid.modules.doors.rst
Normal file
@ -0,0 +1,53 @@
|
||||
marl\_factory\_grid.modules.doors package
|
||||
=========================================
|
||||
|
||||
Submodules
|
||||
----------
|
||||
|
||||
marl\_factory\_grid.modules.doors.actions module
|
||||
------------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.modules.doors.actions
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
marl\_factory\_grid.modules.doors.constants module
|
||||
--------------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.modules.doors.constants
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
marl\_factory\_grid.modules.doors.entitites module
|
||||
--------------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.modules.doors.entitites
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
marl\_factory\_grid.modules.doors.groups module
|
||||
-----------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.modules.doors.groups
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
marl\_factory\_grid.modules.doors.rules module
|
||||
----------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.modules.doors.rules
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Module contents
|
||||
---------------
|
||||
|
||||
.. automodule:: marl_factory_grid.modules.doors
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
53
docs/source/code/marl_factory_grid.modules.items.rst
Normal file
53
docs/source/code/marl_factory_grid.modules.items.rst
Normal file
@ -0,0 +1,53 @@
|
||||
marl\_factory\_grid.modules.items package
|
||||
=========================================
|
||||
|
||||
Submodules
|
||||
----------
|
||||
|
||||
marl\_factory\_grid.modules.items.actions module
|
||||
------------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.modules.items.actions
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
marl\_factory\_grid.modules.items.constants module
|
||||
--------------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.modules.items.constants
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
marl\_factory\_grid.modules.items.entitites module
|
||||
--------------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.modules.items.entitites
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
marl\_factory\_grid.modules.items.groups module
|
||||
-----------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.modules.items.groups
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
marl\_factory\_grid.modules.items.rules module
|
||||
----------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.modules.items.rules
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Module contents
|
||||
---------------
|
||||
|
||||
.. automodule:: marl_factory_grid.modules.items
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
53
docs/source/code/marl_factory_grid.modules.machines.rst
Normal file
53
docs/source/code/marl_factory_grid.modules.machines.rst
Normal file
@ -0,0 +1,53 @@
|
||||
marl\_factory\_grid.modules.machines package
|
||||
============================================
|
||||
|
||||
Submodules
|
||||
----------
|
||||
|
||||
marl\_factory\_grid.modules.machines.actions module
|
||||
---------------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.modules.machines.actions
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
marl\_factory\_grid.modules.machines.constants module
|
||||
-----------------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.modules.machines.constants
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
marl\_factory\_grid.modules.machines.entitites module
|
||||
-----------------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.modules.machines.entitites
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
marl\_factory\_grid.modules.machines.groups module
|
||||
--------------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.modules.machines.groups
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
marl\_factory\_grid.modules.machines.rules module
|
||||
-------------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.modules.machines.rules
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Module contents
|
||||
---------------
|
||||
|
||||
.. automodule:: marl_factory_grid.modules.machines
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
45
docs/source/code/marl_factory_grid.modules.maintenance.rst
Normal file
45
docs/source/code/marl_factory_grid.modules.maintenance.rst
Normal file
@ -0,0 +1,45 @@
|
||||
marl\_factory\_grid.modules.maintenance package
|
||||
===============================================
|
||||
|
||||
Submodules
|
||||
----------
|
||||
|
||||
marl\_factory\_grid.modules.maintenance.constants module
|
||||
--------------------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.modules.maintenance.constants
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
marl\_factory\_grid.modules.maintenance.entities module
|
||||
-------------------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.modules.maintenance.entities
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
marl\_factory\_grid.modules.maintenance.groups module
|
||||
-----------------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.modules.maintenance.groups
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
marl\_factory\_grid.modules.maintenance.rules module
|
||||
----------------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.modules.maintenance.rules
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Module contents
|
||||
---------------
|
||||
|
||||
.. automodule:: marl_factory_grid.modules.maintenance
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
25
docs/source/code/marl_factory_grid.modules.rst
Normal file
25
docs/source/code/marl_factory_grid.modules.rst
Normal file
@ -0,0 +1,25 @@
|
||||
marl\_factory\_grid.modules package
|
||||
===================================
|
||||
|
||||
Subpackages
|
||||
-----------
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 4
|
||||
|
||||
marl_factory_grid.modules.batteries
|
||||
marl_factory_grid.modules.clean_up
|
||||
marl_factory_grid.modules.destinations
|
||||
marl_factory_grid.modules.doors
|
||||
marl_factory_grid.modules.items
|
||||
marl_factory_grid.modules.machines
|
||||
marl_factory_grid.modules.maintenance
|
||||
marl_factory_grid.modules.zones
|
||||
|
||||
Module contents
|
||||
---------------
|
||||
|
||||
.. automodule:: marl_factory_grid.modules
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
45
docs/source/code/marl_factory_grid.modules.zones.rst
Normal file
45
docs/source/code/marl_factory_grid.modules.zones.rst
Normal file
@ -0,0 +1,45 @@
|
||||
marl\_factory\_grid.modules.zones package
|
||||
=========================================
|
||||
|
||||
Submodules
|
||||
----------
|
||||
|
||||
marl\_factory\_grid.modules.zones.constants module
|
||||
--------------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.modules.zones.constants
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
marl\_factory\_grid.modules.zones.entitites module
|
||||
--------------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.modules.zones.entitites
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
marl\_factory\_grid.modules.zones.groups module
|
||||
-----------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.modules.zones.groups
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
marl\_factory\_grid.modules.zones.rules module
|
||||
----------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.modules.zones.rules
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Module contents
|
||||
---------------
|
||||
|
||||
.. automodule:: marl_factory_grid.modules.zones
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
32
docs/source/code/marl_factory_grid.rst
Normal file
32
docs/source/code/marl_factory_grid.rst
Normal file
@ -0,0 +1,32 @@
|
||||
marl\_factory\_grid package
|
||||
===========================
|
||||
|
||||
Subpackages
|
||||
-----------
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 4
|
||||
|
||||
marl_factory_grid.environment
|
||||
marl_factory_grid.levels
|
||||
marl_factory_grid.modules
|
||||
marl_factory_grid.utils
|
||||
|
||||
Submodules
|
||||
----------
|
||||
|
||||
marl\_factory\_grid.quickstart module
|
||||
-------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.quickstart
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Module contents
|
||||
---------------
|
||||
|
||||
.. automodule:: marl_factory_grid
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
29
docs/source/code/marl_factory_grid.utils.logging.rst
Normal file
29
docs/source/code/marl_factory_grid.utils.logging.rst
Normal file
@ -0,0 +1,29 @@
|
||||
marl\_factory\_grid.utils.logging package
|
||||
=========================================
|
||||
|
||||
Submodules
|
||||
----------
|
||||
|
||||
marl\_factory\_grid.utils.logging.envmonitor module
|
||||
---------------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.utils.logging.envmonitor
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
marl\_factory\_grid.utils.logging.recorder module
|
||||
-------------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.utils.logging.recorder
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Module contents
|
||||
---------------
|
||||
|
||||
.. automodule:: marl_factory_grid.utils.logging
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
37
docs/source/code/marl_factory_grid.utils.plotting.rst
Normal file
37
docs/source/code/marl_factory_grid.utils.plotting.rst
Normal file
@ -0,0 +1,37 @@
|
||||
marl\_factory\_grid.utils.plotting package
|
||||
==========================================
|
||||
|
||||
Submodules
|
||||
----------
|
||||
|
||||
marl\_factory\_grid.utils.plotting.plot\_compare\_runs module
|
||||
-------------------------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.utils.plotting.plot_compare_runs
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
marl\_factory\_grid.utils.plotting.plot\_single\_runs module
|
||||
------------------------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.utils.plotting.plot_single_runs
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
marl\_factory\_grid.utils.plotting.plotting\_utils module
|
||||
---------------------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.utils.plotting.plotting_utils
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Module contents
|
||||
---------------
|
||||
|
||||
.. automodule:: marl_factory_grid.utils.plotting
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
102
docs/source/code/marl_factory_grid.utils.rst
Normal file
102
docs/source/code/marl_factory_grid.utils.rst
Normal file
@ -0,0 +1,102 @@
|
||||
marl\_factory\_grid.utils package
|
||||
=================================
|
||||
|
||||
Subpackages
|
||||
-----------
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 4
|
||||
|
||||
marl_factory_grid.utils.logging
|
||||
marl_factory_grid.utils.plotting
|
||||
|
||||
Submodules
|
||||
----------
|
||||
|
||||
marl\_factory\_grid.utils.config\_parser module
|
||||
-----------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.utils.config_parser
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
marl\_factory\_grid.utils.helpers module
|
||||
----------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.utils.helpers
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
marl\_factory\_grid.utils.level\_parser module
|
||||
----------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.utils.level_parser
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
marl\_factory\_grid.utils.observation\_builder module
|
||||
-----------------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.utils.observation_builder
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
marl\_factory\_grid.utils.ray\_caster module
|
||||
--------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.utils.ray_caster
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
marl\_factory\_grid.utils.renderer module
|
||||
-----------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.utils.renderer
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
marl\_factory\_grid.utils.results module
|
||||
----------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.utils.results
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
marl\_factory\_grid.utils.states module
|
||||
---------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.utils.states
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
marl\_factory\_grid.utils.tools module
|
||||
--------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.utils.tools
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
marl\_factory\_grid.utils.utility\_classes module
|
||||
-------------------------------------------------
|
||||
|
||||
.. automodule:: marl_factory_grid.utils.utility_classes
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Module contents
|
||||
---------------
|
||||
|
||||
.. automodule:: marl_factory_grid.utils
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
@ -14,12 +14,11 @@ release = '2.5.0'
|
||||
# -- General configuration ---------------------------------------------------
|
||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
|
||||
|
||||
extensions = ['myst_parser',
|
||||
'sphinx.ext.duration',
|
||||
'sphinx.ext.doctest',
|
||||
extensions = [#'myst_parser',
|
||||
'sphinx.ext.autodoc',
|
||||
'sphinx.ext.autosummary',
|
||||
'sphinx.ext.linkcode',
|
||||
'sphinx_mdinclude',
|
||||
]
|
||||
|
||||
templates_path = ['_templates']
|
||||
@ -30,6 +29,7 @@ exclude_patterns = ['marl_factory_grid.utils.proto', 'marl_factory_grid.utils.pr
|
||||
from pathlib import Path
|
||||
import sys
|
||||
sys.path.insert(0, (Path(__file__).parents[2]).resolve().as_posix())
|
||||
sys.path.insert(0, (Path(__file__).parents[2] / 'marl_factory_grid').resolve().as_posix())
|
||||
import sphinx_pdj_theme
|
||||
|
||||
# -- Options for HTML output -------------------------------------------------
|
||||
@ -52,3 +52,6 @@ def linkcode_resolve(domain, info):
|
||||
return "https://github.com/illiumst/marl-factory-grid/%s.py" % filename
|
||||
|
||||
autoclass_content = 'both'
|
||||
autosummary_generate = True
|
||||
|
||||
print(sys.executable)
|
@ -6,8 +6,12 @@
|
||||
Welcome to marl-factory-grid's documentation!
|
||||
=============================================
|
||||
|
||||
.. mdinclude:: ../../README.md
|
||||
|
||||
Test
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:maxdepth: 1
|
||||
:caption: Contents:
|
||||
|
||||
installation
|
||||
|
@ -1,5 +1,5 @@
|
||||
How to modify the environment or write modules
|
||||
===============================================
|
||||
==============================================
|
||||
|
||||
Modifying levels
|
||||
----------------
|
||||
@ -20,7 +20,7 @@ Other Entities (define your own) may bring their own `Symbols`.
|
||||
|
||||
|
||||
Modifying Entites
|
||||
----------------
|
||||
-----------------
|
||||
Entities are `Objects`_ that can additionally be assigned a position.
|
||||
Abstract Entities are provided.
|
||||
|
||||
@ -40,7 +40,7 @@ If you add an entity, you probably also want a collection of that entity.
|
||||
.. _Entity Collections: marl_factory_grid/environment/entity/global_entities.py
|
||||
|
||||
Modifying Rules
|
||||
----------------
|
||||
---------------
|
||||
`Rules`_ define how the environment behaves on micro scale.
|
||||
Each of the hooks (`on_init`, `pre_step`, `on_step`, '`post_step`', `on_done`) provide env-access to implement custom
|
||||
logic, calculate rewards, or gather information.
|
||||
@ -50,11 +50,11 @@ to implement your own rule logic.
|
||||
|
||||
.. _Rules: marl_factory_grid/environment/entity/object.py
|
||||
|
||||
.. image:: ./images/Hooks_FIKS.png
|
||||
.. image:: ../../images/Hooks_FIKS.png
|
||||
:alt: Hooks Image
|
||||
|
||||
Modifying Results
|
||||
----------------
|
||||
-----------------
|
||||
`Results`_ provide a way to return `rule` evaluations such as rewards and state reports back to the environment.
|
||||
|
||||
.. _Results: marl_factory_grid/utils/results.py
|
||||
@ -64,7 +64,7 @@ Modifying Assets
|
||||
Make sure to bring your own assets for each Entity living in the Gridworld as the `Renderer` relies on it.
|
||||
PNG-files (transparent background) of square aspect-ratio should do the job, in general.
|
||||
|
||||
.. image:: ./marl_factory_grid/environment/assets/wall.png
|
||||
.. image:: ../../marl_factory_grid/environment/assets/wall.png
|
||||
:alt: Wall Image
|
||||
.. image:: ./marl_factory_grid/environment/assets/agent/agent.png
|
||||
.. image:: ../../marl_factory_grid/environment/assets/agent/agent.png
|
||||
:alt: Agent Image
|
||||
|
@ -1,5 +1,5 @@
|
||||
Using the environment with your agents
|
||||
===========================================
|
||||
======================================
|
||||
|
||||
Environment objects, including agents, entities and rules, that are specified in a *yaml*-configfile will be loaded automatically.
|
||||
Using ``quickstart_use`` creates a default config-file and another one that lists all possible options of the environment.
|
||||
@ -58,7 +58,7 @@ Here's a breakdown of the key components in the provided script. Feel free to cu
|
||||
|
||||
|
||||
Evaluating the run
|
||||
----
|
||||
------------------
|
||||
|
||||
If monitoring and recording are enabled, the environment states will be traced and recorded automatically.
|
||||
|
||||
|
@ -182,6 +182,16 @@ class Factory(gym.Env):
|
||||
return reward, done, info
|
||||
|
||||
def step(self, actions):
|
||||
"""
|
||||
Run one timestep of the environment's dynamics using the agent actions.
|
||||
|
||||
When the end of an episode is reached (``terminated or truncated``), it is necessary to call :meth:`reset` to
|
||||
reset this environment's state for the next episode.
|
||||
|
||||
:param actions: An action or list of actions provided by the agent(s) to update the environment state.
|
||||
:return: observation, reward, terminated, truncated, info, done
|
||||
:rtype: tuple(list(np.ndarray), float, bool, bool, dict, bool)
|
||||
"""
|
||||
|
||||
if not isinstance(actions, list):
|
||||
actions = [int(actions)]
|
||||
|
@ -10,14 +10,14 @@ from marl_factory_grid.environment import constants as c
|
||||
|
||||
"""
|
||||
This file is used for:
|
||||
1. string based definition
|
||||
Use a class like `Constants`, to define attributes, which then reveal strings.
|
||||
These can be used for naming convention along the environments as well as keys for mappings such as dicts etc.
|
||||
When defining new envs, use class inheritance.
|
||||
|
||||
2. utility function definition
|
||||
There are static utility functions which are not bound to a specific environment.
|
||||
In this file they are defined to be used across the entire package.
|
||||
1. string based definition
|
||||
Use a class like `Constants`, to define attributes, which then reveal strings.
|
||||
These can be used for naming convention along the environments as well as keys for mappings such as dicts etc.
|
||||
When defining new envs, use class inheritance.
|
||||
|
||||
2. utility function definition
|
||||
There are static utility functions which are not bound to a specific environment.
|
||||
In this file they are defined to be used across the entire package.
|
||||
"""
|
||||
|
||||
LEVELS_DIR = 'levels' # for use in studies and experiments
|
||||
|
@ -159,7 +159,7 @@ class Gamestate(object):
|
||||
|
||||
def tick(self, actions) -> list[Result]:
|
||||
"""
|
||||
Performs a single **Gamestate Tick**by calling the inner rule hooks in sequential order.
|
||||
Performs a single **Gamestate Tick** by calling the inner rule hooks in sequential order.
|
||||
- tick_pre_step_all: Things to do before the agents do their actions. Statechange, Moving, Spawning etc...
|
||||
- agent tick: Agents do their actions.
|
||||
- tick_step_all: Things to do after the agents did their actions. Statechange, Moving, Spawning etc...
|
||||
|
Reference in New Issue
Block a user