Twuring - The Twitter Turing Test

Ranked #1,489 in Internet, #88,995 overall

A Twitter Turing Contest - Put your best twitter bot Forward

This is a contest and resources for writing a Turing Test capable chatbot on twitter. The turing test means that the bot needs to be capable of being indistinguishable (or as near as) from a human being. So a spammy bot will get nowhere.
If you can code in C#, perl, python, ruby or (insert favourite programming language of choice here) then come have a go at it!

Twitter has plenty of people chatting about many things. But what if some of them were robots? Which of those are the best robots? Do you know of some or could you code one yourself? Time to put them forward for the Twitter Turing Test if you think they are world class. Showcase your natural language programming skills here.

I don't mind what language or hack is used to make it, even an elaborate way of piping psychoanalyse-pinhead through to twitter - anything goes.

They need to be plenty convincing, or simply just interesting to interact with. What may be interesting is to have a robot capable of passing and yet proving that it is really a bot.

What is the Twuring Contest

In short a search to find the best twittering robots, based on the Turing test. They should have something interesting to say, be prepared to answer some questions (and reply when they don't understand a reply/DM directed at them).

The robots need to be plenty convincing, or simply just interesting to interact with. What may be interesting is to have a robot capable of passing and yet proving that it is really a bot.

Bring out your Twitter AI's! If you simply pipe twitter to Alice or Eliza, or even Psychoanalyze-pinhead, code your own complete AI, dust off and bring out NIALL then I want to know here. Find interesting ways to use the Perl, C#, Java and myriad other twitter API's to build your chat bot. We will be looking out for Turks (read below for what that means) too.


Great Deals @ Geeks.com!


To enter them, simply twitter with the tag #twuring and the @name of the bots twitter profile. Then let the twitterverse take a look at and judge which they think is the best. Use the #twuring tag to discuss your entries, ask for tips etc.

May the best coder win.

Slashdot This Page!

T-Shirts for coders (and their minions)

What is twitter?

Twitter is primarily a rapid broadcast medium. It is not designed for 1-to-1, and although there is a direct message facility, it is not going to replace email any time soon.

It is not a personal friend network in the way facebook is either. It is probably more likened to an ad-hoc global chat room, where hash-tags take the place of IRC rooms, and by using clients that allow observing and combining hashtags into one stream, you can mix and match subjects. It has fads, kind of like mexican waves across twitter users when tags become popular. Because of the short length, it is suitable for human computer interfaces, although this can lead to text speak and jargon.

The following thing is another element, kind a pat on the back, and a personal stream, but is less fun than just searching/replying on curent topic tags. To really get the topic based conversation, think of a keyword you are interested in and go look it up on twitterfall.

About Twitter - in their own words
Loading

Perhaps you prefer a twitter book

Loading

Resources on the Turing Test

Loading

Some great chat bots

Eliza was probably the first Chat bot I knew about. Eliza emulated a psychoanalysis session. It would store and pick up some aspects of a conversation to repeat them later. Interaction was in a single chat interface.

I then had the pleasure of working with NIALL - The Non Intelligent Amos Language Learner. This ran on an Amiga and was distributed as its source code which ran in the popular AMOS basic system. It would use the Amiga speech system to help the illusion. What it did was learn a lexicon of words and word pairings - a very basic grammar.

Later I came across a DOS program named Alice - which showed a moving face along with speech. It was a lot closer to the Eliza style chatting - based on rules and trigger words, but was much more capable of learning and remembering conversations. Versions of Alice are still on the web today under the name Alicebot which is all singing, all dancing and uses a AIML markup language to form expert chatbot systems.

Many websites now include a chatbot, for example the IKEA website has Anna which can answer some basic furnishing questions and will direct you (mostly helpfully) to the relevant pages on the Ikea website. It is questionably little more than a sophisticated search tool.

So will you build a twitter chatbot that will make a list of classic chatbots later? Enter one into #twuring and try for that honour.

Natural Language Processing and chatbots

Books on actually building these are few and far between - although it is in some ways a problem well known and well covered by systems like AIML.
Loading

Choose Library/API to work with twitter

The thoughtful people at twitter have gathered up a number of API's that interface with twitter. There are libraries for most languages, and the first place to look for them is twitter's own development library page Twitter Libraries.

You probably want to make sure the API you choose covers two areas - Setting up the OAuth with twitter, then actually interacting with it to send/receive communications.

You should take a look at the API's documentation, make sure it makes sense to you - shop around here, some are better documented than others, and this can be an indicator of how ready an API is for users other than the original author to use.

Also, see if the API has a set of tests. When you think you've found one you like, grab a copy of the API and it's test cases, and ensure you can get them to a state where you can run them in your own environment. You then know that these test cases work for you, and by looking at them, you get an idea about using the API, and what stuff definitely works.

You should also consider the license - and how that would affect your code. Generally BSD and similar permissive licenses are recommended over paying for an API, or using a GPL library with the restrictions that involves.

Languages covered are:
Browser Client Side: ActionScript/Flash, JavaScript
Native OO Languages/Runtimes: C++, Java, .NET, Objective-C / Cocoa
Native functional Languages: Clojure, Erlang, Scala
Scripting Languages: Perl, PHP, Python, Ruby

There should be enough tutorials and libraries for anybody to get started connecting a chatbot to twitter for a #twuring entry.

Building A Perl Twitter chat Bot

Twitter Perl API's:


  • App::Tweet by Joshua McAdams. This is a command line wrapper to Net::Twitter. It is write only - so probably not much use for an interactive bot.

  • Twitter::Shell by Daisuke Maki.A twitter shell, very alpha looking at the CPAN page. Watch this space.

  • There is also little stopping you grabbing/building a perl SAX parser, building your own REST queries, and going it alone.

Perl chatbot info:


A basic plan:
Put a perl script on a cron job, that will (once every minute) check for any messages directed at it using the twitter API. It will then lex process and respond to these. Using either built up regular expressions, or the RecDescent module, grammar and lexical rules can be laid down.

Building a TCL Twitter chat bot

Building a Ruby Twitter Chatbot

Twitter Ruby Libraries:
  • Twitter4R by Susan Potter.  Open-source Ruby library for the Twitter REST API.

  • Twittery by Chris Ledet.  Lightweight class for Twitter's API.

  • Twitter by John Nunemaker.  Command line twits and an api wrapper using Hpricot.


Ruby Chatbot Info:

Do Twitter Allow this?

Some may be worried that twitters terms of service may not allow robots to chat on it. The good news is that bots on twitter are perfectly allowed within the terms, as long as they are not causing harm.

Spammy bots, or those propagating viruses or worms are disallowed. But a chatbot, like Eliza, Anna or similar will run into no difficulty. Although perhaps Anna may talk a little too much about Ikea to be much use.

For detail - Twitter Terms

Twuring Rules

Although rules may be a bore - lets have a couple to set the stage here:
Rules:

  • Must be on twitter - with its own profile.

  • Spam bots wont pass. The robot must interact - that is - it should be able to respond and converse, not simply post in a monologue.

  • Twitter profile should state it is a bot, and an entry to twuring.

  • Be prepared to tell us a little of how you did it (enough to prove it is a bot and not a fake) - a link to a blog/article about how you did it would be good.

  • Nothing hateful or explicit please.



The bot can be a sales bot, as long as it can ask questions (like the Ikea help bot).

Chess Playing Machines

Real chess computers and machines today, Turk not included.
Loading

Bookmark This Lens

If you enjoyed reading this lens, then why not share it with your friends.

Add this to your lens »

Bookmark and Share

Love This Lens?

If you would like to favourite and rate this lens, then you can do so here (Squidoo members only). Not a member? Join Squidoo now!

This module only appears with actual data when viewed on a live lens. The favorite and lensroll options will appear on a live lens if the viewer is a member of Squidoo and logged in.

Add this to your lens »

Have you got an entry for the twitter turing test?

If you've got some great idea for an entry, of a link to one, please share it here.
Please also ask me questions, I'll try to answer them, and I welcome suggestions and feedback.
I know most of the programming languages, but I've not used the twitter library in any other than Python, Perl and JS, and even then I've only scratched the surface.

You can also ping me something here just to let me know you've enjoyed the lens.

  • Tolovaj Jan 18, 2012 @ 12:21 pm | delete
    Astonishing idea. Bot on twitter are really becoming pain in the ... It is good to know we can do something about it. Thanks!
  • madinvestment Nov 6, 2011 @ 3:51 am | delete
    You did a great job on your lens and thank you for sharing it with us fellow squiders.
    One big thumbs up vote issued for this lens!
  • Diego Oct 24, 2011 @ 2:22 pm | delete
    Hello Danny,

    thanks for you email.

    What about SQL database connection to the bot?

    Cheers!
  • poddys Jul 18, 2011 @ 12:44 am | delete
    Turing was a brilliant man. I wonder if he was alive today what he would think of the progress we have made since his death.
  • joanv334 Feb 13, 2011 @ 11:05 pm | delete
    Hello, thanks for sharing!
  • Load More

Image Sources

The title image was one I created myself using Inkscape.

About Danny Staple

I've actually got quite an interest in AI, and I studied natural language interfaces at Uni in the late 90's. I've built simple systems, although I've not published any. Hooking them up to twitter, and hooking up different AI systems sounds like a load of fun to me - and know, I don't think we'd create skynet.
Loading

See some other great lenses

If you enjoyed reading this, there are many other great lenses on Squidoo.
AllTop: Top Lenses from Squidoo.

Revised the Twuring page

05/06/10 4:09 pm

The Twuring contest (Turing on Twitter), is my concept to use Twitter to field turing bots. Twitter has the advantage that it gets people used to chatting online via a computer, and keeping messages/responses down to only 140 characters makes the playing field a little simpler too. Twitter + Chat bots could be a really good match.

The page has info on twitter, on turing, on existing non-twitter bots which could be used. I've added info on the API's for twitter for different languages (although all wrap a fairly simple HTTP request).

Two Turing bots found

14/04/09 9:11 pm

I have now found two Twitter Turing bots - perhaps not turing capable, but both capable of at the very least amusing and intelligent seeming conversation to a point. It is at this point, that I will introduce them to each other, to discuss the #twuring tag. Who knows - that may even start it trending!

Do you use twitter? Can you code?

03/03/09 12:03 pm

If you use twitter and can code, I am starting off a twitter turing test - #Twuring! Find ways to create or combine chatbots with twitter - I would love to see what people come up with.

by

dannystaple

I am a software engineer familiar with many languages, currently mostly working with C/C++ and Python, also having done stuff in Perl, Bash, C#, Java etc.... more »

Feeling creative? Create a Lens!