# Calculate the best route for racing games

I'm trying to structure a system for rating player's performance in my arcade-style racing game. So I'm thinking about calculating the best route possible, and trying to guide the player towards the best way of driving. Is there any work into such problem? Links to papers/implementations would be awesome.

## 1 Answer

I think the easiest way is to split track in sections and measure the time in each section as performance indicator. (That they do in real racing events)

As stated here what you're asking is not an "exact science".

A very hard way may be developing some sort of genetic algoritm or neural network , develop an AI that try to run the track minimizing the time, like here.

• I highly doubt ANNs or genetic algorithms are suited for this task, could you point to some references where are similar problems solved? Aug 25, 2015 at 16:20
• @wondra follow the links in YouTube video (last link of my answer) Aug 25, 2015 at 16:57
• You were right, I would find a paper or tutorial more helpful resource than video without much explanation though. For example, one paper can be here Still, I would probably start with math - something like spline fitting or simulated annealing(not sure if any could be actually used, just examples where I d start search). Aug 25, 2015 at 17:35
• A genetic algorithm would be quite suitable, however, you have to run this over several hours perhaps, and store the best path with your level, in some sense. You cannot use GA in real-time to find the best path, it would most likely be way too computationally intensive. Oct 24, 2015 at 14:59