Skip to content

potherca-blog/chess-random-ness

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Chess Random Ness

Recently I came across an old tweet of mine about an example of Chessboard.js where both sides are played by Math.random()

For fun, I made a Codepen based on that example that is slightly more sped up.

Of course, as these things do, one thing led to another, so I present to you: CRN (Chess Random Ness)

This is basically a more elaborate version of the orignal demo, with some buttons added and some statistics thrown in.

You can see it in action at: https://blog.pother.ca/chess-random-ness/

Screenshot

image

Example of (roughly) a thousand runs

Wins 77
73
Draws Insufficient Material 579
Fifty-move Rule 230
Stalemate 60
Threefold Repetition 28
Total Games 1047
Draws 897
Wins 150
Moves 362080
Average Moves per Game 346