MB-01

From ThorxWiki
(Difference between revisions)
Jump to: navigation, search
m
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.
   
 
See also:
 
See also:
Line 17: Line 17:
 
* [[/Competitors]]
 
* [[/Competitors]]
   
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".
+
* [[/Brainstorms]]
 
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>
 

Revision as of 00:43, 29 April 2002

MB-01 (or Moby for short) is a cool IRCbot by Screwtape.

  1. Take a botbase like dagny
  2. Add a Markov Chaining engine like this
  3. 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.

See also:

Personal tools
Namespaces

Variants
Actions
Navigation
meta navigation
More thorx
Tools