I created a Markov chain generator: https://gist.github.com/grant/561834963dc526495c45 var numNodes=10;var roundNum=100;var a=[];for(var i=0;i roundNum)/roundNum;connections[j]=randNum;sum+=randNum}connections=connections.map(function(e){var t=e (1/sum);t=Math.round(t roundNum)/roundNum;return t});sum=connections.reduce(function(e,t){return e+t});connections[numNodes-1]+=1-sum;connections[numNodes-1]=Math.round(conne…
Show HN: Markov chains explained visually
61–70 of 96 posts
Re: Show HN: Markov chains explained visually
#62I've seen Markov chains applied to language generation - producing sentences that make sense grammatically but not literally. Anyone know what the connection is here? I think I have an idea but would like to see if it gets independently verified by someone else.
Markov chains work well for artificial language and name generations. One of my first programs in 1979, when I was a 13yr old kid, was to sum up the occurrence of characters following other characters in text files, and to roll dice on this table to generate names for role playing games. I later learned that I reinvented Markov this way. I still have those printouts, and use them when ever I need a name for a role pl…
Re: Show HN: Markov chains explained visually
#63Thank you! I understood what Markov Chains are now. Nicely done and in a simple understandable fashion. I am also trying to understand what they call Hidden Markov Model (specifically, I just cannot wrap my head around how it gets used in speech. They just look like entirely different things). Would be awesome to see an update with the Hidden MM.
As a simple model, say S1 leads to a rising C, S2 leads to a falling F, S3 leads to a stable Bb.
In a more complex model, this sound box is actually plays two or three sounds all at once. As a further complexity, many output sounds overlap between states.
If you're a scientist observing just the sounds being made then you're talking about an HMM (because the markov model is "hidden" behind the sound box). We model speech this way by assuming (sort of) that speech is composed of phonemes (each state) which might sort of overlap in their actual sound.
So a scientist using an HMM tries to reverse the process—listen to the sounds and figure out the phonemes that generated it by knowing something about how people make transitions between phonemes in, say, English words.
Re: Show HN: Markov chains explained visually
#64Has anyone thought about or attempted to model game AI with Markov Chains instead of decision trees? Ex: NPCs, wildlife or enemies that use Markov Chains to react to their surroundings.
Re: Show HN: Markov chains explained visually
#65Beautiful. What did you use to create the graphics?
Re: Show HN: Markov chains explained visually
#66This is really great, but could you put in a bit how some transition matrices aren't markov (e.g. [0 1; 1 0]) and the convergence criterion where you can take M^n n->infinity and get the occupancy of the states?
Why isn't your example Markov?
This is an example of a Markov chain that is not aperiodic; what that means is that, given a starting node, at any point in time in the future, it will always be the case that it is impossible to be at a certain node. This ends up meaning that the Markov chain never ends up reaching a steady state; rather, its behavior is periodic!
Re: Show HN: Markov chains explained visually
#67Re: Show HN: Markov chains explained visually
#68Re: Show HN: Markov chains explained visually
#69Nice Here's a model of chutes and ladder using Markov http://www.datagenetics.com/blog/november12011/index.html And another for Candyland http://www.datagenetics.com/blog/december12011/index.html
Re: Show HN: Markov chains explained visually
#70Has anyone thought about or attempted to model game AI with Markov Chains instead of decision trees? Ex: NPCs, wildlife or enemies that use Markov Chains to react to their surroundings.
Also, props to submission author Victor Powell. Those force-directed graphs are visually interesting, add to the article, and are even responsive (try changing the window size).