Inspiration

The more difficult college coursework becomes, the harder it is to find online resources for said coursework. Markov chains are an important concept in Stochastic processes and most online resources either lacked good visual processes, mathematical explanations, or further insights. We aimed to simulate Markov chains visually while also providing mathematical insight.

What it does

The user can input a transition probability matrix and look step by step at the process of a Markov chain. Further, the user can examine three questions regarding Markov chains. What the invariant or stationary distribution looks like, the expected amount of time it takes to travel from one state to another, and the probability that we visit some state A before another state B. We also wrote some examples for each of these questions so the user can understand the math behind Markov chains.

How we built it

We built the frontend using HTML, Javascript and CSS. Flask was our web framework of choice. We used Python to simulate the movement of the Markov Chain.

Challenges we ran into

  1. We ran into issues in attempting to dynamically draw nodes and dynamically change those nodes.
  2. We had trouble connecting the Python simulation to the visualization. ## Accomplishments that we're proud of
  3. We are proud that we were able to make a good UI and visualization for people to study Markov Chains with. ## What we learned
  4. We learned how to use the Flask web framework.
  5. We learned the vs.js to visualize nodes. ## What's next for Markov Chain Simulator We aim to introduce faster incrementing, and proper simulation for noninvariant matrices and user inputted matrices. The program can be expanded to include continuous-time Markov chains and notions of recurrence/transience, periodicity and non-numerical (variable) inputs.

Built With

Share this project:

Updates