You can find and interact with @MarkovCocktail on Twitter.
He's a relatively simple bot that sends out tweets at prescribed times and responds to mentions. The results are...varied:
The journey of expendible labor— Markov Cocktail (@markovcocktail) August 10, 2016
Thy name that dances on the swift eagle dallying with a serpent...— Markov Cocktail (@markovcocktail) March 7, 2018
If you know the rest like a cord...— Markov Cocktail (@markovcocktail) March 1, 2018
Is Playing Peek-A-Boo!— Markov Cocktail (@markovcocktail) September 10, 2016
So how does he work? Where do these mind-blowingly dumb tweets come from? Let me tell you about Markov chains...
By definition Markov chains are, "a stochastic model describing a sequence of possible events in which the probability of each event depends only on the state attained in the previous event."
So they're probability models that can predict an arbitrary event based on past event states. So....layman's terms?
If I inputted this data set-
and then modeled a three letter Markov chain beginning with the letter A I would likely get:
simply based on the data, the next most likely letter after A is actually another A.
This can sometimes lead to to nonsensical word loops when it comes to @MarkovCocktail see:
A Nug Nug Nug Nug Nug Nug Nug Nug Nug Nug Nug Nug Nug Nug Nug Nug Nug Nug Nug Nug!— Markov Cocktail (@markovcocktail) September 10, 2016
Ok cool Mr. Wizard, but how do we get a derpy twitter bot from that...?
Why, everyone's favorite web library nodejs of course!
I setup my own simple twitter bot based off this fine piece of code github which uses the twit node package then I sprinkled in a little markov-magic with this makrovchain node library and voila- twitter bot that will tweet and reply with markov chains based off textual input you provide! Full code is available on github.
I intend to flesh this post out a little more in the future. I have a couple of changes planned for our friend @MarkovCocktail