Computers are being trained to solve problems by "binge-watching" episodes of popular US crime drama CSI.

Artificially intelligent machines at Edinburgh University have been taught to identify the perpetrator in the hit show.

The computers use information from images, audio, transcribed dialogue and descriptions of scenes.

They were able to correctly identify the criminal during the final part of an episode 60% of the time, compared to 85% for people who watched the same episodes.

The study also wanted to find out how artificially intelligent machines could help solve problems humans find difficult.

Five series of the show were used, with the machines trying to solve the crimes in the same way a human would.

The computers considered which characters would be responsible based on their behaviour as the plot developed.

Dr Lea Frermann, from the university's School of Informatics, said: "Pinpointing the perpetrator in a TV show is a very difficult task for computers, but our model performed encouragingly well.

"We hope our findings will aid the development of machines that can take on board - and make sense of - large streams of information in real time."

The study, published in Transactions of the Association for Computational Linguistics, was funded by the European Research Council and H2020.

The CBS series Crime Scene Investigation, or CSI, began in 2000 and ran for 15 seasons.