Skip to main content

dtControl: Decision Tree Learning Algorithms for Controller Representation

System requirements

To run dtControl, you need Python 3.6.8 or higher with several libraries, namely numpy, pandas, scikit-learn, jinja2 and tqdm. This README explains how to install all of these on a Linux machine.

Installing dtControl on your machine

For most users, running

$ pip install dtcontrol

inside a new virtual environment (for details, see next section) should install the latest version of dtControl, as long as you have python >= 3.6.8 and pip installed on your system (if not, install python by following the steps in the next section and try again). In case you have both python2 as well as python3 installed on your system, you might have to run python3 -m pip install dtcontrol.

Manual Installation

Note: In case of difficulty when following any of the instructions in this section, please check the section 'Common Installation Issues' below

  1. Make sure you have python3.6.8 (or newer) and pip3

Ubuntu 16.10 or newer:

$ sudo apt-get install python3.6 python3-pip

MacOS:

$ brew install python3
  1. We use a virtual environment to make sure that the installation is clean and easy, and does not interfere with the python packages installed in your system. Create a new folder dtcontrol and create a virtual environment inside it
$ mkdir dtcontrol
$ cd dtcontrol
$ python3 -m venv venv

to create a virtual environment for dtControl. This will create the folder venv inside your dtcontrol folder. To uninstall the tool, you can delete this folder and thereby all traces of the python packages you installed for using it.

  1. Run
$ source venv/bin/activate

to enter the virtual environment. Run python and check that the displayed version is greater than 3.6.8 (if not, see (3) in the next section). Press Ctrl+D to exit the python console again.

  1. With the virtual environment activated, run
$ pip install dtcontrol

This should install dtControl and all its dependencies. Try running dtControl by typing dtcontrol in the console. It should print the help text.

Common Installation Issues

  1. If sudo apt-get install python3.6 does not work, this might help you: https://askubuntu.com/questions/865554/how-do-i-install-python-3-6-using-apt-get.
  2. In case of errors when trying to run virtualenv, check that it is located in a directory that is included in your path; this might help you: https://stackoverflow.com/questions/31133050/virtualenv-command-not-found.
  3. If you don't see what went wrong, leave the virtual environment (run "deactivate"), delete the folder rm -rf ~/dtcontrol-venv and go through all the installation steps again. If errors still occur, look at section Fail safe: Virtual machine.

Running the experiments

This section assumes you have installed dtControl so that upon entering dtcontrol in your command line, the help text is displayed. Additionally it assumes that you have unzip-ed all examples in ./dtcontrol/examples.

Note that running all experiments may take several hours, or possibly run out of memory. A sensible subset of case studies which run quickly (less than 5 minutes per case study/algorithm combination) is: cartpole, tworooms, 10rooms and vehicle (vehicle not for the linsvm method).

To execute a single algorithm on a single model, run a command like

$ dtcontrol --input ./dtcontrol/examples/cartpole.scs --use-preset maxfreq --timeout 30m

More information can be found by running

$ dtcontrol --help

Reading the output

To get an overview of the results, the file benchmark.html is created in the directory from which you call dtcontrol. You can open it in any browser.

Download files

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

Source Distribution

dtcontrol-1.10.6.tar.gz (183.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dtcontrol-1.10.6-py3-none-any.whl (220.9 kB view details)

Uploaded Python 3

File details

Details for the file dtcontrol-1.10.6.tar.gz.

File metadata

  • Download URL: dtcontrol-1.10.6.tar.gz
  • Upload date:
  • Size: 183.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.8.2

File hashes

Hashes for dtcontrol-1.10.6.tar.gz
Algorithm Hash digest
SHA256 3d641761b80a93e8892aa78de40b146488b3765643219a198565e7b8fc10f786
MD5 3a06f880d86c4ffdac857f7be5fdd045
BLAKE2b-256 11abe7abf19fa9890cb4350baf3e5ded0820554868ac8ac9f25c23559ebd7327

See more details on using hashes here.

File details

Details for the file dtcontrol-1.10.6-py3-none-any.whl.

File metadata

  • Download URL: dtcontrol-1.10.6-py3-none-any.whl
  • Upload date:
  • Size: 220.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.8.2

File hashes

Hashes for dtcontrol-1.10.6-py3-none-any.whl
Algorithm Hash digest
SHA256 4e5976af60fd798d56d657966e7e61d05ec5321bd1f6f4a7644926081e08dca1
MD5 97a92cce1fea5fbb4d04c137903bb189
BLAKE2b-256 fece8f2a3ab4f8c426c3fca3d769f5f1a422a4c58f3d06693a67d577330503cb

See more details on using hashes here.

Release history Release notifications | RSS feed

2.1.15

1 file

2.1.4

1 file

2.1.0

1 file

2.0.1

1 file

2.0.0

1 file

1.14.0

1 file

1.13.14

1 file

1.11.20

1 file

1.11.13

1 file

1.11.5

1 file

1.11.4

1 file

1.11.3

1 file

1.10.7

1 file

This release

1.10.6 This release

2 files

1.10.5

1 file

1.10.1

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page