Giter VIP home page Giter VIP logo

inventory-ai's Introduction

Inventory AI

This is an operations research puzzle but also a game. The game is formulated as a multiclass inventory-production problem with Poisson demands and constant production, both in continuous time. Certain cost functions are defined (for turning on and off, for switching between classes, etc.) and what we're gonna do is to find the optimal routing policy such that the long-run average cost is minimized. For a more formal model definition refer to my Bachelor's thesis.

Interface

Both human-playing and AI-learning modes are implemented. A nice GUI can be turned on during learning of AI, which will be on by default when you play by yourself. For a system with 5 classes, this is what you'll see:

where at the top you can see numbers from 1 to 5, corresponding to button 1 to 5 on your keyboard (so you can actually decide which class to produce in each step), and at the bottom is your current score. Either boundary the red inventory level bar touches, upper or lower, the system is deemed failed. Try play by yourself, or implement a better AI (heuristic, reinforcement learning, whatever)!

Dependencies

To run this game you'll need Python 3.x with TkInter, Pandas and Numpy pre-installed.

How-to-play

For human playing:

python3 polling.py

For AI learning (e.g. DQN):

python3 run_dqn.py

inventory-ai's People

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.