I was inspired to write the Global Warning trilogy one hot day on Koh Phi Phi in Thailand, early 2015. Walking with my husband amongst forest hugging the coast, I looked down at a sea that, from a distance, appeared turquoise. Up close, near the busy pier, you could see the diesel and oil from the boats staining the water.

My first trip to Thailand. A long holiday that took us from the exciting, noisy streets of Bangkok, to the history of Kanchanaburi and the bridge of River Kwai; to the ancient ruined temples of Ayutthaya, and then South to the paradisiac islands.

Only, Phi Phi – the first island we visited, and the inspiration for Alex Garland’s The Beach – was no longer such a paradise.

Drinks cans, plastic cups and polystyrene tubs littered the fine-sand beaches, despite the locals’ best efforts to clean up the tourist’s mess. The sea had become murky with pollution, and the air noisy with the thump of beach bars. Further out, the forests still reigned, a lush green over rocky crags. I wondered how long it would be until this wilderness too, would succumb to the hotels fast springing up.

We talked about the pollution as we walked through the forest. We talked about climate change and then the weather disasters that seem, these days, to come thick and fast as new hotels and housing estates. In many places on Phi Phi, there are references to the great tsunami that hit in 2004, killing hundreds and making many more homeless.

We spoke of the latest news; Stephen Hawking’s warnings about artificial intelligence superseding our own, potentially spelling future disaster. It seemed like the herald of another Hollywood movie about machines taking over the world. But Stephen Hawking gave credence to it.

“I wonder what will win the race to wiping us out?” I said. “The artificial intelligence we’ve created, or the climate change we’ve caused?… That would make a great novel!”

If only I had the expertise to write such a novel. And if only the idea hadn’t already been done (as I was later to discover). Several times, in fact.

But (I hope) my approach is a little different from the Hollywood movies. It combines a more realistic, code-driven artificial intelligence with the advancement of weather warning systems, and the consequences when that system fails. A thriller driven by the intricate web of cause and effect, corruption, and an ill-fated morality that leads to downfall.

Two years and a great deal of research on, the first book in the trilogy, Breaking Point, was finished.