Below is a visualization of a markov chain algorithm written in JavaScript. The markov chain has two main steps: 1) finding all of the unique nodes and all of their corresponding possible next nodes, and 2) creating an output based on the next nodes and their probability of occurring. You can see the markov algorithm in action, below. The algorithm is generating text based on source text from East of Eden by John Steinbeck.