Scientists have created a computer that can write and deliver its own jokes.
The program, called Standup, can even engage in some rudimentary banter.
Researchers started by getting the computer to generate childish puns by applying a straightforward formula from its dictionary.
It makes a new word by substituting similar sounds, like "spook-tacles" for "spectacles", finds a plausible description, then presents it as a two-line gag: What do near-sighted ghosts wear? Spooktacles.
However, over eight years the artificial intelligence system – which may eventually help disabled children with language skill – has become increasingly refined.
The fifth-generation of the program – whose acronym stands System To Augment Non-speaker's Dialogue Using Puns, - will be showcased at next week's Humour, Art and the Brain festival at Winchester.
Dr Kim Binsted, who created the system, told the Daily Telegraph that the computer is designed to converse with children. "The program will chat back at them but also integrate jokes into the language,” she said
“Because the program is working with the same kids week in week out, it can integrate things it learns about them into the humour. So if the kid says their brother is tall, the assistant can make a somewhat lame joke about 'I hear giraffes look up to him'."
"We started with simple puns because they don't require much knowledge."
The jokes are currently tested on eight to 11-year olds, but the software is becoming increasingly complex.
A sister program, Wiscraic, works on idioms rather than simple jokes to create lines like: "The performing lumberjack took a bough.”And the next generation aims to generate good old-fashioned insults like: "Yo mama's so fat, her ass has its own postcode."