Except that's not artificial intelligence. It's exactly like punching numbers into one of those old-fashioned calculators with gears and a motor in it, and then pressing the 'calculate' button.
"The researchers wrote code...." Exactly. Where's the AI part?
AI would be: the computer, on its own, reads the net, discovers that humans like humor, discovers the 'I like my x like I like my y' meme, discovers Google n-grams on its own, and (all of this without being told what to do) starts cranking out 'humor' and checking for applause.
Read about Clever Hans again. Soon.