IT is best known as the game that lets otherwise law-abiding citizens run over sex workers.

But now Grand Theft Auto – never, its players insist, quite as nasty as it sounds – could play a key role in making the world's roads safer,

Scientists in Germany are using the ultra-realistic Scottish-developed GTA to teach the driverless cars of the future how not to kill. Or rather the artificial intelligence software systems that will eventually steer vehicles around our streets are teaching themselves in the game's often uncanny virtual reality.

This machine-learning – when a computer programme teaches itself – has traditionally been done with painstakingly labelled images of the real world. But each image can take an hour to be annotated manually. That is still easier than crashing real cars driven by computers into walls.

Experts at Darmstadt University have have now taken 25,000 scenes from the game to different weather and lighting conditions to "train" the software. Annotating each image took just seven minutes. In a new paper, they said the models trained with game data and one third traditional real-life camera images, outperformed those which used real images. Rockstar North, the Edinburgh business behind GTA, failed to respond to requests for comment.