Hayes fed words into the algorithm taken from transcripts of Trump's debate performances as well as speeches he made after winning states in the primaries. The algorithm then learns the underlying structure of the phrases and then spits out its own Tweets based on that structure.
See The Dreams Of An Artificial Brain: Photos
For a refresher, let's look at a couple of sentences from the speech Trump made announcing his bid to run for president:
"There's been no crowd like this. And, I can tell, some of the candidates, they went in. They didn't know the air-conditioner didn't work. They sweated like dogs. They didn't know the room was too big, because they didn't have anybody there. How are they going to beat ISIS? I don't think it's gonna happen."
"We can't even go there. We have nothing. And every time we give Iraq equipment, the first time a bullet goes off in the air, they leave it."
Granted, there's a certain charm to Trump's syntax.
Artificial Intelligence: Hawking's Fears Stir Debate