Vote For Me

In this post, I use Ruby in an attempt to describe that most slippery and elusive of beasts, the politician! After being subjected to a painfully large quantity of the wonderfully vacuous musings of various politicians running for office, I began to see their algorithm. My hope is that by distilling down the process of being a political figure, I can automate it for all of those struggling future leaders out there!

Also, I’m kind of a proponent of code-as-art to a degree… so let’s make a statement!

So first, I’ll outline some of the common behaviors I’ve identified:

Talking Points

First things first, allow your puppeteers to provide you with a few talking points. These will be the only items of quasi-measurable substance you’ll have, so keep them in mind at all times!

Universal Talking Points

These are always present, regardless of the composition of your puppeteer team.

  • Accentuate that you have a family and they are of the utmost importance to you.
  • Main St. > Wall St.
  • You’ll focus on giving the people a voice.

Example of Specific Talking Points

Here are some examples of the puppeteer-specific talking points you may be assigned:

  • Jobs!
  • Accountability!
  • Change!

Interview Behavior

During an interview, you have free reign of the floor. While an interviewer will be there asking questions of you, feel free to completely disregard the question and instead interpret it as an invitation to bust out a monologue. Let’s codify these behaviors:

  • When asked any question, begin your response by repeating the question.
  • When asked a question directly related to talking points, regurgitate the talking points.
  • When asked a question about your competition, disparage them indirectly.
  • When asked a question about a past public misstep, either:
    • Flatly refuse to respond.
    • ‘As I’ve already said’
    • Marginalize the issue
  • When asked a question not matching the above, sidestep into a lengthy monologue about:
    • Your commitment to the people of wherever
    • Your commitment to transparency
    • The need to break the status quo
    • Middle America and your humble upbringing

Debate Behavior

Debates can be a bit more irritating than interviews, as you won’t have unrestricted license to rehash your talking points! Instead, you’re actually expected to demonstrate some level of interactivity. Ludicrous. To deal with this, there is some branching involved in your behavior.

  • If you field the question first:
    1. Repeat the question! This is always a great way to burn time.
    2. If even tangentially related to a talking point, use the talking point.
    3. If unrelated to any talking points, deflect with, “Really the issue is…” - go to talking point.
  • If fielding the question following another contender:
    1. Repeat the question.
    2. ”${Mr Mrs X} thinks ${ rehash their response }, but really the issue is” - go to talking point.

Media Ambush

Oh no! The media has caught you someplace and you weren’t prepared for an interview! Never fear, this is easily dealt with using the following simple behavior:

  • Stall for time!
  • Mention how excited you are about absolutely anything.
  • Mention that your campaign is optimistic that the people of whatever will make the right decision.
  • Mention your family, and make a speedy escape.

Yep.

With these simple rules above, we’ve defined some basic behaviors that should get us a pretty functional political robot. While this may seem like it could be an intense natural language parsing problem, it really isn’t! Most of the speech will be a repackaging of the inputs followed by a canned response. The robot’s job isn’t to listen, but to repeat the talking points ad infinitum.

I’ll be packaging this behavior up as a helpful Ruby module on github, feel free to follow along here