Blog

Markov Chain

Markov Chains

Sean Booth via an interview on Resident Advisor:

[…] but it might at least resemble the way a person thinks. It’s funny, I’ve been reading about Markov models and Markov chains recently, the results from Markov Chains are remarkably similar to what you get out of Watson or DeepMind, these super advanced language modelling things. And this article was about how unwieldy that kind of mega-gigantic, expensive AI is, because you can actually achieve very close results using Markov chains, and they’re really fucking simple, they’re computationally really easy to deal with, they’re what people use for Twitterbots and things like that. So in some ways these simple conditional responses can resemble very high-end AI. Even though it’s very simple, the result is close enough not to matter.

I built a simple Markov chain patch that I wanted to share. I’m going to extend this into delay units and sequencers.

I’m pretty happy with everything except the implementation of if $i1 > $i2 then true else out2 true forcing a delay to convert a true into a bang. I settled for this because if seemed to output to both outlets if I used the integer 1. And as far as I understand it, if cannot output bangs. There’s probably a more elegant way to break the signal besides using 4 gates, too.

My favorite part of the patch is the use of sliders to intuitively control the probability. If both are set to zero, the bang will ping-pong back and forth between each chain. If set to 127, the bang will forever loop in on that side of the chain.

----------begin_max5_patcher----------
1797.3oc2bszaiaCD9ryuBAidz0fOEo5gBTft2KPOVrXgrMii1UVxPRNMoK1
+6UjRJ9kD0rQzxw1GbBon8LebF9wYFxju+vjoKReQkO06279GuIS99CSlX5R
2wj51SltI7kkwg4lgMMQ8uoK95zYUOpP8Rgo63zvUKBSV27fjcahRhUElODd
emo6JNs2nUlugxu0ek42742FVr7onj0eISsrnR+jAr4nYd974R5AuD3Ydbo9
IDxbj2mq+BpDTwqaUUe5oFsy6y5m9iGdP+1rgA4LuLUtpnUDi.iXrEDiY9Zb
wDF3wn8Cx2G.2nxyCWqNCgQIKaEcDvniXCcH9AniDLmeYPWoVtPk0nHOllTj
Dtw7UN8OxhBi2qhYk8Wnx9hJIbQr5D6XetyjVfOseiKGaLq7JiK8.3q0z7n+
ynGlA00rxrg3bWZiWoV5n4f1bAX86BTOGPPl2Y1bAdrjno38gzE6JJRStfHk
CvYmJavXeH8iIeE0FHI9A217UTa6+PHx6b9Jprei68NeEMneWf6D9JD.m8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