Introducing Digital Twins in Computer Science Education: Solving Rubik’sCube® with Snap! and LEGO®
Presented by:

Konstantin Oltmann
No materials for the event yet, sorry!
This talk presents a promising approach for teaching core computing concepts by combining Snap! and LEGO® robotics in the context of a classic puzzle: the Rubik’sCube®. We use a LEGO® Education SPIKE robot capable of solving a physical Rubik’s Cube, interlaced with a digital twin: a virtual cube model developed in Snap! that controls the physical robot instantaneously.
Concept and Implementation
Our system consists of two connected components:
A Robot that solves a physical Rubik’s Cube, inspired by the PrimeCube and buildable from a single LEGO® Education Spike Prime set.
It’s Digital Twin in Snap!: An interactive, visual representation of the Rubik’s Cube, allowing users to explore and execute solution steps virtually
The distinguishing feature of our approach is the direct linkage between Snap! and the robot using the out-of-the-box serial interface of the LEGO® SPIKE system. Actions performed within the Snap! environment, such as executing algorithms or manipulating the cube are mirrored by the robot, resulting in corresponding changes on the real-world cube. This integration enables the demonstration of digital control over physical processes in an accessible and motivating way.
Educational Perspectives
This digital–physical coupling provides a concrete context for exploring several important topics in computer science education:
Physical Computing: How abstract code and algorithms can directly influence physical devices.
Algorithm Design and Visualization: Using the Rubik’s Cube as an engaging platform to demonstrate algorithms, state changes, and debugging processes in a visual and tangible way.
Basics of Machine Learning: The process of scanning the physical cube requires machine learning techniques for accurate color recognition, introducing students to practical applications of artificial intelligence in robotics.
Modeling and Abstraction: How digital twins can help illustrate the representation and control of real-world systems by computational models.
We will outline the technical setup, demonstrate the interaction between Snap! and the robot and share ideas for how the idea of digital twins can be meaningfully integrated into computer science education.
- Date:
- Unscheduled
- Duration:
- 15 min
- Room:
- Conference:
- Snap!Con 2025
- Type:
- Talk
- Presented via:
- In person
- Difficulty:
- Medium