By today's standards, Agatha Christie's books might come across as rather quaint and old-fashioned, but she can still teach modern-day writers a thing or two about plotting, suspense, and misdirection. Now a group of academics think they've unlocked the secrets of Christie's enduring mysteries, producing an algorithm that reliably guesses whodunnit in the stories of Miss Marple and Hercule Poirot.

The algorithm takes advantage of some of the patterns in Christie's writing that she probably wasn't consciously aware of at the time: negative sentiment in the language used to introduce female killers, for example, or a high chance of the killer being male if strangulation was the cause of death. Locations and even modes of transport can play a part in working out the villain of the piece, the researchers found.

The research was commissioned by the television channel Drama to mark what would have been Agatha Christie's 125th birthday on 15 September this year. The station is broadcasting a number of Christie murder mysteries to mark the occasion, and the results of the research might just help viewers figure out who's to blame for the crime.

"We gathered data including the number of culprit mentions per chapter, a 'sentiment analysis' of culprit mentions, transport mentions and several cross-references with other key concepts of the novels," Dominique Jeannerod, of Queen's University in Belfast, explained to The Guardian. "We were able to discover patterns emerging in several aspects of Christie's novels: trends formed when we grouped our data via year, detective, gender of culprit, motive, cause of death."

If the murder is committed in a country house - quite a common trope for a Christie novel - then there's a 75 percent chance that the killer is a woman, the academics found. Female murderers are usually found out by the discovery of a domestic item whereas male killers most often meet their comeuppance through logic and reasoning on the part of the detective assigned to crack the case. The relationships between the victim and the other characters in the novel also plays a part.

The study found that Christie usually left a key clue in her stories, usually around the halfway point, drawing attention to it so the reader would take note. The detective - Marple or Poirot - and the motive for the crime (usually love or money) can also indicate the identity of the culprit.

By combining all of these factors and tendencies together, the researchers were able to come up with an algorithm that accurately predicts who did the deed in question - though they only looked at 27 of the author's 83 published books, so there's no guarantee that it works every time. No doubt traditional murder mystery fans will still want to use the time-honoured methods of deduction and logic to try and guess whodunnit.