Skip to content

twohlix/chutes_and_ladders

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chutes and Ladders

Chutes and Ladders simulator in Ruby that outputs a histogram of turns it takes to win.

Multithreaded speedup supported with --threads N option in JRuby or Rubinius. The standard MRI you will so no speedup with multiple threads due to the Global Interpreter Lock (GIL).

Just run ruby chutes_and_ladders.rb

ruby chutes_and_ladders.rb --help
Usage: chutes_and_ladders.rb [options]
    -g, --games GAMES                Number of games to simulate [1000000]
    -t, --threads THREADS            Number of Threads to use [1]
        --max-turns TURNS            Max number of turns to let a game go for [150]
    -h, --help                       Show this message

Credits

Ethan Markowitz and his article analyzing chutes and ladder: http://ethanmarkowitz.com/index.php/2015/05/24/hacking-chutes-and-ladders-using-r/

About

Chutes and Ladders simulator in Ruby

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages