Generating Text with Markov Chains
healeycodes.com
healeycodes.com
For example, once a simple Markov bot learns the input phrase "had had" it will also start to generate output phrases a human would assign 0% probability to like "had had had" and "had had had had". This in itself isn't a violation of the principles behind the model (it would have to look at more words to distinguish these).
The question is whether more complicated loops among related words can create "thickets" where the output generation can get "tangled up" and generate improbable output at a slightly higher rate than the formal analysis says a Markov model of that order should do for given input frequencies. An example of such a thicket would be something like, "have to have had had to have had".
Essentially, I'm hypothesizing that the percentage values of the weighted probabilities of transitions does not tell the whole story, because the high-level structure of the graph has an add-on effect. A weaker hypothesis is that the state-space of Markov models contains such pathological examples, but that these states are not reachable by normal learning.
Unfortunately I lacked the mathematical chops / expertise to formalize these ideas myself, nor do I personally know anyone who could help me explore these ideas.
That said, your specific example reminded me of a specific joke sentence: https://en.m.wikipedia.org/wiki/James_while_John_had_had_had...
Regarding observation of the phenomenon, in a way I first observed the inverse of it. My first proofs of concept didn't learn probabilities, only structure. (One might say all edges had the same probability.) Yet aesthetically they performed just as well as versions which included probability in the algorithm.
Incidentally, this is very similar to the original pagerank algorithm. The rank roughly corresponds to the probability you will be on any given page if you randomly follow links.
There are countless markov chain chat bots made though and plenty bend the rules, to some extent though they are all susceptible to this. In an old irc chat of mine we had a lot of fun abusing one such bot to get it stuck in these kinds of loops, in our case it was the word 'fuck'. You'll have to forgive our teenager sense of humor.
Someone created a fixed version on github at
If you want to see more of what they can do, and you have had any exposure to Chomsky, you might also appreciate https://rubberducky.org/cgi-bin/chomsky.pl.
“Someone’s been sitting my porridge,” said the bedroom.
You can download it here: https://successfulsoftware.net/2019/04/02/bloviate/
It still causes a spike of traffic every now and then from Twitter.
> Suora lähetys virkaanastujaisista – ainakin kaksi tonnia kokaiinia
Looks kinda like you followed a tutorial and did a write up.
Still, didn't seem very novel or deep. Might as well have been someone posting their first timing circuit test, water/air tunnel simulation, or computer vision project. So, good for them. But I thought HN wasn't a glad handing cheerleader chorus.
Searching for Introduction to Markov Chains gets tons of hits at various levels of explanation that are nearly a decade old.
So I'm trying to fill that gap and help out anyone who is trying to learn the basics.
IMHO they probably should if they're this basic.