r/reinforcementlearning • u/Desperate_Inside3831 • 22h ago
r/reinforcementlearning • u/RepulsiveRevenue8086 • 20h ago
Rubiks Cube solver using Reinforcement Learning (Beating Sebastian Lague's solver)
I made multiple attempts at solving the Rubiks Cube using Reinforcement learning.
Initially, I tried to map states to actions with both Rainbow DQN and GRPO using curriculum learning. This had no success. After scrambling 6 moves it was already to hard for the agent.
Then I found the DeepCubeA approach and I took some inspiration from that. I trained a DQN to estimate the cost-to-go for each possible action, using a combination of demonstrations and self-generated rollouts. Essentially, each output estimates how many moves are still needed to solve the cube after taking that action. I then used these estimates as a heuristic to guide beam search.
With a beam_width of 2^18 and 1.5 hours of Kaggle GPU usage, here are the results for 1000 cubes (100 moves scrambles):
Time per cube: 10.30s
Avg steps: 19.67
Success: 100%
This beats Sebastian Lague's solver which had an average steps of 19.9 to solve the cubes. Not that it is a competition or something :)
Github: https://github.com/Cain15/RL4RubiksCube
Youtube: https://www.youtube.com/watch?v=UWPQ-Mzkq_A
r/reinforcementlearning • u/CoffeeOld4732 • 1h ago
Sample
Hi everyone
I am new to reinforcement learning and i have question about policy-based algorithm like PPO. in this algorithm do we sample from distribution function when we want to select action in both training and test phases?or just in training and argmax use in testing? I think sampling or argmax is two different way to select action in reinforcement learning and it is not mandatory to use specific way in training and test
r/reinforcementlearning • u/MAOmaoSayuri • 2h ago
DL [P] Chasing the Shadow of SAI: Stabilizing Muon Optimizer & Hybrid Transformers in AlphaZero Self-Play (9x9 Go)
GitHub Repo & Full Logs: https://github.com/MAOmao000/Sayuri-TensorRT
I ran a series of 8 single-GPU experiments extending the open-source Sayuri Go engine with Muon, Hybrid ResNet-Transformer blocks, and Gumbel AlphaZero to see if a compact model (`b6xc128h32`) could match the larger `SAI b8c160` baseline in 9x9 Go.
**Key Takeaways:**
- **Result:** Reached 52.25% point win rate (+16 Elo over 200 games) against `SAI b8c160` in 310K steps (~400K self-play games) without warm restarts.
- **Head-Split Muon:** Splitting attention projections by `head_dim=32` prior to Newton-Schulz orthogonalization was critical for parameter efficiency.
- **Preventing RL Mode Collapse:** Mixing 3 distinct MCTS worker personalities (Balance, Offense, Defense) kept exploration entropy alive and prevented draw-overfitting.
- **SWA & Cosine Cycle Trap:** Terminating SWA strictly before the cosine annealing cycle reset avoided a -50 Elo drop caused by post-reset LR spikes.
- **Loss–Strength Paradox:** Lowest self-play training loss did not equal highest Elo when rule/komi distributions were narrowed.
All training configs, loss curves, and evaluation logs are documented in the repo. Feedback and thoughts on RL + Muon stability are very welcome!