# linesight turns Trackmania into a reinforcement learning testbed

> Linesight is a Python reinforcement learning project where an agent drives Trackmania Nations Forever through a programmable interface. The interesting engineering sits in the interface layer and the training pipeline, while the public documentation stays thin on how to reproduce the headline driving results.

**Linesight-RL/linesight** — AI Plays Trackmania with Reinforcement Learning

- Repository: https://github.com/Linesight-RL/linesight
- Website: https://linesight-rl.github.io/linesight/build/html/
- Stars: 744 · Forks: 70
- Language: Python
- License: not declared
- Published: 2026-10-21 · Updated: 2026-10-21 · Language: en
- Canonical page: https://hysenlabs.com/projects/linesight-rl-linesight

## A deep game with discrete inputs makes a usable RL benchmark

Linesight exists to push reinforcement learning as far as it can go in one specific game, Trackmania. The choice of game is the point of the project rather than a side detail. Trackmania trades some realism for a wide variety of track types built around tricks such as wall riding, stunt jumps and wallbangs, and it was designed for equality of input devices, which means a keyboard is a viable way to play.

That equality of inputs is what makes the game interesting for learning agents. Because the human input path is a keyboard, the action space can be discrete, so discrete-input algorithms such as DQN can be applied directly. The project describes Trackmania as a deep game that can serve as a benchmark for any RL algorithm, with deep meaning that a competent solution needs long-horizon planning rather than one-step reflexes.

For the reader evaluating this, the practical consequence is that linesight is an applied research project, not a general-purpose RL library. What you get is a working pipeline aimed at a racing game, and the surrounding infrastructure that makes the game drivable by software.

## The Trackmania Interface layer is the piece other projects can reuse

The most transferable part of the codebase is the Trackmania Interface. The project credits its own work together with efforts from donadigo and Kim of the Trackmania Interface team, and states that the combination allows interfacing to Trackmania Nations Forever: sending inputs programmatically, reading car states and taking screenshots.

That interface is what sits between a policy and the game. The README notes that this part of the codebase could be useful to other RL projects, which is a fairly direct invitation to borrow the layer rather than the racing agent built on top of it.

The distinction matters when you judge scope. A reinforcement learning system for driving needs three layers: the environment bridge that speaks to the game, the observation and action encoding, and the learning algorithm plus training loop. Linesight supplies all three for Trackmania. If your interest is the first layer, or a game-agnostic observation pipeline, then this repository is a starting point rather than a finished answer, and the interface is the part to read first.

## Repository layout separates the agent, the tracks and the configurations

The top-level listing shows a project organised for experimentation rather than a single pip-installable demo. The main Python package is trackmania_rl, and there is a sibling package named config_files, which suggests that experiment configurations are versioned as code alongside the training code rather than passed as loose command line flags.

Around those sit directories that cover the whole loop: maps for track definitions, save for checkpoints, scripts for entry points, tensorboard for logging, and docs for the documentation build. Configuration lives in config_files, so a run is typically reproduced by pointing the training entry point at a specific configuration module.

Tooling is split between two worlds. There is a pixi.toml at the root, which is the manifest format of the pixi package manager, alongside conventional pip requirements files named requirements_pip.txt and requirements_conda.txt. Having both conda and pip requirement files in one repository is normal for reinforcement learning work, where some dependencies such as CUDA-enabled builds of PyTorch are easier to obtain from conda channels than from PyPI, but it does mean there is more than one way to build the environment and a higher chance of the two drifting apart.

## setup.py pins Python to 3.10 and 3.11

The package definition in setup.py is short and explicit about its constraints:

```python
setup(
    name='linesight',
    description='Trackmania AI with reinforcement learning.',
    license='MIT',
```

The supported interpreter range is narrow:

```python
    python_requires='>=3.10.0,<3.12.0',
```

So a fresh environment needs Python 3.10 or 3.11, and the classifiers list both 3.10 and 3.11 explicitly. Anything newer is outside the declared range, which usually still installs but leaves you outside what the author tested.

The package only ships two package names:

```python
    packages=find_packages(include=["trackmania_rl", "config_files"]),
```

That matters for installation. The training code and the configurations are importable, but the scripts, maps and checkpoints directories are not part of the installed package, so an install from a wheel gives you the library rather than a ready-to-run experiment. Working from a source checkout is the intended path, which is normal for a research repository but worth knowing before you plan around a pip install.

## Dependencies come from a pip file and a conda file at once

The install requirement list is assembled from both requirement files at build time:

```python
    install_requires=read_requirements('requirements_pip.txt') + read_requirements('requirements_conda.txt'),
```

This is worth understanding before you build the environment. Every dependency in requirements_conda.txt is installed through pip, even if it originated from a conda channel. Packages that are only distributed as conda builds, or that need a conda solver to resolve, can fail under pip, and the failure message tends to point at pip rather than at the packaging decision.

There is a documentation extra as well, which pulls in the Sphinx toolchain:

```python
    extras_require={
        "doc": ["sphinx", "sphinx_rtd_theme", "sphinxcontrib.youtube"],
    },
```

