Package: dtcontrol
dtControl: Decision Tree Learning Algorithms for Controller RepresentationSystem requirementsTo run dtControl, you need Python 3.8 or higher with several other libraries which are automatically installed if installing with the python-basedpippackage manager. We have tested the installation and basic functionality on Ubuntu Linux, MacOS Catalina and Windows 10.Installing dtControl on your machineFor most users, running the following command should install the latest version of dtControl, as long as you have Python 3.8 or newer andpipinstalled on your system:$ pip install dtcontrolNote that in case you have both Python 2 as well as Python 3 installed, you might have to runpython3-mpip install dtcontrol.Manual InstallationNote: In case of difficulty when following any of the instructions in this section, please check the section ‘Common Installation Issues’ belowMake sure you have Python 3.8 (or newer),pip3andpython3-venvfor creating virtual environments.OnUbuntu16.10 or newer:$ sudo apt-get install python3 python3-pip python3-venvOnMacOS, you can install with the help of the package managerHomebrew:$ brew install python3or refer to thistutorialif you don’t have Homebrew installed.OnWindows, one may followthisorthistutorial.Use a virtual environment to make sure that the installation is clean and easy, and does not interfere with any other python packages installed in your system. Create a new folderdtcontroland create a virtual environment inside it and activate the virtual environment:$ mkdir dtcontrol
$ cd dtcontrol
$ python3 -m venv venv
$ source venv/bin/activateRunpythonand verify that the displayed version is greater than 3.8. PressCtrl+Dto exit the python console again.With the virtual environment activated, run:$ pip install dtcontrolThis should installdtControland all its dependencies. Try runningdtControlby typing dtControl in the console. It should print the help text.UninstallationYou can delete thedtcontrolfolder created above to delete all traces of dtcontrol as well as its dependencies.Common Installation IssuesIfsudoapt-getinstall python3.6does not work, thisaskubuntu answermight help you.In case of errors when trying to runvirtualenv, check that it is located in a directory that is included in your path; thisstackoverflow answermight be relevant.If you don’t see what went wrong, leave the virtual environment (run “deactivate”), delete the folderrm-rf~/dtcontrol-venvand go through all the installation steps again. If errors still occur, pleaseraise an issueorcontact us.Running the experimentsThis section assumes you have installeddtControlso 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. You candownload dtControl examplesand extract them into./dtcontrol/examplesor run the following from the terminal:$ cd ./dtcontrol
$ git clone https://gitlab.lrz.de/i7/dtcontrol-examples.git examplesFurther, you may either manually unzip the specific case study you would like to run or use the following command to unzip all case studies at once:$ find . -name "*.zip" | while read filename; do unzip -o -d "`dirname "$filename"`" "$filename"; done;However, be warned that this would use up about 13GB of space.Web-Based Graphical User InterfaceIn order to set up the web-based graphical user interface on a local machine, simply run the following command:$ dtcontrol-frontendIf run successfully, this command should start the web interface ofdtcontrol, which is now easily accessible via your favorite browser athttp://127.0.0.1:5000.Command Line InterfaceTo execute a single algorithm on a single model via the command line, run a command like:$ dtcontrol --input ./dtcontrol/examples/cartpole.scs --use-preset maxfreq --timeout 30mIf run successfully, this should create abenchmark.htmlfile displaying the results of the current run. It should also create adecision_treesfolder containing the output (DOT and C files) decision trees.We have pre-defined a few preset methods, which can be listed using:$ dtcontrol preset --listRundtcontrol preset--sampleor see themanualfor details on how to pick and mix your own presets.Other commands can be found by running:$ dtcontrol --helpReading the outputTo get an overview of the results, the filebenchmark.htmlis created in the directory from which you call dtControl.  You can open it in any browser.