Capitalisation boursière: $2.6174T -2.43%
Volume(24h): $87.2796B -13.79%
  • Capitalisation boursière: $2.6174T -2.43%
  • Volume(24h): $87.2796B -13.79%
  • Indice de peur et de cupidité:
  • Capitalisation boursière: $2.6174T -2.43%
Cryptos
Les sujets
Cryptospedia
Nouvelles
Cryptosopique
Vidéos
Top nouvelles
Cryptos
Les sujets
Cryptospedia
Nouvelles
Cryptosopique
Vidéos
bitcoin
bitcoin

$77469.874606 USD

-2.79%

ethereum
ethereum

$2434.851247 USD

-2.46%

tether
tether

$1.000053 USD

0.00%

bnb
bnb

$687.549955 USD

-3.20%

xrp
xrp

$1.382026 USD

-2.58%

usd-coin
usd-coin

$1.000001 USD

0.01%

solana
solana

$103.715827 USD

-2.84%

tron
tron

$0.338344 USD

-0.36%

hyperliquid
hyperliquid

$81.317243 USD

-2.31%

dogecoin
dogecoin

$0.084478 USD

-3.58%

zcash
zcash

$796.012285 USD

0.96%

unus-sed-leo
unus-sed-leo

$9.686235 USD

2.20%

monero
monero

$467.054013 USD

1.36%

chainlink
chainlink

$11.338577 USD

-3.49%

cardano
cardano

$0.200381 USD

-4.45%

Articles d’actualité sur les crypto-monnaies

Solving a Rubik's Cube with Supervised Learning — Intuitively and Exhaustively Explained

Jan 10, 2025 at 11:05 pm

Solving a Rubik's Cube with Supervised Learning — Intuitively and Exhaustively Explained

Solving a Rubik's Cube with Deep Learning

A step-by-step guide to building a model that can solve a Rubik's Cube

Daniel Warfield

Follow

Towards Data Science

--

Share

In this article we’ll build a deep learning model that can solve a Rubik's Cube. We’ll define our own dataset, make a transformer style model that can learn based on that dataset, and use that model to solve new and randomly shuffled Rubik's Cubes.

In tackling this problem we’ll discuss practical problems which come up frequently in data science, and the techniques data scientists use to solve those problems.

Who is this useful for? Anyone interested in achieving mastery of modern AI.

How advanced is this post? This post covers advanced modeling strategies intuitively, and is appropriate for readers of all levels.

Pre-requisites: There are no prerequisites for this article, though an understanding of transformer style models may be useful for some of the later, code heavy sections.

References: A link to the code and supporting resources can be found in the reference section at the end of this article.

Defining a Rubik's Cube as a Modeling Problem

As you likely know, the Rubik's Cube is a geometric game featuring a 3x3x3 cube with different colored squares on each of its six faces. The goal of the game is to manipulate the cube in order to return it to its original state, with each face displaying a single, uniform color.

We can define a Rubik's Cube in terms of a sequence of moves. Each move corresponds to a 90-degree rotation of one of the cube's six faces. We can represent a move using a single character, where F corresponds to a clockwise rotation of the front face, B corresponds to a clockwise rotation of the back face, L corresponds to a clockwise rotation of the left face, R corresponds to a clockwise rotation of the right face, U corresponds to a clockwise rotation of the upper face, and D corresponds to a clockwise rotation of the lower face.

For example, the sequence of moves "FRUR'D'" corresponds to a clockwise rotation of the front face, followed by a clockwise rotation of the right face, followed by a counter-clockwise rotation of the upper face, and finally followed by a counter-clockwise rotation of the lower face.

We can use this notation to define any possible state of a Rubik's Cube. For example, the starting state of a Rubik's Cube can be represented by the following sequence of moves:

```

UUUUUUUUURRRRRRRRRFFFFFFFFFDDDDDDDDDLLLLLLLLLLBBBBBBBBB

```

This sequence of moves corresponds to the following sequence of rotations:

```

U -> R -> U -> R -> U -> R -> U -> R -> U -> U -> U -> U -> U -> U -> U

```

We can apply this sequence of rotations to a scrambled Rubik's Cube in order to return it to its starting state.

We can now define the modeling problem as follows: given a scrambled Rubik's Cube, we want to predict the sequence of moves that will return the cube to its starting state.

Source primaire:towardsdatascience

Clause de non-responsabilité:info@kdj.com

Les informations fournies ne constituent pas des conseils commerciaux. kdj.com n’assume aucune responsabilité pour les investissements effectués sur la base des informations fournies dans cet article. Les crypto-monnaies sont très volatiles et il est fortement recommandé d’investir avec prudence après une recherche approfondie!

Si vous pensez que le contenu utilisé sur ce site Web porte atteinte à vos droits d’auteur, veuillez nous contacter immédiatement (info@kdj.com) et nous le supprimerons dans les plus brefs délais.

Autres articles publiés sur Aug 29, 2026