A Game of Pride and Prejudice - Using the Markov Chain Mixer

I built off the Markov Chain mixer example to mashup Pride and Prejudice with A Game of Thrones. What I found in my experimentation was that

  • (Cross reference origins are very confusing - I had to upload the modified code to Github in order to test it)
  • The runtime for the full texts took a very long time, which makes sense because the code has to generate n-grams for the entire text. So I mashed up the first chapters of each text instead.
  • Words that don't exist in either text along with the English dictionary were created. For example, I saw the word 'Michaelmaster' come up.
  • Even if I pushed in the direction of one text more than the other, sometimes I'd get a result that would lean more heavily to the other text simply because a random selected n-gram would extremely unique to that text and that would influence the results going forward (see my last screenshot)

Within the generate() function in sketch.js, the text is weighted based on the slider position, but what happens if we seed the random n-gram selection function? What if we could influence the choice() function call? Or does that defeat the purpose of a Markov chain?

More often then not I got a result that leaned more heavily towards A Game of Thrones as I played with the mixer, but I think that probability wise I had more variety in the n-grams generated by Game of Thrones than by Pride and Prejudice; in the first chapter of PnP for example we get a lot of instances of Bennet, but the first chapter of GoT is from Bran's point of view, so for n-grams containing ' B' you could either get Bran or Bennet. Initially I thought that the probability of selecting Bran was higher due to the text reading Bennet as Mr.Bennet instead of Mr. Bennet with a space (for example, there was also Mrs. Bennet); but I think that maybe the length of the text used for Game of Thrones is longer than what I used for Pride and Prejudice, allowing more instances of n-grams generated by the word 'Bran' to be pushed into the array.