Skip to content

Project · 2025

Rerailing Simulation

Finding the best trajectory to put a rail-road vehicle back on the rails.

  • Reinforcement Learning
  • A* and RRT trajectory algorithms
  • Python
  • Pygame

Team

4 people

Duration

2 months

Partner

SNCF

Summary

A dual-mode vehicle drives on both rails and roads, and the whole challenge is getting it onto the rails: finding the optimal trajectory to rerail it in a challenging environment. In collaboration with SNCF, our team of four, all in the AI track, built on two earlier projects: we coupled reinforcement learning with an A* trajectory algorithm and tested it in a Pygame simulation.

My role. I worked on the reinforcement learning algorithm.

Timeline

How it unfolded.

Earlier

First group

Reinforcement learning with a DQN algorithm and a Tkinter simulation. Limits: no modelling of the vehicle, and an alignment that was not perfect.

In pictures

A closer look.

The rerailing simulation with obstacles and terrain levelsClick to flip

Caption

The simulation, with obstacles and terrain levels

Click to flip back

Evolution of the rewards over the training episodesClick to flip

Caption

Rewards over the training episodes

Click to flip back

Tools

What I worked with.

Python

The language of the simulation and of the learning agent.

P

Pygame

To build the simulation, with obstacles and terrain levels.

R

Reinforcement learning

To learn the rerailing maneuver through trial and error.

A

A*

The trajectory algorithm coupled with the learning, chosen after comparing it with RRT.

Looking ahead

Why not generate the map randomly at the start of every new simulation?

Next project

Chassis Detection