The presence of sphinxcontrib.youtube reflects the documentation's heavy use of embedded videos, and the sphinx_rtd_theme explains the Read the Docs appearance of the published documentation. The public documentation site is hosted at the project homepage, https://linesight-rl.github.io/linesight/build/html/, and the repository also carries a docs directory, so the docs can be built locally if you need the current version rather than the published one.

## The headline results are dated milestones, not a reproducible table

The README makes strong claims about the driving quality but presents them as a timeline of milestones rather than as measurements. According to the project, Linesight was the first AI to demonstrate human-level driving around May 2023, with Wirtual playing against it in June. In May 2024 it was the first to beat world records on official campaign tracks. The authors state that to their knowledge it is by far the most advanced AI in Trackmania.

Two things are worth separating here. The milestone timeline is dated and attributable, with linked videos, which is the strongest form of evidence available for driving quality in a game like this. What is not provided is a benchmark: no success rate on held-out tracks, no comparison against another agent, no return curve. The project positions itself as a benchmark for RL algorithms, and it is honest to note that the public documentation does not include the numbers a newcomer would need to reproduce or compare those claims.

The release history is similarly uneven. The only tagged release listed is v3.0.0, published on 2024-06-23, while the last push to the repository was on 2026-09-30. The repository is not archived, so work continues, but the release tag is more than two years behind the commits, which means version pinning to v3.0.0 gives you an older system than the source tree.

## A permissive licence declared in code, with no licence file at the root

There is a licensing wrinkle here. The package metadata in setup.py declares the project MIT:

```python
    license='MIT',
```

However, the repository's top-level listing does not include a LICENSE file, and the licence recorded for the repository itself is unknown. A licence declared inside packaging metadata is not the same artefact as a licence file with a copyright line, and downstream tools that look for a LICENSE file will not find one. If you intend to reuse the interface layer in a product, ask the maintainers for the licence text or confirm the status in the community channel linked from the README before shipping. This is a licensing fact rather than legal advice, and it is a reasonable thing to sort out early given that the interface layer is the piece most likely to be borrowed.

The open-source invitation is explicit, and the project asks for help to make it stronger. The community links in the README point to a Discord server, which is where questions about the interface and the training setup are most likely to be answered.

## Where linesight is the wrong tool

Three cases stand out. First, any task outside driving. Linesight is built around a racing game with a discrete keyboard-like action space, so continuous-control work, robotics or anything that needs continuous action dimensions will not fit the current design.

Second, work that needs a packaged, supported library. The installed distribution contains only trackmania_rl and config_files, the dependency install is unusual, and there is no compatibility matrix or support statement. If you want to depend on a priority queue or a data structure the way you would depend on heapify, this repository is the wrong shape.

Third, research that requires reproducing the published driving results from documentation alone. The documented history consists of release tags and dates, not of a training recipe with hyperparameters, seeds and evaluation protocol. You would be reimplementing from the source tree and the published docs, with the Discord as a fallback for details.

There is also a hardware question the README does not answer. Training an agent to drive at world-record pace on stunt-heavy tracks is not a laptop activity, and the documentation gives no hardware guidance here.

## Conclusion

linesight suits researchers who want a deep, discrete-action game with an open interface layer, and who are willing to install Trackmania Nations Forever and work from the source tree rather than a stable release. It is a poor fit for general reinforcement learning work, for continuous control, or for anyone who needs a reproducible recipe from the published documentation alone. Before committing, read the docs site at the project homepage and check which release your copy corresponds to, since the newest tagged release is v3.0.0 from 2024-06-23 while commits continued to 2026-09-30.

## FAQ

### What is linesight and what game does it play?

Linesight is a reinforcement learning project that seeks to push what AI can do in Trackmania. It drives Trackmania Nations Forever through a programmable interface that sends inputs and reads car states.

### How do I install the linesight Python package?

The repository ships a setup.py that declares the package name linesight, requires Python between 3.10 and 3.11, and installs the trackmania_rl and config_files packages. Its dependencies are read from requirements_pip.txt and requirements_conda.txt and are installed together through pip.

### Can I reuse the Trackmania interface part of linesight for another RL project?

The project says the interface code, built with the Trackmania Interface team, could be useful to other RL projects, and it allows sending inputs programmatically, reading car states and taking screenshots in Trackmania Nations Forever.

### Which version of linesight should I use, and how active is it?

The only listed release is v3.0.0 from 2024-06-23, and the repository is not archived, with the last push on 2026-09-30. The release tag therefore lags behind the source tree, so work from a checkout if you want the latest code.

## Sources

- [Issues](https://github.com/Linesight-RL/linesight/issues)
- [Linesight-RL/linesight on GitHub](https://github.com/Linesight-RL/linesight)
- [Project website](https://linesight-rl.github.io/linesight/build/html/)
- [README](https://github.com/Linesight-RL/linesight/blob/main/README.md)
- [Releases](https://github.com/Linesight-RL/linesight/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/linesight-rl-linesight
