Stem Sims banner

Stem Sims

12 devlogs
8h 35m 28s

A collaborative, open source collection of mathematical simulations, implemented across different programming languages.
Simulations include: a text prediction model trained on the novel Jane Eyre, Google Page Rank's algorithm, and a card shuffli…

A collaborative, open source collection of mathematical simulations, implemented across different programming languages.
Simulations include: a text prediction model trained on the novel Jane Eyre, Google Page Rank’s algorithm, and a card shuffling model

Demo Repository

Loading README...

Vulcan

I fixed the text-prediction running error since it didn’t seem to work on the executable page.

I also fixed the github action to fit this.

Attachment
0
Vulcan

After getting rejected twice because people couldn’t run the code easily enough I didn’t lose hope.

I added example functions in each python file, and created a main executable file (in the cli) that can be accessed and ran easily.

Attachment
0
Vulcan
  • I changed the README so that it includes instructions on how to run the code
  • I fixed a bug in card-shuffling python
  • I committed the Jane Eyre text so that text-prediction will work
Attachment
0
Vulcan

Shipped this project!

Hours: 7.54
Cookies: 🍪 109
Multiplier: 14.51 cookies/hr

I shipped v1.0.0 of Stem Sims: a collaborative, open source collection of mathematical simulations, implemented across different programming languages.

This was a very fun project for me, as I love integrating maths with programming, and I made really cool models like a text prediction model trained on the novel Jane Eyre, and a model of Google Page Rank.

Hopefully this release marks the start of collaborations on the repo, and this can grow further!

Vulcan
  • i made some changes in the python card shuffling code so it doesn’t repeat stuff
  • i wrote code for card shuffling in javascript
  • i wrote code for random walk in javascript
Attachment
Attachment
0
Vulcan

Ripple shuffle

  • I created an implementation of ripple shuffle, which uses binomial distribution to split the deck into approximately half, uses the number of cards in each half to shuffle the deck, and then uses the idea of markov chains to continue shuffling the deck multiple times
Attachment
0
Vulcan
  • i switched from a 3 words -> 3 words markov chain to a 3 -> 1 word markov chain
  • i somehow managed to decrease the run time from 5 minutes to 2 seconds
  • i split the code into subroutines so it is easier to read and understand
Attachment
0
Vulcan
  • i added the code for cleaning the text before markov chain generation
  • i added the code for text prediction
  • i texted it out with jane eyre

it works great, but some sentences are an extract from the book, so i want to increase the accuracy and randomness

Attachment
0
Vulcan

i’m going to make a text prediction model using the mathematics behind markov chains

  • i’ve broken down problem into phrases, mainly training and text prediction, and broken these down into steps
  • i’ve written the code for generating the markov chain during training
Attachment
0
Vulcan

PIVOT

i’ve decided to pivot this a little, and instead of it being a flask app of maths simulations, i want it to be a collaborative, open source collection of mathematical simulations implemented in multiple programming languages.

so i’ve shifted the programs into respective folders, deleted the flask app, and added coin_toss.swift and coin_toss.js.

going to start asking for collaborators now!

Attachment
0
Vulcan
  • added an api route (post) for page rank which returns each page’s rank as a percentage in JSON
  • created a function for coin toss
  • created an api route for coin toss
  • created a visualisation route for coin toss
Attachment
Attachment
0
Vulcan

i created the algorithm for google page rank

Attachment
0
Vulcan
  • i created the simulation code for a random walk which returns all the x and y points while the walk occurs
  • i created a flask app
  • i added an api route so that others can fetch the random walk data
  • i used matplotlib to generate an image for 5 different random walks, and added a route to see the visualisation image
Attachment
Attachment
0