It was built by Bradley Hayes, a postdoc from MIT's Computer Science and Artificial Intelligence Lab, who borrowed an algorithm from a technique in the field of artificial intelligence called deep learning. The technique gives a computer the ability to find patterns and essentially learn the way a human brain does.
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
"Trump's language tends to be more simplistic, so I figured that, as a modeling problem, he would be the most manageable candidate to study," Hayes told Adam Conner-Simons.
Here are a couple more tweets from @DeepDrumpf, which incidentally was named after Trump's ancestors, as pointed out by John Oliver.