Skip to content
  • Live lab
  • Internship
  • Synthetic data

2024 · Simulation · Road safety · Internship · Sri Ramachandra, Mar–May 2024

AI-Based Driver Behaviour Simulation

Modelling how drivers respond when the road stops behaving predictably. An Unreal Engine 5 internship prototype, rebuilt as a 2-D top-view simulation: pick a start and a destination on the map and an AI driver follows the road rules there.

  • Blender
  • Unreal Engine 5
  • Python
  • scikit-learn
  • TypeScript
  • Simulation

Headline

Place to place

Navigation on a map, with driver profiles

Synthetic data

01 · Problem

Problem

The problem

Driver training needs vehicles, instructors and controlled road sessions, which is costly and exposes trainees and other road users to risk. Simulation can repeat the same situation safely. The deeper modelling question was how a simulation can represent realistic human decision-making instead of assuming every driver follows the optimal rule.

Research question

What action is a driver likely to take, given the environment, their risk tolerance and their reaction time, rather than what is the safest possible action?

02 · Approach

Approach

System design

Scenario world → simulated sensors (with noise and a reaction delay) → feature extraction → decision tree (scikit-learn, trained in Python, run in the browser) → rule and safety layer → control (acceleration, braking, steering) → vehicle movement → logged metrics. Driver profiles change risk tolerance, reaction time, target speed and following distance.

Method

The original slides describe three stages: object detection, decision-making and interaction implementation. The 2024 prototype was built by modelling a road, junction and traffic light in Blender, exporting to Unreal Engine 5, setting up a traffic-light Blueprint (red, green, yellow with delays), collecting 12,758 pictures and integrating an AI-driven car. The recreation expands the same idea into simulated sensors, feature extraction, risk estimation, a decision tree, a rule-based safety layer and vehicle control, driving a route planned between two places on a map.

Key concept

Realistic is not the same as optimal

Human drivers vary in reaction time, risk tolerance, speed preference and following distance. The simulation treats those as parameters to model and then shows what they do to outcomes at a yellow light, a sudden obstacle or a braking vehicle.

ORIGINALREFERENCE

The original project, 2024

An internship project at Sri Ramachandra built with Blender, Unreal Engine 5 and machine-learning libraries. A road, junction and traffic light were modelled in Blender, exported as FBX, set up in Unreal, and an AI-driven car was added. The slides describe the method as object detection, then decision-making, then interaction. The original project files are no longer available, so everything below is the footage and slides that remain.

Original project recording. Screen capture of the Blender → Unreal Engine 5 simulation, about 4 minutes, recompressed to 720p without sound for the web. It shows the speed and gear read-out of the Unreal build, which is not the interface below.

Original development workflow

  1. 1Create environment
  2. 2Export to FBX
  3. 3Import into Unreal
  4. 4Set up environment
  5. 5Collect data sets
  6. 6Integrate driver
  7. 7Testing

Original AI-car architecture

  1. CarControl
  2. InputSensor data
  3. ProcessingDecision-making
  4. Control system
  5. ActuatorsCar movement and interaction with the environment

Original methodology

Object detection Decision-making Interaction implementation

Screenshots from the original presentation

  • Blender: road layout and traffic light
    Blender: road layout and traffic light · Slide 7 · Fig 1 and 2
  • Blender: the car model
    Blender: the car model · Slide 8 · Fig 3
  • Unreal Engine 5: traffic light, its Blueprint and the RED → GREEN → YELLOW cycle
    Unreal Engine 5: traffic light, its Blueprint and the RED → GREEN → YELLOW cycle · Slide 9 · Fig 7 and 8
  • Unreal Engine 5: the environment and game mode
    Unreal Engine 5: the environment and game mode · Slide 10 · Fig 6 and 7
  • Data collection: 12,758 pictures gathered
    Data collection: 12,758 pictures gathered · Slide 14 · Fig 13
  • Code screenshots: data collection and model training
    Code screenshots: data collection and model training · Slide 13 · Fig 11 and 12
  • The AI car, its Blueprint and the AI-car architecture
    The AI car, its Blueprint and the AI-car architecture · Slide 15

