Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
MuZero implementation
| Date | Stars |
|---|---|
| 2026-07-30 | 2845 |
| 2026-08-10 | 2856 |
| 2026-08-18 | 2857 |
| 2026-08-21 | 2858 |
| 2026-08-22 | 2859 |
| 2026-08-24 | 2858 |
| 2026-08-25 | 2860 |
| 2026-08-26 | 2861 |
| 2026-08-27 | 2863 |
| 2026-09-01 | 2864 |
| 2026-09-02 | 2865 |
| 2026-09-03 | 2866 |
| 2026-09-09 | 2866 |
| 2026-09-10 | 2867 |
| 2026-09-11 | 2868 |
| 2026-09-13 | 2869 |
| 2026-09-17 | 2870 |
| 2026-09-19 | 2870 |
| 2026-09-22 | 2869 |
| 2026-10-02 | 2870 |
| 2026-10-04 | 2869 |
| 2026-10-07 | 2870 |
| 2026-10-10 | 2872 |
| 2026-10-12 | 2873 |
| 2026-10-14 | 2874 |
| 2026-10-16 | 2875 |
| 2026-10-17 | 2876 |
| 2026-10-19 | 2877 |
| 2026-10-21 | 2878 |
| 2026-10-22 | 2877 |
| 2026-10-26 | 2878 |
| 2026-10-27 | 2878 |
| 2026-10-28 | 2877 |
| 2026-10-29 | 2878 |
| 2026-10-30 | 2877 |
| 2026-10-31 | 2878 |
| 2026-11-02 | 2879 |
| 2026-11-03 | 2879 |
| 2026-11-04 | 2879 |
Today
— stars today
This week
+2 stars this week
This month
+10 stars this month
Momentum
2.0
growth rate 0.07%/day
# MuZero General
[](requirements.txt)
[](LICENSE)
An educational and commented implementation of [MuZero](https://arxiv.org/abs/1911.08265), based on DeepMind's 2019 paper and [original pseudocode](https://arxiv.org/src/1911.08265v2/anc/pseudocode.py), built with PyTorch and Ray.
MuZero builds on [AlphaZero](https://arxiv.org/abs/1712.01815) by learning the dynamics used for planning from experience. Its network represents observations as a latent state, predicts how actions change that state, and estimates rewards, values and policies. Monte Carlo tree search (MCTS) uses these predictions to choose actions.
For an introduction, watch the [MuZero explanatory video](https://youtu.be/We20YSAJZSE) or read [How MuZero works](https://github.com/werner-duvaud/muzero-general/wiki/How-MuZero-works) and the [project wiki](https://github.com/werner-duvaud/muzero-general/wiki/MuZero-Documentation).
The implementation supports fully connected and residual networks, parallel self-play, prioritized replay, reanalysis, and single-player or two-player turn-based games with discrete actions.
To adapt it to a new environment, add a [game file](games) containing its configuration and `Game` adapter. See [CartPole](games/cartpole.py) for an example and [Add an environment](#add-an-environment) for the interface.
## Trained examples
| [CartPole](games/cartpole.py) | [Lunar Lander](games/lunarlander.py) | [Breakout](games/breakout.py) |
| :---: | :---: | :---: |
| <img src="checkpoints/cartpole/episode.gif" height="200" alt="CartPole policy balancing for 500 steps"> | <img src="checkpoints/lunarlander/episode.gif" height="200" alt="Lunar Lander policy completing a successful landing with a score of 304.46"> | <img src="checkpoints/breakout/episode.gif" height="200" alt="Breakout policy scoring 303 points"> |
| [Learning curve](checkpoints/cartpole/training.png) · [Checkpoint](checkpoints/cartpole/model.checkpoint) | [Learning curve](checkpoints/lunarlander/training.png) · [Checkpoint](checkpoints/lunarlander/model.checkpoint) | [Learning curve](checkpoints/breakout/training.png) · [Checkpoint](checkpoints/breakout/model.checkpoint) |
## Quick start
### Install
Use Python 3.12 or later. The included checkpoints were trained on Linux with Python 3.12.
```bash
git clone https://github.com/werner-duvaud/muzero-general.git
cd muzero-general
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txt
```
See the official [PyTorch installation guide](https://docs.pytorch.org/get-started/locally/) for GPU setup and [Gymnasium Box2D instructions](https://gymnasium.farama.org/environments/box2d/) for Lunar Lander build dependencies. MCTS tree visualization also needs the system [Graphviz executable](https://graphviz.readthedocs.io/en/stable/manual.html#installation), in addition to its Python package.
### Train
Choose an environment:
```bash
python muzero.py cartpole
python muzero.py lunarlander
python muzero.py breakout
```
Each command starts a fresh model using that game's default config, runs the configured training budget, then evaluates the selected checkpoint. The defaults use CPU training for CartPole and Lunar Lander, and a GPU for Breakout when CUDA is available. Use `--cpu` to force CPU execution.
From Python:
```python
from muzero import MuZero
agent = MuZero("cartpole")
agent.train()
```
### Evaluate a checkpoint
```bash
python muzero.py cartpole --evaluate
python muzero.py lunarlander --evaluate
python muzero.py breakout --evaluate
```
These commands load `checkpoints/<env>/model.checkpoint` and evaluate it on CPU, without training or rendering. The default is 100 episodes. Checkpoints contain their saved configuration; no JSON sidecar is needed.
### Monitor and render
Run TensorBoard in another terminal:
```bash
tensorboard --logdir ./results
```
For interactivExcerpt of 9,641 characters
Read on GitHub91
14
Wei Zhang
5
4
3
tom white · New Zealand
2
2
Luke Wood
1
LazyNeuron · University of Alberta · Canada
1
1
1
Fred Drake
1
1
1
Sergio Vieri
1
1
1
Adam Lawson · United Kingdom
1
Would you bet a product on this? Bounded 0–100 and slow moving.
matched fp:6dd5ad078bacf1bf, topic:reinforcement-learning, topic:deep-reinforcement-learning, topic:rl
matched fp:6dd5ad078bacf1bf, topic:deep-learning, topic:neural-network, topic:pytorch