block by cmgiven ed499f2e73625f3bca7e8cc01d779daf

Eight Queens

Full Screen

Block-a-Day #14. A demonstration of recursion using the Eight Queens Problem.

Crown icon created by April Yang from the Noun Project.

What I Learned: I knew this wan’t the most efficient way to solve the problem, but there’s nothing like having to wait 200ms between frames to impart some empathy for the travails of the machine. As is, it takes about three minutes to get to the first solution. Better approaches are described on the Wikipedia page.

What I’d Do With More Time: A speed toggle would be nice. Maybe draw some lines between “bad queens” to emphasize the difference between vertical and diagonal elimination.

Block-a-Day

Just what it sounds like. For fifteen days, I will make a D3.js v4 block every single day. Rules:

  1. Ideas over implementation. Do something novel, don’t sweat the details.
  2. No more than two hours can be spent on coding (give or take).
  3. Every. Single. Day.

Previously

index.html