MB-01/Implementation

From ThorxWiki
Jump to: navigation, search

At the moment, Moby is a first-order MarkovChaining bot.

After some consideration, I *don't* need an SQL backend for a Markov bot. I don't even need a DBM backend. I can make do with a text-file of tab-separated values. 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:

select NextWord from Markov where PrevWord='';

Then I get a list of words, pick one a random (say, "jordanb:"), and then run:

select NextWord from Markov where PrevWord='jordanb:';

Lather, rinse, repeat.

For a markov based on a particular person, something like the following:

select NextWord from Markov where PrevWord='' and Author='Screwtape';

I stop, of course, when NextWord is empty.

Personal tools
Namespaces

Variants
Actions
Navigation
meta navigation
More thorx
Tools