Scientists at the University of Edinburgh thought they had a brilliant idea. Could they turn a computer into a witty comic?

They wrote a software program that mimics the most basic form of humor, the one-liner, reports the Telegraph's Richard Gray.

The software program taught the computer how to create one-liners by pairing a statement with a surprising follow-up comment.

They were hoping for a silicon Steven Wright with jokes like: "All those who believe in psychokinesis raise my hand.

Or even an old-school comic like Tommy Cooper: "She’s always smiling. She’s the only girl I know whose teeth are sunburned."

Instead they invented a sexist pig who spewed out jokes like this: "I like my women like I like my gas ... natural."

And this ...  "I like my men like I like my court … superior."

And this  ... "I like my women like I like my camera ... ready to flash."

One of the scientists, David Matthews, said volunteers laughed when they heard the PC's un-PC jokes, but not as much as they laughed at man-made jokes.  He concluded that in order to really develop a computer's sense of humor, the software would need to develop cultural awareness.

Steven Wright maybe has some advice for that: "Support bacteria - they're the only culture some people have."