Republicrats project (@Paris Popathon 2014)

Raphael, who recently joined Klynt as web developer, reports here on his experience making virtual robots! As always when you attend a Hackathon, you never know what you will get yourself into before you start. For this second Parisian Popathon, 5 of us @ Klynt team attented the 2-day event with one idea in mind: explore new territories.

This is a difficult task to explain how you come up with an idea. For this post, I tried to go step by step to explain our creative process of making “Republicrat Bot”, the project we came up with during this beautiful week end of March 2014.

 Mozilla Paris Office Stairway.

1) Gathering ideas

After all participants of the Popathon had written their ideas on about 30 different post-its and had pasted them on the board, the ideas were gathered in clusters to create potential projects.

One of the post-its islet was mainly summarized by 3 concepts: random, artificial intelligence and human interaction. These were really interesting and deep concepts that could give a lot of opportunities to start a new project.

2) Create a team

Since I was the author of one of the post-its, I was designated as the leader for the future project. While some people who showed interest in the project joined the group, the objective was to create a balanced team with various skills:

3) Find the project

We were all enthusiastic about the topic we had chosen together for this project. From there, the difficulty was to create a project that fit with the concepts we had chosen previously. We entered what we call the ideation phase.

To start it all, each of us gave his or her point of view on what the project could be. I won’t list all the ideas we had, but as we discussed we got closer to a new concept we agreed was a point of reference: the concept of serendipity or what we refer as “fortuitous happenstance” or “pleasant surprise”.

At the same time, we talked a lot about AI, and Philo came up with the idea of a bot. A bot is a software that executes tasks following a certain set of rules (mimicking human behaviour), the digital equivalent of a robot. Since twitter is an important source of real time content, we raised questions like “can a bot generate new content automatically, based on something existing like tweets?”, “can a bot behave like a real twitter user?”. After doing some research, we found out it was already the case, many twitter accounts are already managed by bots. So be careful the next time you reply to some tweets. You can see some examples of twitter bots below:

We had the media we wanted to use for our story (a twitter account), but we still needed a context. As we chatted together to find a subject, we started talking about French Municipal Elections (which took place during the weekend of the popathon). Politics was a good subject, and we could get content from the various french parties that constantly tweet. Why not mix all of these tweets to create a new one? And could this twitter be the representative of a new political party, at the crossroads of the existing ones?

We had the main idea, but the two main difficulties for this project with french political parties were:

- there is a big amount of political parties in France, which creates a complex political landscape that would be hard to understand outside of France

- who cares about French politics outside of France?

Philo mixing our ideas

Since we wanted our bot to be successful and get as many followers as possible, we had to ask ourselves: which democratic country in the world has its political scene followed outside of its own territory? And with great interest? Well the answer was easy and stands in two letters: the US (United States).

The other advantage in choosing the US politics was that the United States is a country with a bipartisanship system with two main parties: the Republicans and the Democrats Party, which really simplifies our prototype and makes it easier to understand.

But before implementing our project, we needed a code name for our bot. As purple is the mixed color obtained with red (republicans) and blue (democrats) we call it “purple bot”.

For when you need inspiration

4) The workflow

The main objective for the storytellers and designers of the groups was to create a character, a personality that would give the illusion of being a real politician. They had to set up a twitter account, find a name, create a description as well as a visual.

There was also the need to list all the hot topics that shake the US political landscape (healthcare, immigration, terrorism, etc.), in order to filter the various tweets we would get from the Republicans and Democrats parties.

On the technical side we had a precise workflow in order to implement the bot:

  • get the twitter accounts of US political figures
  • get the recent tweets from these accounts (filtered by keywords)
  • concatenate these tweets by party in text files
  • generate a new tweet based on existing tweets from Republicans and Democrats

To do so, Philo and I decided to work with Python language (in order to process data). We used also freebase (a large collaborative knowledge base, see http://www.freebase.com/) and its API to get the twitter accounts and Tython (python library) to retrieve the corresponding tweets. And finally, to mix the tweets, we created an algorithm based on Markov chain.

From left to right : Simon, me & Philo

5) Our presentation

After two days of work, we got a working prototype able to implement the workflow we had set up before with a total new identity. “Purple bot” became “Republicrats”, which is the mix of Republican and Democrats, and its visual became also the mix of the logos of the emblems of the two parties: the elephant of the Republican party and the donkey of the Democrat party.


Here are some examples of tweet from RepublicratsBot :

  • meeting with the dire consequences of #Russian military presence & activities on #immigration reform.”
  • job-creating wind energy tax incentives Read at Q & A about his most violent action movie to date.”
  • those who believe in the octagon, no holds barred, for the new show “Amazing America” by @VCURamNation.

RepublicratsBot is now working independantly, free from the influence of its creators, living and growing in the Twitter jungle. So we invite you to visit it and maybe follow him at https://twitter.com/RepublicratsBot. I already heard he may have some ideas for 2016 US elections.