Autonomous TORCS driver

2016

Autonomous TORCS driver

2016

TORCS (the open race car simulator) has a server-side patch allowing driver AI to be programmed into clients that control drivers in a simulated race. The server provides clients mainly with 32 track distance sensors, 19 opponent sensors, track middle offset, engine RPM, gear, and XYZ velocity.

The below video shows the server-side view of TORCS with a fixed camera on the main driver, and the client-side implementation debug renderer of the sensor inputs and outputs. The algorithm calculates the furthest sensor after being filtered, and then steers towards it using a PID (proportional-integral-derivative) controller.

The 32 combined sensor inputs are represented as white lines, with the green line being the calculated steering direction. The running graph shows the outputs, with the steering in blue (-1 to 1), acceleration in purple (0 to 1), and braking in yellow (0 to 1). The race shown is a test for opponent avoidance running 4 of the same driver algorithm.

The implementation also includes a custom client connector to allow for multiple drivers to connect on different threads, seen here.


Runs on a patched version of TORCS 1.3.4 (patch included in the Win32 download), running a race of 4 scr_server drivers.

Requires Visual C++ redistributable 2015.

State sync network prototype

2016

State sync network prototype

2016

A MVC (model-view-controller) asynchronous network framework for TCP state synchronization. The base server and client are programmed with SDL network. The below video shows an example implementation of the framework for draughts with an SDL renderer, running locally.

The draughts implementation is quite bare, but included is an additional speed testing implementation to show response times.


Requires Visual C++ redistributable 2013.

Filtering by tag: Networking( Reset Filter )