gtav-racebot
README.md

GTA V Autonomous Racing Bot

Behavioral cloning AI for autonomous racing in GTA V. Different models to come.

Project Structure

gtav-racebot/
├── src/              # C++ source code
├── include/          # Header files
├── dependencies/     # ScriptHookV + ONNX Runtime
├── build/            # Visual Studio project files
├── bin/              # Build outputs
├── scripts/          # Deployment utilities
└── docs/             # Documentation

Setup Dependencies

ScriptHookV:

  1. Download SDK from dev-c.com
  2. Extract to dependencies/scripthookv/
  3. Ensure structure:
   dependencies/scripthookv/
   ├── inc/
   │   ├── natives.h
   │   ├── types.h
   │   └── ...
   └── lib/
       └── ScriptHookV.lib

ONNX Runtime:

  1. Download onnxruntime-win-x64-1.16.3.zip
  2. Extract to dependencies/onnxruntime/
  3. Ensure structure:
   dependencies/onnxruntime/
   ├── include/
   │   └── onnxruntime_cxx_api.h
   └── lib/
       ├── onnxruntime.lib
       └── onnxruntime.dll

Afterwards, must set up configs in the settings in the .vcxproj file!

Build

  1. Open build/TEMPLATE.sln in Visual Studio
  2. Build → Rebuild Solution (Release, x64)
  3. From the build folder, copy and paste the .asi file to GTAV.exe.

Usage

  1. Launch GTA V (Story Mode)
  2. Get in the vehicle
  3. Press F10 for AI mode

Features

  • Real-time inference with ONNX Runtime
  • 7-ray LiDAR sensor simulation
  • In-game data logging
  • Debug visualization

Tech Stack

  • C++ (Visual Studio 2022)
  • ScriptHookV
  • ONNX Runtime 1.16.3
  • Python (Keras/TensorFlow for training)