Hah. Neat. I love projects like this just for fun.
For my old (2010-era) Bitcoin casino, I wrote a slot machine based on a Rubik's cube. When you would "spin" the slot, the cube would reset to a perfect position and then scramble itself randomly 4-6 times. You had 60 seconds (with max 3 moves) to solve as many lines as possible. Payout was based on how many triplets you had.
I never wrote a solver for it. But the goal was for it to be skill-based. Determining the payout odds involved a LOT of monte carlo solving. I wanted the expected value for a perfect player to be 100%.
Very few people ever actually played it. And those who did mostly played the "dumb" version where the payouts were higher per line, but you didn't get the 3 manipulations after the spin. That version was calibrated to about 92% EV, if I remember right.
Diving into the math of it was one of the most entertaining things I've ever done as a programmer. A universal poker hand evaluator (from 3 card to 5 to 7 Holdem and Omaha) in 200 lines of PHP, was the second.
andsoitis · 2h ago
The implementation of Twentyseven is based on Herbert Kociemba’s notes about Cube Explorer, a program written in Pascal!
Object Pascal, since the project is implemented in Delphi.
Incase the author of the original article ends up reading this, is there any significance to the skipping of the 9th index after each face? (i.e. first face is 00-08, next one starts at 10 and goes to 18, then 20 to 28, etc)
A naive guess on my part is that doing it this way keeps the number in each specific spot of the 3x3 grid the same, X0 is the top left and X8 is the bottom right.
For my old (2010-era) Bitcoin casino, I wrote a slot machine based on a Rubik's cube. When you would "spin" the slot, the cube would reset to a perfect position and then scramble itself randomly 4-6 times. You had 60 seconds (with max 3 moves) to solve as many lines as possible. Payout was based on how many triplets you had.
I never wrote a solver for it. But the goal was for it to be skill-based. Determining the payout odds involved a LOT of monte carlo solving. I wanted the expected value for a perfect player to be 100%.
Very few people ever actually played it. And those who did mostly played the "dumb" version where the payouts were higher per line, but you didn't get the 3 manipulations after the spin. That version was calibrated to about 92% EV, if I remember right.
Diving into the math of it was one of the most entertaining things I've ever done as a programmer. A universal poker hand evaluator (from 3 card to 5 to 7 Holdem and Omaha) in 200 lines of PHP, was the second.
Object Pascal, since the project is implemented in Delphi.
source code: https://github.com/hkociemba/CubeExplorer
A naive guess on my part is that doing it this way keeps the number in each specific spot of the 3x3 grid the same, X0 is the top left and X8 is the bottom right.