A while ago I set about trying to find asymmetric dice that might be fair. I’ve put a lot more work into it, but mostly because there’s been a lot of ~~frustrating~~ interesting tangents. Here’s the main thrust of the project:

- Original plan: see if I can use evolutional programming to find an asymmetric die that rolls fairly
- Asymmetric is easiest to do by avoiding the platonic solids (the dice D&D folks use, for example). A lot of what I’ve been doing has been with a 46-sided die (not sure how I landed there, but it’s 25 vertices, which is a fun number).
- The idea was to form random ones and evolve to a shape where the distribution of sides was flat enough

- Updated plan (because it’ll run a lot faster): Find an asymmetric unfair die but find contiguous regions on the die that all collectively have the same probability of landing. For example, on the 46-sided die, find, say, 7 collections of sides that all have the same total probability. Then, if you printed it, you could use seven numbers, most (all?) of which would repeat a few times. This came from a great question I got at a local AAPT meeting from my awesome colleague, Bruce Bolon.
- In the last post you can see that I’ve basically worked out how to roll a 3D die. I can also run on a server at work so that I can roll it thousands of times to get a decent histogram of the probabilities for each side.

Here are a few examples of 7 contiguous regions on a 46 sided die:

As you can see in the previous post, I figured out how to roll 3D dice. I figured I could just roll a die a bunch of times, find the histogram of rolls, and be off and running.

But then I hit a problem (the first of many!). I needed to make sure I randomized the initial conditions of the roll. I figured I could just randomly orient the die before the roll begins. However, I started to notice odd histograms. I double checked things by rolling perfect platonic solids. Here’s the histogram of the probabilities of landing on each side of an 8-sided die where I randomized the die by picking a random axis and a random angle to rotate around that axis:

Oops! See the problem? Wow it took me a while to figure that out, but I finally did, thanks to the discussion on page 108 of this link. It turns out that picking a random axis and rotating around it randomly quite often leaves the original north pole in the northern hemisphere. Ok, so then I just did random Euler rotations:

This time showing the expected even line and the standard deviations based on the number of rolls. Ok, cooking with fire, right? Nope.

So I moved onto larger dice and thought I’d be ready to go. But I discovered that I would often get sides that would never roll. I wondered what was going on and found out that a randomly generated die often produced sides that were unstable. First let me explain how I produce a random die: I pick, say, 25 random points on a sphere and use Mathematica’s ConvexHullMesh to turn that into a 46 (or 2n-4) sided die. Next, what do I mean by unstable? What I mean is that when you put that side flat on the surface of the table, the center of mass of the die is not directly above it. If that happens, it’ll always tumble away from that side.

Ugh, so that meant I had to carefully figure out which “random” initial points on the sphere that I could use so that all sides had at least a chance of rolling. I figured that it’s probably best to stick close to dice that have the vertices roughly evenly spaced, so I started digging into how to do that. This site helped a ton. In particular, it talked about how you could treat the vertices as charged particles and find distributions of the vertices that minimize their potential energy. So that’s what I set out to do.

Here’s a vid of starting the vertices randomly and letting them move under the influence of their mutual repulsion along with some viscosity (so that they’d settle down near a stable point):

That looked great, but then I did a side-stability test and found that, while the energy had effectively been minimized (to my satisfaction, at least) there was still a pesky side that was unstable! It’s hard to see, but here are two images that highlight the unstable side. In each, there’s a blue line drawn from the center of mass of the die (which isn’t the center of the sphere that all the vertices lie on!) perpendicular to the face of the offending side. If that line pierces the face, then it’s stable. You can see in the zoom image that it’s just barely unstable:

Cool, huh? I was excited that maybe there was some weird physical thing going on here until I reran the energy minimization with different (random) initial locations for the vertices. When I did that, the final die was fully stable. Still, that’s pretty interesting that it can sometimes not quite be fully stable.

So what’s next? I’d like to take a fully-stable die and do the contiguous regions analysis. I haven’t run the thousands of rolls it takes to get a good histogram, but this analysis of a 36 sided die shows good correlation: Red: probability of rolls, Green: solid angle of side as seen from center of mass, Orange: area of side, Blue: volume of cone from center to each side. It should be noted that this die had a few sides that were unstable, so I think that’s why the correlations aren’t great.

But with that, I think I’m excited to use this 46-sided die (this is a graph of the area of each side):

Whew, so that’s where I’m at. Fun, huh?

UPDATE: Here’s the same graph as above but for a fully-stable 36-sided die (Again: Red: probability of rolls, Green: solid angle of side as seen from center of mass, Orange: area of side, Blue: volume of cone from center to each side):

Your thoughts? Here are some starters for you:

- This is cool. What’s D&D?
- So basically this is all Bruce’s project? Why isn’t he given credit as an author on this post?
- Why do I have to flip to page 108 of that link? Can’t you just explain it, loser?
- What do you mean by random Euler rotations?
- What do you mean when you say that n points lead to a 2n-4 sided die? That seems suspicious because that means that I can have a d6 with just 5 vertices. A d6 has 8 vertices and Plato says so!
- Why don’t you try to find a fair d6 with 5 vertices?
- What do you mean by “to my satisfaction at least” when talking about minimizing the energy? Surely you mean you’re finding the perfect global minimum to 100 decimal places, yes?
- At first, you said the only way to test for stability was to see if the center of mass was directly above the side when it was resting on the surface. Then you said you just drew a line from the center of mass that was perpendicular to the side and looked to see if it pierced the side. Which is it?!

Forgot to say that I did the contiguous grouping using some cool graph analysis in Mathematica. Specifically I used FindGraphPartition after making a graph indicating which sides were adjacent.

I love the idea of finding contiguous regions that work out! That would be a nice solution.

Yeah, it should be fun. Hope to get some time in on that this week.