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
- Make sure you have
python3.6.8(or newer) andpip3
Ubuntu 16.10 or newer:
$ sudo apt-get install python3.6 python3-pip
MacOS:
$ brew install python3
- 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
dtcontroland 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.
- 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.
- 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
- If
sudo apt-get install python3.6does not work, this might help you: https://askubuntu.com/questions/865554/how-do-i-install-python-3-6-using-apt-get. - 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. - If you don't see what went wrong, leave the virtual environment (run "deactivate"), delete the folder
rm -rf ~/dtcontrol-venvand 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d641761b80a93e8892aa78de40b146488b3765643219a198565e7b8fc10f786
|
|
| MD5 |
3a06f880d86c4ffdac857f7be5fdd045
|
|
| BLAKE2b-256 |
11abe7abf19fa9890cb4350baf3e5ded0820554868ac8ac9f25c23559ebd7327
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e5976af60fd798d56d657966e7e61d05ec5321bd1f6f4a7644926081e08dca1
|
|
| MD5 |
97a92cce1fea5fbb4d04c137903bb189
|
|
| BLAKE2b-256 |
fece8f2a3ab4f8c426c3fca3d769f5f1a422a4c58f3d06693a67d577330503cb
|