N-grams and Markov chains

As N-grams and Markov chains are commonly known in the field of linguistics,  I was looking to find new uses..

As ASCI art is made with characters, I thought it would be interesting to try and use ASCI art and apply some Markov chains rules on it and see if the results make any graphic sense. The program takes 2 preloaded ascii art drawing (credit: Christopher A. Johnson) and mashes them together to generate a new drawing from character-based “n-gram” probabilities from the source texts. Each drawing is weighted according to the slider.

The results have some characteristics of ASCI art but may need more work for the refining of the output. For example at what point a next line (enter key) is used, need to be a part of the calculation (in the program they are hard coded).

Random

Random placement in Processing

Im interested in uses of these methods in non traditional fields. As a next step applying these rules to create a mathematical random and make something I call a “Markov noise” referencing the known Perlin noise (invented by Ken Perlin).

Leave a Comment

Required fields are marked *.