Skip navigation
Gemini 3 is truly a great model.
0:00 / 0:27

Gemini 3 is truly a great model.

Matthew Berman

@MatthewBerman154K followers

Visit on X
2,069 likesDownloadOriginal post

170,396 views

Gemini 3 is truly a great model. It created the Rubik's cube simulation on the first try, in seconds, with ~300 lines of code. Flawless.

39 Comments

Comments from the original post on X (Twitter)

  • Matthew Berman's profile picture

    @MatthewBerman

    Full Gemini 3 breakdown video:

    16 likes

  • Mike Boysen (JTBD/acc)'s profile picture

    @mikeboysen

    Let's move on to something more challenging ;)

    12 likes

  • Matthew Berman's profile picture

    @MatthewBerman

    ideas?

    9 likes

  • Tristan Hurlebaus's profile picture

    @TristanHurleb

    @mikeboysen 3-D chess game

    5 likes

  • Mike Boysen (JTBD/acc)'s profile picture

    @mikeboysen

    @MatthewBerman 4D Rubik's Cube would satisfy me

    5 likes

  • Matthew Berman's profile picture

    @MatthewBerman

    @TristanHurleb Describe the 4th dimension and I’ll make it happen 🫡

    2 likes

  • Mike Boysen (JTBD/acc)'s profile picture

    @mikeboysen

    Designing a four-dimensional Rubik's Cube requires moving from 3D spatial reasoning to 4D geometry. Since we cannot manufacture a physical 4D object in our universe, the "design" is a theoretical construct usually implemented as software using 3D projections. Below is the design specification for a 3 \times 3 \times 3 \times 3 puzzle, often called a Hypercube. 1. The Geometry: The Tesseract A standard Rubik's Cube is a cube sliced into smaller cubes. A 4D Rubik's Cube is a Tesseract sliced into smaller tesseracts (hypercubies). * Dimensions: 4 spatial dimensions (x, y, z, w). * Boundaries: Instead of 6 square faces, the puzzle has 8 cubic cells. * Total Hypercubies: 3^4 = 81 total pieces. 2. Visualization Strategy To render this on a 2D screen or perceive it with 3D eyes, we must use a Schlegel Diagram (perspective projection). * The "Outer" Cell: Imagine a large, transparent cube. This represents one of the 8 cells (similar to the "Front" face of a standard cube). * The "Inner" Cell: Imagine a smaller cube floating in the exact center of the large cube. This is the opposite cell (similar to the "Back" face). * The 6 "Frustum" Cells: The space connecting the inner cube to the outer cube is divided into 6 distorted cubes (pyramidal frustums). These represent the Top, Bottom, Left, Right, Front, and Back cells in the 4th dimension. 3. Color Scheme and Cells A standard cube uses 6 colors. The 4D cube requires 8 colors, one for each cubic cell. | Cell Position | 4D Direction | Standard Color | |---|---|---| | Inner Cube | Ana (In) | Purple | | Outer Cube | Kata (Out) | Pink | | Top Cube | Up (+Y) | Yellow | | Bottom Cube | Down (-Y) | White | | Front Cube | Front (-Z) | Red | | Back Cube | Back (+Z) | Orange | | Left Cube | Left (-X) | Blue | | Right Cube | Right (+X) | Green | 4. Anatomy of the Pieces Just as a 3D cube has centers, edges, and corners, the 4D cube has a hierarchy based on how many colors (cells) the piece touches. | Piece Type | Count | Description | |---|---|---| | 4-Color Hypercorners | 16 | These are the "points" of the tesseract. They define the extreme corners. | | 3-Color Hyperedges | 32 | These connect the corners. | | 2-Color Hyperfaces | 24 | These sit in the center of the 2D faces of the cubic cells. | | 1-Color Body Centers | 8 | These are the centers of the 8 cubic volumes. They never move relative to each other (defining the color of the cell). | | 0-Color Core | 1 | The exact geometric center of the puzzle (invisible). | | Total Visible | 80 | (Plus the internal core) | 5. The Mechanics of Movement In 3D, we rotate a plane of pieces around an axis (a line). In 4D, we rotate a hyperplane (a 3D volume of pieces) around a plane. * The Slices: Each of the 8 cubic cells can be rotated. * The Effect: When you rotate the "Right" cell, you are twisting a slice of the 4D object. * In the Schlegel projection, this looks mesmerizing and confusing. The pieces inside the "Right" trapezoidal volume will rotate, but pieces from the "Outer" and "Inner" cubes will flow into the Right volume, while pieces from the Right volume flow out to the Outer/Inner cubes. * The pieces literally appear to turn inside-out as they move between the inner and outer boundaries. 6. User Interface Design (Software Implementation) To make this playable, the UI must handle the visual occlusion (pieces blocking other pieces). * Cubie Shrinking: The individual stickers must be rendered slightly smaller than the grid to allow the user to "see past" the front layers into the internal structure. * Cell Masking: The user must be able to toggle the visibility of specific cells (e.g., "Hide Outer Cell") to inspect the configuration of the inner layers. * Click Interactions: * Left Click: Rotate the selected cubic cell clockwise. * Right Click: Rotate counter-clockwise. * Ctrl + Click: Rotate the entire 4D object in 4D space (re-orienting which cell is "Outer" and which is "Inner").

    2 likes

  • CWB Brazil's profile picture

    @CWB8686

    Remind me, why is this *the* test?

    5 likes

  • Matthew Berman's profile picture

    @MatthewBerman

    @ChrisWordbox why not?

    6 likes

  • Hey Hi AI's profile picture

    @Hey_Hi_AI

    The famous Gemini meltdowns are back lol

    2 likes

  • Sam Starkman's profile picture

    @sam_starkman

    Awesome. Will be experimenting with this later. Been building a project a week, can't wait to test this upgrade

    2 likes

  • Matthew Berman's profile picture

    @MatthewBerman

    It’s a good model

    4 likes

  • Dallas's profile picture

    @Blackjet84

    Love your reviews Matt very informative. Maybe I missed something I just haven't seen you test or evaluate on Grok for a minute. Anything good or bad to say?

    2 likes

  • Shubh's profile picture

    @shubhbali

    Can't wait to test it

    1 like

  • Steven Wolfe Pereira's profile picture

    @wolfepereira

    That's awesome @MatthewBerman

    1 like

  • CG's profile picture

    @cgclick

    My daughter (12) has been working on solving a cube for a little while now, her fastest time is around :50 Going to show her this to provide a little more motivation

    1 like

  • Cavit Erginsoy's profile picture

    @caviterginsoy

    that solve offends me as a human cuber

    1 like

  • FHD, IVF Capital Founder & Managing Partner's profile picture

    @CChef1980

    May I ask what platform? Mobile? Web? Native? Language? C? C++? Python? OpenGL?

    1 like

  • Kara Deku's profile picture

    @karadeku

    And yet it failed to debug my issue in UE5 for over 30 minutes when all it had to do was set bUseAccelerationForPaths to true.

    1 like

  • rickyVONicky's profile picture

    @rickyVONicky1

    now do 5x5... watch gemini fail.

    1 like