tactics2d
is an open-source Python library that provides diverse and challenging traffic scenarios for the development and evaluation of reinforcement learning-based decision-making models in autonomous driving. tactics2d
stands out with the following key features:
For further information on tactics2d
, please refer to our comprehensive documentation, and a detailed comparison with other similar libraries is available here.
We have a Discord Community for support. Feel free to ask questions. Posting in Github Issues and PRs are also welcome.
We have conducted testing for the execution and construction of tactics2d
on the following platforms:
System | 3.8 | 3.9 | 3.10 | 3.11 |
---|---|---|---|---|
Ubuntu 18.04 | :white_check_mark: | - | - | - |
Ubuntu 20.04 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
Ubuntu 22.04 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
Windows | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
MacOS | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
We strongly recommend using conda
to manage the Python environment. If you don't have conda
installed, you can download it from here.
# create a new conda environment
conda create -n tactics2d python=3.9
You can simply install tactics2d
from PyPI with the following command.
pip install tactics2d
You can also install tactics2d
from from its source on GitHub. This way is recommended if you want to run the sample code or contribute to the development of tactics2d
. Please note that you should have GCC installed on your operating system before installing tactics2d.
# clone the repository with submodules but ignore the large files (mainly the NuPlan's map data)
# please download NuPlan's map data from its official website and put it in the `tactics2d/data/map/NuPlan` directory
git clone --recurse-submodules git@github.com:WoodOxen/tactics2d.git
cd tactics2d
pip install -v .
If no errors occurs, you should have installed tactics2d
successfully.
According to the licenses of the trajectory datasets, we cannot distribute the original datasets with tactics2d
. You need to download the datasets from their official websites. Currently, tactics2d
supports the following datasets:
You can put the downloaded files at whatever location you like. In the parser, you can specify the path to the dataset.
tactics2d
supports the parsing of various real-world trajectory datasets, including Argoverse, Dragon Lake Parking (DLP), INTERACTION, LevelX Series (highD, inD, rounD, ExiD), NuPlan, and Waymo Open Motion Dataset (WOMD). For more demos, please refer to the documentation.
InD | Argoverse |
---|---|
![]() |
![]() |
INTERACTION | WOMD |
---|---|
![]() |
![]() |
RounD | INTERACTION |
---|---|
![]() |
![]() |
DLP | Self-generated | |
---|---|---|
![]() |
![]() |
If you find tactics2d
useful, please cite this in your publication.
@article{li2023tactics2d,
title={Tactics2D: A Reinforcement Learning Environment Library with Generative Scenarios for Driving Decision-making},
author={Li, Yueyuan and Zhang, Songan and Jiang, Mingyang and Chen, Xingyuan and Yang, Ming},
journal={arXiv preprint arXiv:2311.11058},
year={2023}
}