Skip to content

gauravag99/jumpingcursor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Jumpingcursor

This is a simulator for the twitter post here

The twitter post basically wants us to calculate the average steps taken by the jumping dot to reach 6, given initial starting position as 1.

The code simulates 100000 iterations, and an average of 19 is reached around 60000 iterations. The probabilities (serving the purpose of gates) are hard coded, and similarly the structure of possible jumps is also hardcodeed in two dictionaries.

You can change these (essentially changing the structure of the above image), the iterations, can use multiprocessing to make it faster, since each cursor can be treated as a different object.

Anyway, this plot is what you get at the end:

About

See Readme

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages