• Rubik's Cube Project Write-Up

    Over the past few weeks, I’ve been working on a developing a program to assist the solution of a Rubik’s cube. The project started as an elaborate “joke,” after I messed up a friend’s Rubik’s cube and couldn’t put it back into its solved state. The goal of this project is to read in the state of an unsolved Rubik’s cube from a camera feed (or set of static images), and to provide step-by-step graphical instructions on how to solve the Rubik’s cube. Roughly, the project breaks down into four steps:

    Tags:    |   | 
  • Random Points on a Circle Riddler

    Last week’s Riddler was about determining the probability that randomly distributed points on a circle all belong to a common same half-circle. It seemed like it should be pretty easy to solve by hand (edit: and it totally was), but for whatever reason I couldn’t piece out a solution. Instead, I settled for simulating the problem and making some pretty explanatory pictures.

    Tags:  
  • Gift Card Drinks Riddler

    In this notebook, I’ll be exploring the FiveThirtyEight Riddler from April 5th 2019. The setup for this problem is that you’re given a couple of gift cards which are loaded with free drinks. You’re lazy and you’ll randomly use one or the other each time you go to the coffee shop. Eventually you run out of drinks on one of the cards. The question is: how likely is it that you’re other card has any drinks on it, and on average how many drinks will you have left over?

    Tags:  
  • Sudoku Solver Visualization

    While I was driving to work two Fridays ago, the idea to visualize a Sudoku solver popped into my head. A few years back, I wrote a (pretty bad) Sudoku solver to solve Project Euler Problem 96, and I wanted to see how it worked. My original solver was written in Python, but I thought it might be fun to port it into JavaScript and display the solution steps with D3. The process turned out to be a lot less fun than I had anticipated (mostly due to my confusion over how timers work in D3), but I ended up getting everything working in the end. The result is below:

    Tags:    | 
  • D3 Test

    It’s about that time of year where I start thinking about how to make interactive plots / simple dashboards again… In that spirit, I’ve started playing around with D3 again, and I spent the better part of the weekend making a simple visualization of a pawn’s tour around the Monopoly gameboard. My goal was to plot the pawn’s movement while simultaneously estimating and displaying an empirical long-run occupancy distribution of the squares the pawn visits. For the most part, I got the simulation and display working, but it’s still a bit of a work in progress.

    Tags: