# google-deepmind/mctx

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/google-deepmind-mctx).**

2,590 stars · 207 forks · Python · apache-2.0

## Links

- GitHub: https://github.com/google-deepmind/mctx
- awesome-repositories: https://awesome-repositories.com/repository/google-deepmind-mctx.md

## Topics

`jax` `monte-carlo-tree-search` `reinforcement-learning`

## Description

mctx is a framework for executing high-performance tree search and state simulations to generate policy targets for neural networks. It functions as a compiled search engine and neural dynamics simulator that predicts state transitions and rewards using learned representations.

The project implements a vectorised tree search capable of running parallel search operations across input batches. It utilizes a policy target generator to convert search results into action weights used for training and refining neural network policies.

The system covers reinforcement learning workflows by integrating neural environment simulation with model-based policy implementation. It facilitates the distillation of search outcomes into high-quality training targets for neural network policy optimization.

## Tags

### Artificial Intelligence & ML

- [Neural Dynamics Models](https://awesome-repositories.com/f/artificial-intelligence-ml/neural-dynamics-models.md) — Integrates learned representation and transition functions to predict future states and rewards within a search tree.
- [Reinforcement Learning Policy Improvement](https://awesome-repositories.com/f/artificial-intelligence-ml/agentic-systems-frameworks/agentic-workflows/iterative-refinement-workflows/reinforcement-learning-policy-improvement.md) — Creates action weights from search results to iteratively refine agent strategies and policies. ([source](https://github.com/google-deepmind/mctx#readme))
- [Batched State Transitions](https://awesome-repositories.com/f/artificial-intelligence-ml/batched-state-transitions.md) — Implements batch-parallel state transitions to update multiple simulated environments using a single compiled function call.
- [Compiled Search Engines](https://awesome-repositories.com/f/artificial-intelligence-ml/compiled-search-engines.md) — Provides a high-performance engine that runs parallel search operations using compiled functions for efficient batch processing.
- [Policy Distillation](https://awesome-repositories.com/f/artificial-intelligence-ml/model-distillation-methods/teacher-student-distillation/policy-distillation.md) — Generates action weights from search results to perform policy distillation for neural network training.
- [Monte Carlo Tree Search](https://awesome-repositories.com/f/artificial-intelligence-ml/monte-carlo-tree-search.md) — Executes high-performance Monte Carlo Tree Search to find optimal action sequences through simulation.
- [Neural Dynamics Simulators](https://awesome-repositories.com/f/artificial-intelligence-ml/neural-dynamics-simulators.md) — Ships a system that predicts state transitions and rewards using learned representations to guide decision making.
- [Model-Based Policy Implementations](https://awesome-repositories.com/f/artificial-intelligence-ml/policy-gradient-implementations/model-based-policy-implementations.md) — Combines representation, dynamics, and prediction functions to propose actions and generate training targets. ([source](https://github.com/google-deepmind/mctx/blob/main/README.md))
- [Policy Target Generators](https://awesome-repositories.com/f/artificial-intelligence-ml/policy-target-generators.md) — Converts search results into action weights used for training and refining neural network policies.
- [Reinforcement Learning](https://awesome-repositories.com/f/artificial-intelligence-ml/reinforcement-learning.md) — Integrates tree search and neural predictions within a comprehensive reinforcement learning workflow.
- [Differentiable Observation Mappings](https://awesome-repositories.com/f/artificial-intelligence-ml/representation-probing/implicit-latent-representations/differentiable-observation-mappings.md) — Provides differentiable mapping of raw environment observations into a latent space for dynamics processing.
- [Tree Search Frameworks](https://awesome-repositories.com/f/artificial-intelligence-ml/tree-search-frameworks.md) — Offers a framework for executing high-performance tree search and state simulations to generate policy targets.
- [Vectorised Tree Search](https://awesome-repositories.com/f/artificial-intelligence-ml/vectorised-tree-search.md) — Performs multiple independent search simulations in parallel by leveraging tensor operations instead of scalar loops.
- [Simulated Environments](https://awesome-repositories.com/f/artificial-intelligence-ml/workflow-as-a-tool-exposure/agent-as-a-tool-execution/simulated-environments.md) — Predicts future states and rewards using learned dynamics functions to guide decision making in simulated environments.
- [Neural Network Training](https://awesome-repositories.com/f/artificial-intelligence-ml/neural-network-training.md) — Refines neural network policy performance by using search results as high-quality training targets.

### Part of an Awesome List

- [Batched Environment Simulators](https://awesome-repositories.com/f/awesome-lists/ai/simulation-environments/batched-environment-simulators.md) — Simulates neural environments using batched predictors for state transitions, rewards, and values. ([source](https://github.com/google-deepmind/mctx#readme))

### Scientific & Mathematical Computing

- [High-Performance and Parallel Computing](https://awesome-repositories.com/f/scientific-mathematical-computing/high-performance-execution-environments/high-performance-and-parallel-computing.md) — Utilizes high-performance and parallel computing via JAX and XLA to execute search algorithms across input batches.
