You may have heard of Omegle, an online chat in which you are presented with a random stranger to talk to ‐ "random" meaning the stranger is "Stranger" and you are "You"; no nick customization is allowed.
The concept is similar to another random chat website, Chatroulette, but with the added benefit of not being forced to chat with a webcam.

MegaHAL, on the other hand, is a computer program simulating human-like conversations. It's basically an AI program that can be trained on a set of conversations and which can then answer questions with that background knowledge.

What's exciting about its internal workings (unlike ELIZA, to cite a famous and successful counterexample) is that MegaHAL is not programmed to answer "Hi" or "Hello" whenever you greet him.
It may be trained with a number of conversations in which the phrase following a greeting is "I love jelly"; in that case it'll answer with a similar phrase after most of your greetings.

This happens because its AI engine is based on two 4th-order Markov models, with their symbols being actually typed words. The models output a prediction based on a probability distribution over all the known symbols, to select the most likely words after some other words: given a question they build a coherent and grammatically correct answer, if not meaningful.

The idea

What I've done is to connect an omegle frontend with MegaHAL, to have the AI learn other people's chat messages and answer them accordingly. To give the other chatter a false impression of "humanity", some criteria have to be met:

  • MegaHAL shouldn't start talking.
    Even if thoroughly trained I found that the starting output was completely out of context and made strangers disconnect almost immediately.
  • Don't answer immediately.
    This is basic. To mimic a classic chat I set up a random thinking timer and a typing timer (based on the answer's length, during which the stranger sees the classic "Stranger is typing" message)
  • Strangers cannot be trusted.
    Raw training from people posting URLs, phone numbers or addresses of real life is not acceptable.

Further developments shown that it's better to discard short chats (stranger disconnects with less than three answers), to manually feed MegaHAL chats found on the internet for speed-learning and, obviously, that sometimes you'll wish to censor some answers. Don't - it's funnier this way, and swearings tend to be rarely used.

Results (funny chats)

I've collected some of the funnier conversation, they're listed below:

Download

I'm afraid I won't share the code for this interface. Omegle is not a place for bots, it's for humans only and should be kept so. My short-lived adventure gave me some good conversations and probably made other people laugh, but it's now over.