MB-01
(linkfix) |
|||
(4 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
− | MB-01 (or [[Moby]] for short) might one day be a cool IRCbot by [[Screwtape]]. |
+ | MB-01 (or [[Moby]] for short) is a cool IRCbot by [[Screwtape]]. |
# Take a botbase like [http://dagny.sourceforge.net/ dagny] |
# Take a botbase like [http://dagny.sourceforge.net/ dagny] |
||
Line 5: | Line 5: | ||
# Mix together thoroughly with Python magic.. and presto! |
# Mix together thoroughly with Python magic.. and presto! |
||
− | '''MB-01'''! |
+ | '''MB-01!''' |
I'm very impressed with dagny - it's largely the shell of an IRC bot, with the ability to plug in arbitary event handlers, that trigger then the bot gets a message that matches your specified regexp. |
I'm very impressed with dagny - it's largely the shell of an IRC bot, with the ability to plug in arbitary event handlers, that trigger then the bot gets a message that matches your specified regexp. |
||
Line 11: | Line 11: | ||
An infobot-style bot is a simple application of a regexp that matches "is" and "are" and whatever comes before and after them. |
An infobot-style bot is a simple application of a regexp that matches "is" and "are" and whatever comes before and after them. |
||
− | For the Markov chainer, I'd like to store each word along with the people who used it, and maybe the channel where it was used - so you can get an entirely random Markov chain, or a Markov chain that imitates the style of a particular person. |
+ | For the Markov chainer, I store each word along with the people who used it, so you can get an entirely random Markov chain, or a Markov chain that imitates the style of a particular person. It will also generate a chain guaranteed to contain a particular word, if a sentence including that word has been mentioned in the bot's presence. |
+ | |||
+ | ''(I forget why I decided Moby needed a word list, but just in case he ever does, there's always the coincidentally named Moby Word List: http://www.dcs.shef.ac.uk/research/ilash/Moby/ )'' |
||
See also: |
See also: |
||
− | * [[/Implementation]] |
+ | * [[MB-01/Implementation]] |
− | * [[/Competitors]] |
+ | * [[MB-01/Competitors]] |
− | + | * [[MB-01/Brainstorms]] |
|
− | After some consideration, I *don't* need an SQL backend for an infobot. I probably don't even need a DBM backend. I can make do with a text-file of comma-separated values, I bet. The only three columns I need are "previous word", "next word", and "author". |
||
− | |||
− | To find the first word of a chain from all #[[afda]] users, I'd do the equivalent of a statement like this: |
||
− | |||
− | <pre> |
||
− | select NextWord from Markov where PrevWord=''; |
||
− | </pre> |
||
− | |||
− | Then I get a list of words, pick one a random (say, "jordanb:"), and then run: |
||
− | |||
− | <pre> |
||
− | select NextWord from Markov where PrevWord='jordanb:'; |
||
− | </pre> |
||
− | |||
− | Lather, rinse, repeat. |
||
− | |||
− | For a markov based on a particular person, something like the following: |
||
− | |||
− | <pre> |
||
− | select NextWord from Markov where PrevWord='' and Author='Screwtape'; |
||
− | </pre> |
||
− | |||
− | <nowiki>I stop, of course, when NextWord is empty.</nowiki> |
Latest revision as of 01:41, 17 November 2007
MB-01 (or Moby for short) is a cool IRCbot by Screwtape.
- Take a botbase like dagny
- Add a Markov Chaining engine like this
- Mix together thoroughly with Python magic.. and presto!
MB-01!
I'm very impressed with dagny - it's largely the shell of an IRC bot, with the ability to plug in arbitary event handlers, that trigger then the bot gets a message that matches your specified regexp.
An infobot-style bot is a simple application of a regexp that matches "is" and "are" and whatever comes before and after them.
For the Markov chainer, I store each word along with the people who used it, so you can get an entirely random Markov chain, or a Markov chain that imitates the style of a particular person. It will also generate a chain guaranteed to contain a particular word, if a sentence including that word has been mentioned in the bot's presence.
(I forget why I decided Moby needed a word list, but just in case he ever does, there's always the coincidentally named Moby Word List: http://www.dcs.shef.ac.uk/research/ilash/Moby/ )
See also: