Skip to main content

The AI framework for Reinforcement Learning, Automated Planning and Scheduling

Project description

                _  __    _  __              __             _      __    
   _____ _____ (_)/ /__ (_)/ /_        ____/ /___   _____ (_)____/ /___ 
  / ___// ___// // //_// // __/______ / __  // _ \ / ___// // __  // _ \
 (__  )/ /__ / // ,<  / // /_ /_____// /_/ //  __// /__ / // /_/ //  __/
/____/ \___//_//_/|_|/_/ \__/        \__,_/ \___/ \___//_/ \__,_/ \___/

actions status version stars forks


Scikit-decide for Python

Scikit-decide is an AI framework for Reinforcement Learning, Automated Planning and Scheduling.

Installation

1. Make sure to have a Python 3.7+ environment

The use of a virtual environment for scikit-decide is recommended, e.g. by using conda:

On MacOS/Linux:

python3 -m venv /path/to/new/virtual/environment
source /path/to/new/virtual/environment/bin/activate

On Windows:

py -m venv \path\to\new\virtual\environment
\path\to\new\virtual\environment\Scripts\activate

2. Quick install [Recommended]

pip3 install -U pip
pip3 install scikit-decide[all]

3. Install from source

pip3 install -U pip
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
git clone --recurse-submodules -j8 https://github.com/Airbus/scikit-decide.git
cd scikit-decide
poetry install --no-root --extras all
poetry build 

Documentation

Online

The latest documentation is available online.

Locally

You can also run the documentation locally (e.g. when you are contributing to it or to access an older version).

1. Install the documentation

The documentation is using VuePress to generate an interactive static website.

First, get Yarn (package manager) by following these installation steps.

Make sure you are in the "scikit-decide" root directory and install documentation dependencies:

cd YOUR_LOCAL_PATH_TO_GIT_CLONED_SKDECIDE
yarn install

2. Access the documentation

Make sure you are in the "scikit-decide" root directory and start the local documentation server:

cd YOUR_LOCAL_PATH_TO_GIT_CLONED_SKDECIDE
yarn docs:dev

Open your web browser to access the documentation (by default on http://localhost:8080).

Examples

The examples can be found in the /examples folder, showing how to import or define a domain, and how to run or solve it. Most of the examples rely on scikit-decide Hub, an extensible catalog of domains/solvers.

Some examples are automatically embedded as Python notebooks in the Examples section of the documentation.

Playground

The best example to try out scikit-decide capabilities might be examples/full_multisolve.py. This interactive console experience makes it easy to pick a domain among a pre-defined catalog selection:

  • Simple Grid World
  • Maze
  • Mastermind
  • Cart Pole (OpenAI Gym)
  • Mountain Car continuous (OpenAI Gym)
  • ATARI Pacman (OpenAI Gym)

...and then solve it with any compatible solver (detected automatically) among following selection:

  • Random walk
  • Simple greedy
  • Lazy A* (classical planning)
  • PPO: Proximal Policy Optimization (deep reinforcement learning)
  • POMCP: Partially Observable Monte-Carlo Planning (online planning for POMDP)
  • CGP: Cartesian Genetic Programming (evolution strategy)
  • IW: Iterated Width search (width-based planning)

Note: some requirements declared in above solvers still need fine-tuning, so in some cases an auto-detected compatible solver may still be unable to solve a domain (for now).

These combinations are particularly efficient if you want to try them out:

  • Simple Grid World -> Lazy A*
  • Maze -> Lazy A*
  • Mastermind -> POMCP: Partially Observable Monte-Carlo Planning
  • Cart Pole -> PPO: Proximal Policy Optimization
  • Mountain Car continuous -> CGP: Cartesian Genetic Programming
  • ATARI Pacman -> Random walk

Warning: some domains/solvers might require extra manual setup steps to work at 100%. In the future, each scikit-decide hub entry might have a dedicated help page to list them, but in the meantime please refer to this:

  • [domain] OpenAI Gym ones -> gym for loading Gym environments not included by default
  • [solver] PPO: Proximal Policy Optimization -> see Stable Baselines installation
  • [solver] IW: Iterated Width search (same for AOstar, Astar, BFWS) -> special C++ compilation (see Installation 2.c. above)

Unit tests

Pytest is required to run unit tests (pip install pytest).

Make sure you are in the "scikit-decide" root directory and run unit tests (the "-v" verbose mode is optional but gives additional details):

cd YOUR_LOCAL_PATH_TO_GIT_CLONED_SKDECIDE
poetry run pytest -vv -s tests/solvers/cpp

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

scikit_decide-0.9.2-cp38-cp38-win_amd64.whl (15.2 MB view hashes)

Uploaded CPython 3.8 Windows x86-64

scikit_decide-0.9.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.8 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

scikit_decide-0.9.2-cp38-cp38-macosx_10_15_x86_64.whl (14.7 MB view hashes)

Uploaded CPython 3.8 macOS 10.15+ x86-64

scikit_decide-0.9.2-cp37-cp37m-win_amd64.whl (15.2 MB view hashes)

Uploaded CPython 3.7m Windows x86-64

scikit_decide-0.9.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.8 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

scikit_decide-0.9.2-cp37-cp37m-macosx_10_15_x86_64.whl (14.6 MB view hashes)

Uploaded CPython 3.7m macOS 10.15+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page