Skip to content
/ markovian Public

The simplest way to create a markovian process using markov chains. ๐Ÿ”—

Notifications You must be signed in to change notification settings

zya/markovian

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

8 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

markovian

The simplest way to create a markovian process using markov chains.

Installation

npm i markovian

Usage

var markovian = require('markovian');

// create states
var zero = {
  value: 'zero', // value
  targets: [0, 1, 2], // target indices
  probabilities: [0.25, 0.25, 0.50] // target probabilities
};

var one = {
  value: 'one',
  targets: [0, 2],
  probabilities: [0.25, 0.75]
};

var two = {
  value: 'two',
  targets: [0, 1],
  probabilities: [0.80, 0.20]
};

// create the model
var states = [zero, one, two];
var model = markovian.create(states);

// start generating
setInterval(function(){
  var state = model.tick();
  console.log(state);
}, 500);

About

The simplest way to create a markovian process using markov chains. ๐Ÿ”—

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published