LightZero  by opendilab

MCTS/RL toolkit for decision-making problems

created 2 years ago
1,418 stars

Top 29.3% on sourcepulse

GitHubView on GitHub
Project Summary

LightZero is a PyTorch-based toolkit for Monte Carlo Tree Search (MCTS) combined with Deep Reinforcement Learning (RL), designed to standardize and accelerate research in general sequential decision-making scenarios. It offers a lightweight, efficient, and easy-to-understand framework for implementing and benchmarking MCTS+RL algorithms like AlphaZero and MuZero.

How It Works

LightZero's framework comprises three core modules: Model (network architecture), Policy (learning, collecting, and evaluation processes), and MCTS (tree structure and interaction with Policy). The MCTS implementation is available in both Python and C++ for performance optimization. This modular design facilitates understanding, comparison, and customization of various MCTS algorithms.

Quick Start & Requirements

  • Installation: pip3 install -e . after cloning the repository.
  • Prerequisites: Linux or macOS for compilation. Docker support is available.
  • Quick Start Examples: Training MuZero for CartPole, Pong, and TicTacToe are provided.
  • Documentation: Available for customization of environments and algorithms.

Highlighted Details

  • Implements key MCTS+RL algorithms: AlphaZero, MuZero, EfficientZero, Sampled MuZero, Stochastic MuZero, Gumbel MuZero.
  • Supports a wide range of environments including classic control, Atari, MuJoCo, and board games.
  • Features mixed heterogeneous computing for MCTS efficiency.
  • Provides detailed documentation, framework diagrams, and function call graphs.

Maintenance & Community

The project is actively maintained, with recent updates and a clear versioning scheme. Community interaction is encouraged via GitHub issues, a discussion forum, and a Discord server.

Licensing & Compatibility

All code is released under the Apache License 2.0, permitting commercial use and integration with closed-source projects.

Limitations & Caveats

Compilation is currently limited to Linux and macOS; Windows support is in progress. Some algorithm/environment combinations are marked as "Work In Progress" (🔒).

Health Check
Last commit

4 days ago

Responsiveness

1 day

Pull Requests (30d)
11
Issues (30d)
3
Star History
64 stars in the last 90 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), Nathan Lambert Nathan Lambert(AI Researcher at AI2), and
1 more.

tianshou by thu-ml

0.1%
9k
PyTorch RL library for algorithm development and application
created 7 years ago
updated 2 days ago
Starred by Andrej Karpathy Andrej Karpathy(Founder of Eureka Labs; Formerly at Tesla, OpenAI; Author of CS 231n), Nat Friedman Nat Friedman(Former CEO of GitHub), and
32 more.

llama.cpp by ggml-org

0.4%
84k
C/C++ library for local LLM inference
created 2 years ago
updated 21 hours ago
Feedback? Help us improve.