Project overview\ There are two components:
A custom environment for http://gym.openai.com/ containing the simulation of a job shop production system. This environment allows a reinforcement learning (RL) agent to interact with the production system through a structured interface. The RL agent can control the production capacity through this interface and receives back a reward (in form of incurred costs). On the long run, the agent can learn what its actions caused inside the environment due to the feedback it received for each action. This allows the agent to make better decisions in the future, with the goal being that the agent can beat established heuristics or human decision making.
An implementation of a reinforcement learning agent for the environment from above, based on the Deep Q-Learning algorithm of https://stable-baselines3.readthedocs.io/en/master/. The original algorithm has received additional functionality by adding Average Reward Adjusted Discounted Reinforcement Learning, a technique that allows RL agents to handle rewards of less established shapes, i.e. periodically incurred costs.
Installation\ Requirements:
Download the project folders from a terminal:\
git clone https://github.com/sebwindm/masterarbeit.git
\
To install the gym-jobshop Python package, go to the gym-jobshop (NOT gym_jobshop)
folder and run in a terminal:\
pip install -e .
Import the gym environment to your own Python script:\
import gym
\
import gym_jobshop
Setup the environment in your agent:\
env = gym.make('jobshop-v0')
For documentation on how to work with Gym environments go to https://gym.openai.com/docs/
Troubleshooting
Known issues:
TypeError
in version 0.9 when training ARA-DiRL.
Circumvent this issue by using SB3 0.8.0 by installing it with
pip install stable-baselines3==0.8.0
pip install torch==1.6.0+cpu torchvision==0.7.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
. Any CUDA version will not work.Documentation
Documentation is next to the code and inside the master thesis.
readme_gym_jobshop.md
has a small introduction on how to change the most important settings.