The 12,758 pictures were collected for the original object-detection work. They are not the data behind the recreated model below, which is trained on synthetic scenarios.

Live lab

Try it

What you're looking at

A 2-D top-view recreation of the 2024 Unreal Engine prototype. Pick a start and a destination and an AI driver follows the road rules; seven test scenarios and three driver profiles show how reaction time and risk tolerance change the outcome. Its decision tree was trained on synthetic scenarios.

Loading the simulation…

03 · Results

Results

Original: the slides conclude that the small prototype detected obstacles and made decisions, supporting the feasibility of AI-driven driver-training simulation. Recreation: a 2-D top-view map where you choose a start and a destination, plus seven controlled test scenarios, run with three driver profiles or your own settings, with a live decision panel, event log and metrics, a profile comparison and a failure matrix computed in your browser from seeded runs. Numbers come from running it, not from this text.

04 · Limitations

Limitations

What it does not show

The original Blender and Unreal source files are not available, so the recreation is new and simplified, not a port. The map and the place names are a provisional layout traced from a slide until the real map is supplied. The model is a decision tree trained on synthetic scenarios labelled by an authored braking policy, with no real driving data, so its accuracy measures imitation of that policy. Sign and hazard detection are simulated from scenario data and are not computer vision. Driver-profile parameters are illustrative.

Lessons

Modelling realistic rather than optimal behaviour meant deliberately encoding reaction delay and risk tolerance instead of treating deviation from the rules as pure error, and keeping that variation bounded so it stays tied to the situation. A learned model also needs a rule layer around it and an honest account of what it was trained on.

Responsible AI

This prototype is for research, demonstration and simulation. It is not an autonomous-driving safety system and must not be used to control a real vehicle. Near misses and contacts are shown as data to analyse, not as a game.

ORIGINALRECREATED

Original and recreation, side by side

ComponentOriginal, 2024Recreation on this page
EnvironmentModelled in BlenderFlat 2-D top view drawn in the browser (canvas)
Simulation engineUnreal Engine 5TypeScript simulation loop
Vehicle3D car assetSimple drawn car
Traffic lightsUnreal Blueprint: RED → GREEN → YELLOW with delaysA state machine with configurable durations
AIObject detection and decision-making; model details are not in the surviving filesDecision tree trained in Python on synthetic scenarios, plus rule-based safety layer
Data12,758 collected picturesSynthetic scenario states and new simulation logs
PresentationUnreal game view with speed and gearInteractive page with a decision panel and metrics
SourceNot availableNewly written for this portfolio

Original is what was built in 2024. Recreated is new work, written for this site. Reference is the footage and slides above, which show what the original looked like. The recreation is never presented as the original Unreal Engine project.

Behaviour, not just control

Which action is a driver likely to take?

Rather than only asking for the safest possible action, the simulation asks what a driver with a given risk tolerance and reaction time is likely to do in this situation. That makes human inconsistency a variable to model, not just an error to remove.

Safety statement

This prototype is for research, demonstration and simulation. It is not an autonomous-driving safety system and must not be used to control a real vehicle. Near misses and contacts in the recreation are shown as data to analyse, not as a game.

Future scope

The original slides name more realism, more advanced AI and industry collaboration. For the recreation:

  • Computer vision

    Detect real signs, vehicles and pedestrians from rendered frames instead of reading them from scenario data.

  • Behaviour cloning

    Learn driving actions from recorded human driving rather than from an authored policy.

  • Reinforcement learning

    Train an agent under an explicit reward and safety constraints.

  • Multi-agent traffic

    More than one vehicle, human-like and automated.

  • More realistic physics

    Steering dynamics, tyre limits and collision physics.

  • Explainability

    Show why the model chose BRAKE rather than MAINTAIN, for example by comparing the two decision paths.

All work