Data Gatherer for Reinforcement Learning

A plugin by Palamabron

Data Gatherer for Reinforcement Learning
Downloads 637
Updated 22 days ago
Released 3 years ago
Numeric ID 421
Min. Openplanet 1.26.0

This plugin was developed using generative AI.

School
Game Trackmania
This plugin is signed for School Mode. That means it will only work when using the School signature mode, in which you will not be able to play online or set official leaderboard times.
More information

This plugin starts a local TCP socket server on 127.0.0.1:9000 and continuously streams Trackmania vehicle/race telemetry as a fixed-size float buffer (33 floats per packet), used in https://github.com/Palamabron/AITrackmania - my own modified fork of tmrl.

What the plugin sends

Data is serialized in this order:

Race stats (4)

  • checkpoints passed
  • current lap number
  • race finished flag (UISequence == Finish, encoded as 1.0/0.0)
  • current race time

3D transform/state (12)

  • position (x, y, z)
  • velocity (x, y, z)
  • forward direction vector (x, y, z) (vis.Dir)
  • up vector (x, y, z) (vis.Up)

Engine/drivetrain (3)

  • speed
  • engine RPM
  • current gear

Wheels & surface (8)

  • slip coefficient: FL, FR, RL, RR
  • ground contact material id: FL, FR, RL, RR (encoded as float)

RL-specific helpers (3)

  • wheels skidding count
  • flying duration
  • adherence coefficient

Inputs (3)

  • steer input
  • gas pedal input
  • braking flag (1.0/0.0)

Notes

  • The server waits for one client connection and streams data every game tick.
  • If connection is lost, it closes the socket and restarts listening on port 9000.
  • Boolean and integer values are encoded as floats for a uniform payload format.

Changelog

2.3.0 - 22 days ago

Added new api features sent through socket to improve RL models training, including 3D physics and surface interaction data.

2.2.0 - 2 years ago

Changed speed for relative value.

2.1.1 - 3 years ago

Changing inputs for better model training.

View all changelogs