code: function MarkovChainStateEngine(converter, entities) {
    MarkovChainStateEngine.super_.call(this, converter);
  
    this.converter = converter;
    this.initializedForTransition = false;
    this.transitionCountTotals = {};
    this.transitions = {};
    this.transitionDefinitions = {};
  
    // Add whatever entities we've been provided.
    var self = this;
    if (entities) {
      entities.forEach(function(element) {
        self.addDefiningEntity(element);
      });
    }
  }
docs: ----------------------------------------------------------- Class Definition ----------------------------------------------------------- 
  @class
  A Markov chain implementation, inheriting from the StateEngine class.
  
  Transition to a new state depends only on the current state; the new state
  is picked at random from a weighted list. That list and the probability of
  any given transition (e.g. A->C versus A->B) is established by providing a
  set of example transition sequences.
  
  This is useful for exercises such as creating random names that look similar
  to a set of existing names, or creating nonsense texts that look somewhat
  similar to existing texts. In general a Markov chain approach can only
  produce good raw material, however, and the output will need further work to
  be useful.
  
  @param {Converter} converter
  A Converter instance, used to convert between entity and State
  representations of input and output to the state engine.
  @param {array} entities
  An initial set of entities used to determine the rules for state
  transitions. More can be added later if desired.