Even the most ideological people can’t resist talking about their favorite movie on Netflix.

This wouldn’t produce results that were anywhere near as realistic as a human’s account, but it would hopefully help throw people off since it isn’t behavior you would typically expect from a conventional Twitter bot.

Kevin’s brain

The next step was to bring Kevin to life by writing the code that would drive him.

I made Kevin a liberal bot because I’m a liberal person; it was a persona that I could easily gut-check during development. His code, however, is extremely versatile. One word in his code is all that keeps Kevin from becoming one of President Trump’s biggest fans. Similarly, he could just as easily be a beer snob or a devoted football fan.

Regardless of his slant, Kevin’s reputation hinged on two factors: his content and behavior.

Content

To build a reputation, Kevin needed to become familiar to his network. Accomplishing this required him to engage with others’ content as well as produce original content for others to engage with. Finding content to share was easy; Kevin simply retweets or favorites popular material from his network. In this way Kevin is just like his nefarious Russian counterparts.

Original content production is more complicated. To simplify things, Kevin can only create two kinds of content: a basic tweets and commentary on popular links floating through his network.

Each time Kevin checks Twitter, he analyzes hundreds of tweets and builds a statistical model of what words are typically used together. For example: “President” is often followed by either “Donald” or “Trump”. Kevin then picks a random starting word and uses his model to determine the next word, repeating until he’s created a full tweet. This process, known as a Markov chain, is used to create all of Kevin’s original content.

Here is a more in-depth explainer on Markov chains that I found helpful when starting the project.

The approach works really well because it gives Kevin the ability to correctly and easily use slang, hashtags, and emoticons — all of which give him a much more human feel. As Twitter collectively responds to events, Kevin is able participate by inserting his own commentary into his network. His followers see this content and often share it.

Behavior

There never was any hope for Kevin if he behaved like a robot. Too much tweeting, tweeting on a rigid schedule, or tweeting at odd hours are all huge hints that a tireless computer is at the wheel rather than a human. To address this, I built Kevin a more natural schedule. He only checks Twitter at random intervals throughout the day and then randomly decide what (if any) action to take.

For added effect, Kevin also “sleeps” and “works”. His account is inactive each night while he sleeps, and activity slows during weekdays when he should be at work.

The man behind the curtain

Kevin is mostly autonomous, but I do still select who he follows and I reserve the right to step in and censor him.

Kevin only follows people to increase his exposure and attempt to get those people to follow him back. Right now, I select these accounts by occasionally sorting through various hashtags and keywords to find people who might be interested in him.

I also supervise Kevin incase he sends out content that is offensive or derogatory. Bots that live on, and learn from, the internet sometimes venture into the bad parts of the web where they pick up equally bad habits. One example of this was Tay, a bot built by Microsoft that started by replicating a 16 year old girl before becoming a Nazi sympathizer in less than 24 hours.

Kevin has an obscenity filter built in and I’ve taken steps to prevent him from following in Tay’s digital footsteps, but you can never be too careful. Other than one early tweet, that I deleted because Kevin had remarked that the Statue of Liberty was a symbol of hate, I have been able to stick to a “hands-off” policy.

Results

My experiment turned out far better than I could have hoped. Not only is Kevin functional, but he is also able to promote original and shared content well beyond his immediate network of followers.

Here’s a brief rundown by the numbers since August 4 (Kevin’s first full day online):

Followers: 80

Engagement Rate (all interactions / impressions): 1.2%

Impressions: 131,200

Link clicks: 290

Retweets: 377

Likes: 889

Disappointingly, it is almost impossible to get an answer for what “good” numbers look like on Twitter because engagement rates vary based on a lot of variables. And there is absolutely no data on what to expect for a bot attempting to pass as a human. The best information I could find seemed to indicate that personal Twitter accounts get an average of 1–2% engagement, which puts Kevin right where he should be.

For third-party validation I went to Botometer. Botometer is a project by Indiana University that scores accounts based on how likely they are to be a bot. When greater than 50% means an account is likely a bot, Kevin scored an impressive 37%. He’s got a long way to go, though — my personal account scored only 18%.