In a competitive situation, IM Global Television has optioned Katie Williams’ (Space Between Trees, Absent) soon-to-be-published science fiction drama The Happiness Machine to develop as a TV series. Cake screenwriter Patrick Tobin will pen the adaptation.

The story is set in a world where a technology has been created that can determine, with nearly perfect accuracy, what someone needs to do to be happy. The device, called Apricity, reads a person’s DNA and gives them a “contentment plan” with recommendations that range from the mundane (“sing out loud”) to the severe (“leave your spouse”) and the bizarre (“amputate your right index finger”). Williams’ book explores how the lives of a number of characters are affected by this new science in their search for contentment.

The Happiness Machine will be published by Riverhead Books, a division of Penguin Random House.

“Katie Williams’ book is a quietly intense and emotional page-turner which explores, with even-handed aplomb, the complexities of our search for contentment and our twisted relationship with the technologies that serve us and that we serve,” said IM Global Television President Mark Stern. “In Patrick Tobin, we’ve found the perfect writer to adapt this provocative material for television.”

Tobin is repped by ICM Partners, Industry Entertainment, Lichter Grossman Nichols Adler & Feldman. Williams is repped by ICM Partners and Douglas Stewart at Sterling Lord Literistic.

IM Global Television is a joint venture between indie studio IM Global, China’s Tencent and Tang Media Partners.