Skip to content

harperreed/partychat-markovchain-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Partychat markov chains bot

harper@nata2.org
http://nata2.org
@harper


Background

I love markov chain bots. They are one of the most hilarious things you can have in a chat room. After years of a very comedic bot in the skinnycorp TAD chat room (bless it’s now still heart) i became rather fond of having the nonsense and insanity that is a crazy bot.

This is based on the same idea as all the various markov chain bots that are floating around. In a nutshell it:

  • receives a message
  • adds received message to the markov chain
  • stores message in the training log so that the chain builds and builds
  • if it feels like it – responds with markov chain generated message
  • sits back and is awesome

Markov chains ALWAYS make things better.

The markov.py code is from the internet. I don’t know where it came from. It was part of a IRC bot that I built about 4 years ago. I think it may have some roots in a blog post about markov chains. If you know – please hit me up.

Markov Chain Information

You can find more info here:
Wikipedia: Markov Text Generators

Note: it is used by spammers. wouldn’t it be awesome to have a kid named like a spam email!

Plans

v.01 – barely works, but works it does. hah. Needs error handling and more functionality.

Prerequisites

  • requires tornado (tornadoweb.org)

Usage

Set up two webhooks for partychat at: http://partychat-hooks.appspot.com/

  • Post Hook with format: {{get_argument(“message”)}}
  • Receive Hook with the command set to * and the HTTP endpoint point at your markov_chat.py addr.

Edit the markov_chat.py file and set the correct posthook url

Execute the markov_chat.py script:

harper@:~/partychat-markovchain-bot$ python markov_chat.py
Loading chat.log into brain.
Brain Reloaded

By default the server listens on port 8888 on 0.0.0.0. So going to http://yourip:8888 should hit the server. You will see a markov generated sentance at that url.

Test it and see how it goes.

live example:

You can play with a public live bot by chatting up markovchains@partychapp.appspotchat.com (if the server stays up ;) )

Help make this amazing. seriously. It could be hilarious with your help.


this is awesome. i am awesome.

hit me up.
@harper
harper@nata2.org

About

A markov chain bot for @partychat

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages