The Learning and Experiencing Cycle Interface (LExCI) is a framework for reinforcement learning (RL) with embedded systems. It bridges the gap between established, traditional RL-libraries and embedded devices with their inherent limitations and unique requirements. In particular, it utilises Ray/RLlib for training agents and TensorFlow/TensorFlow Lite Micro to model their neural networks.
This section summarises LExCI's installation process. For a detailed guide, consult the documentation.
It is highly recommended to install LExCI in a virtual environment using
venv or
Anaconda/Miniconda.
That's because i) the setup script demands fixed versions of third-party
packages and ii) because ray
(one of LExCI's dependencies) is patched during
installation.
- Install Python 3.9.15 on your system.
- Create a folder for your virtual environment(s) in your home directory by
typing
mkdir ~/.venv
into a terminal or PowerShell. You can choose a different location if you so prefer. - Create the environment proper with
python3 -m venv ~/.venv/lexci2
. On Windows, you need to expand~
, i.e. replace it withC:\Users\YOUR_USER_NAME
. - Activate the virtual environment with
source ~/.venv/lexci2/bin/activate
on Linux or~/.venv/lexci2/Scripts/Activate.ps1
on Windows. For the latter, you may have to change the execution policy of the PowerShell (e.g. by typingSet-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
into the PowerShell).
Should you want to remove the virtual environment, simply delete
~/.venv/lexci2
.
- Open a terminal (on Linux) or Anaconda prompt (on Windows) and type
conda create --name lexci2 python=3.9.15
in order to create the environment. Runconda activate lexci2
to activate it. - Type
conda deactivate
to deactivate the environment andconda env remove --name lexci2
if you wish to delete it.
- Install required software packages by typing
apt install gcc gpp g++ gdb git
into a terminal. - Activate the virtual environment.
- Run
python3 -m pip install pip==22.0.4
and thenpython3.9 -m pip install setuptools==58.1.0 wheel==0.38.4
as newer versions of these packages may not be able to install LExCI's dependencies. - Download or clone this repository and
cd
to its location. Check out a version tag and do not use themain
branch! - Run
python3.9 -m pip install .
. - Type
python3.9 -m pip install matlabengine==VERSION
whereVERSION
is the latest package version for your MATLAB installation. All available versions are listed here. This step can be skipped if you don't plan to automate MATLAB/Simulink.
To uninstall LExCI, open a terminal, activate its virtual environment, and type
python3.9 -m pip uninstall lexci-2
.
LExCI cannot be fully installed on Windows as its Master
needs
Ray/RLlib which offers limited support for
the operating system. Nevertheless, a partial setup can be done in order to
facilitate writing Minions.
- Download Cygwin.
- Open a PowerShell or Anaconda Powershell Prompt and
cd
to Cygwin's download folder. - Type
setup-x86_64.exe --no-admin
in order to run the installer without administrator rights. Perform a standard installation and select the following additional packages from Devel (you may have to change View to Category):make
(>= 4.4.1-2
)mingw64-x86_64-binutils
(>= 2.43.1-1
)mingw64-x86_64-gcc-core
(>= 12.4.0-1
)mingw64-x86_64-gcc-g++
(>= 12.4.0-1
)
- Activate the virtual environment.
- Type
$Env:CYGWIN_PATH = "C:\path\to\cygwin64"
to store the path to Cygwin's installation directory in an environment variable. - Run
python -m pip install pip==22.0.4
and thenpython -m pip install setuptools==58.1.0 wheel==0.38.4
since newer versions of these packages may not be able to install LExCI's dependencies. - Download or clone this repository and
cd
to its location. Check out a version tag and do not use themain
branch! - Run
python -m pip install .
. - Type
python -m pip install matlabengine==VERSION
whereVERSION
is the latest package version for your MATLAB installation. All available versions are listed here. This step can be skipped if you don't plan to automate MATLAB/Simulink.
To uninstall LExCI, open a PowerShell or an Anaconda Powershell Prompt, activate
its virtual environment, and type python -m pip uninstall lexci-2
.
If you have any questions, feel free to ask them on the repository's Discussions page. Bugs, feature requests, and the like should be reported/posted as Issues.
Inquiries concerning (research) projects involving LExCI can be sent via e-mail to: [email protected]
If you use LExCI for your research, please cite our paper:
@article{Badalian2024,
author={Badalian, Kevin and Koch, Lucas and Brinkmann, Tobias and Picerno, Mario and Wegener, Marius and Lee, Sung-Yong and Andert, Jakob},
year={2024},
month={06},
day={26},
title={{LE}x{CI}: {A} framework for reinforcement learning with embedded systems},
journal={Applied Intelligence},
issn={1573-7497},
url={https://doi.org/10.1007/s10489-024-05573-0},
doi={10.1007/s10489-024-05573-0}
}
LExCI 2 is licenced under the Apache License 2.0.