Computers and smart devices are not known for their joke-telling abilities. And yet, as Tony Veale explains in Your Wit Is My Command, machines are not inherently unfunny; they are just programmed that way. By examining the mechanisms of humour and jokes--how humour actually works--Veale shows that computers can be built with a sense of humour, capable not only of producing a joke but also of appreciating one. Along the way, he explores the humour-generating capacities of fictional robots ranging from B-9 in Lost in Space to TARS in Interstellar, maps out possible scenarios for developing witty robots, and investigates such aspects of humour as puns, sarcasm, and offensiveness. In order for robots to be funny, Veale explains, we need to analyse humour computationally. Using artificial intelligence (AI), Veale shows that joke generation is a knowledge-based process--a sense of humour is blend of wit and wisdom. He notes that existing technologies can detect sarcasm in conversation, and explains how some jokes can be pre-scripted while others are generated algorithmically--all while making AI accessible and mathematics understandable for the general reader. Of course, there's no single algorithm or technology that we can plug in to make our virtual assistants or GPS voice navigation funny, but Veale provides a computational roadmap for how we might get there.