SlideShare a Scribd company logo
RUBIK'S CUBE
FORMULA IN PYCUBER
Adrian Liaw
http://bit.ly/1QdarwT
ABOUT ME
Junior high school student
Home-schooling
"Learning Reinforcer" at Agilearning
OTHER INTERESTS
Classical Piano
AGENDA
Why / What's PyCuber
Several Parts in PyCuber
Rubik's Cube (And Notations)
Implementations
Things About Rubik's Cube
JUST FOR FUN
IMPLEMENT PARTS IN
PYCUBER
cube.py
formula.py
solver/
RUBIK'S CUBE
ERNŐ RUBIK
RUBIK'S CUBE
RUBIK'S REVENGE
PROFESSOR'S CUBE
OVER THE TOP
POCKET CUBE
...
NOTATIONS
SINGMASTER NOTATION
BASIC NOTATIONS
R (right)
L (left)
U (up)
B (bottom)
F (front)
B (back)
R
L
U
D
F
B
F'
U2
WIDE TURNS
r
l'
d2
WHOLE CUBE
ROTATIONS
x
y'
z2
IT'S TIME FOR SOME PYTHONIC STUFF
CLASSES
Step
Formula
STEP
face (F, L, d, y)
extra symbol (counter-clockwise, 180 degrees)
SEVERAL UTILITIES
__add__
__mul__
__hash__
FORMULA
It's just a sequence of Steps
class Formula(list):
INITIALISING A FORMULA
Formula([Step("R"), Step("U")])
Formula("R U R' U'")
SEVERAL UTILITIES
__mul__
__eq__
__lt__
...etc
REWRITING METHODS
append
insert
count
remove
__contains__
Implementation of Rubik's Cube Formula in PyCuber
Implementation of Rubik's Cube Formula in PyCuber
Implementation of Rubik's Cube Formula in PyCuber
REWRITING METHODS
__add__
extend
Implementation of Rubik's Cube Formula in PyCuber
Implementation of Rubik's Cube Formula in PyCuber
Implementation of Rubik's Cube Formula in PyCuber
SPECIAL CASE!
Formula.reverse
L2 U' R -> R' U L2
USEFUL METHODS
MIRROR!
Formula.mirror()
L2 U' R -> R2 U L'
RANDOM
Formula.random()
OPTIMISE
Formula.optimise()
OPTIMISE
No wide actions
No whole cube rotations
No repeated steps
Implementation of Rubik's Cube Formula in PyCuber
Implementation of Rubik's Cube Formula in PyCuber
INTERESTING FACTS
RUBIK'S CUBE IS 41 YEARS OLD!
FASTEST SOLVE
5.25 SECONDS BY COLLIN BURNS
FASTEST ONE-HANDED SOLVE
6.88 SECONDS BY FELIKS ZEMDEGS
FASTEST BLINDFOLDED SOLVE
(Including memorisation)
21.17 SECONDS BY MARCIN KOWALCZYK
FASTEST NON-HUMAN SOLVING
3.253 SECONDS BY CUBESTORMER III
EVERY LEGAL PERMUTATION CAN BE
SOLVED IN 20 MOVES OR LESS
THERE ARE 43,252,003,274,489,856,000
POSSIBLE PERMUTATIONS
HTTP://GITHUB.COM/ADRIANLIAW
HTTP://GITHUB.COM/ADRIANLIAW/PYCUBER
pip install pycuber
“If you are curious, you’ll find the puzzles around you. If you
are determined, you will solve them.”
– Ernő Rubik.

More Related Content

PDF
Multi-dimensional Programming The Rubik's Cube Challenge to Community Health ...
ODP
Learn JavaScript by modeling Rubik Cube
PPTX
rubik’s cube 3 x 3 solution
PDF
Step by Step guide for solving Rubik's Cube
DOCX
Minimum formula for 3 x3x3 rubik cube solution - last layer permutation
PDF
Data analysis with Pandas and Spark
KEY
Rubiks cube presentation
PDF
Rubiks cubes powerpoint presentation slides ppt templates
Multi-dimensional Programming The Rubik's Cube Challenge to Community Health ...
Learn JavaScript by modeling Rubik Cube
rubik’s cube 3 x 3 solution
Step by Step guide for solving Rubik's Cube
Minimum formula for 3 x3x3 rubik cube solution - last layer permutation
Data analysis with Pandas and Spark
Rubiks cube presentation
Rubiks cubes powerpoint presentation slides ppt templates

More from Wey-Han Liaw (13)

PDF
Python 官方文件中文翻譯專案 - 探討翻譯專案的貢獻流程
PDF
Educational Code Reviews
PDF
Learning: Being as a Homeschooled Student
PDF
Jupyter Kernel: How to Speak in Another Language
PDF
Udacity Taipei meetup #2 如何駕馭線上課程
PDF
Python自學從你小時候開始
PDF
Meteor Taipei 2016 January talk -- Mantra
PDF
Understanding Meteor Stack
PDF
Async, await
PDF
SITCON summer camp 2015: Adrian說他那身邊的一堆社群
PDF
NCCU 0617 talk
PDF
PyCon 2015 Crawler Tutorial Explain Cookies
PDF
PyCon 2015 Crawler Tutorial Explain Encoding
Python 官方文件中文翻譯專案 - 探討翻譯專案的貢獻流程
Educational Code Reviews
Learning: Being as a Homeschooled Student
Jupyter Kernel: How to Speak in Another Language
Udacity Taipei meetup #2 如何駕馭線上課程
Python自學從你小時候開始
Meteor Taipei 2016 January talk -- Mantra
Understanding Meteor Stack
Async, await
SITCON summer camp 2015: Adrian說他那身邊的一堆社群
NCCU 0617 talk
PyCon 2015 Crawler Tutorial Explain Cookies
PyCon 2015 Crawler Tutorial Explain Encoding
Ad

Recently uploaded (20)

PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PPTX
Introduction to Artificial Intelligence
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
System and Network Administration Chapter 2
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
Nekopoi APK 2025 free lastest update
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PPTX
L1 - Introduction to python Backend.pptx
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PPTX
Transform Your Business with a Software ERP System
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
System and Network Administraation Chapter 3
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Introduction to Artificial Intelligence
How to Choose the Right IT Partner for Your Business in Malaysia
System and Network Administration Chapter 2
Operating system designcfffgfgggggggvggggggggg
Nekopoi APK 2025 free lastest update
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
Design an Analysis of Algorithms II-SECS-1021-03
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
L1 - Introduction to python Backend.pptx
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Transform Your Business with a Software ERP System
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
2025 Textile ERP Trends: SAP, Odoo & Oracle
System and Network Administraation Chapter 3
Wondershare Filmora 15 Crack With Activation Key [2025
Ad

Implementation of Rubik's Cube Formula in PyCuber