Code Monkey home page Code Monkey logo

supply_chain_reinforcement_learning's Introduction

Supply Chain Reinforcement Learning Agent

'images/supply_chain_demo.gif'

Project File Overview

Requirements

You’ll need the following:

  • Python 3.6.8 (other Python 3 versions may work as well)
  • Python's PIP package installer
  • If you have an Nvidia GPU it might be a good idea to use tensorflow-gpu in case you want to try this against other algorithms besides A2C, otherwise the regular tensorflow package will be sufficient since the neural network used is too small to see a benefit from running on the GPU.

Getting Started

If you wish to use this as a template for your own project, I highly recommend purchasing Maxim Lapan's "Deep Reinforcement Learning Hands-On". This book provided the bulk of the train_a2c.py and models.py files as well as a great understanding of how to develop a reinforcement learning agent. He provides a good amount of both mathematical and intuitive explanation to help beginners through their first project.

The commands below are for Windows and my Python alias is "python" but yours may be "python3", "py -3", etc.

Make sure you have the virtualenv package in your global Python environment.

python -m pip install virtualenv

Move this project to its own folder and setup a virtual environment inside of it.

python -m venv env

Activate your virtual environment.

env/Scripts/activate

Install the project's dependencies into your virtual environment.

pip install torch==1.2.0 torchvision==0.4.0 -f https://download.pytorch.org/whl/torch_stable.html

pip install -r requirements.txt

To run the demo version with weights I have already trained (or with your own weights):

python demo/animation.py

To run your own training regimen:

python training/train_a2c.py --name NAME_YOUR_RUN_ANYTHING

To test against the weights file you have generated during training:

python training/testing_environment.py

To track your agent's learning in tensorboard, type in the following then go to http://localhost:6006/ in your web browser:

cd training
tensorboard --logdir runs --host localhost

supply_chain_reinforcement_learning's People

Contributors

stefan-lopez avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.