<commit_before># Mctx: MCTS-in-JAX

Mctx is a library with a [JAX](https://github.com/google/jax)-native
implementation of Monte Carlo tree search (MCTS) algorithms such as
[AlphaZero](https://deepmind.com/blog/article/alphazero-shedding-new-light-grand-games-chess-shogi-and-go),
[MuZero](https://deepmind.com/blog/article/muzero-mastering-go-chess-shogi-and-atari-without-rules), and
[Gumbel MuZero](https://openreview.net/forum?id=bERaNdoegnO). For computation
speed up, the implementation fully supports JIT-compilation. Search algorithms
in Mctx are defined for and operate on batches of inputs, in parallel. This
allows to make the most of the accelerators and enables the algorithms to work
with large learned environment models parameterized by deep neural networks.

## Installation

Mctx can be installed with `pip` directly from github, with the following command:

`pip install git+https://github.com/deepmind/mctx.git`

or from PyPI:

`pip install mctx`


## Motivation

Learning and search have been important topics since the early days of AI
research. In the words of <NAME>: *One thing that should be learned [...]<commit_msg>Recommend installing the PyPI released package first, instead of installing from GitHub, as it may not be as stable as the released version.<commit_after># Mctx: MCTS-in-JAX

![pypi](https://img.shields.io/pypi/v/mctx)

Mctx is a library with a [JAX](https://github.com/google/jax)-native
implementation of Monte Carlo tree search (MCTS) algorithms such as
[AlphaZero](https://deepmind.com/blog/article/alphazero-shedding-new-light-grand-games-chess-shogi-and-go),
[MuZero](https://deepmind.com/blog/article/muzero-mastering-go-chess-shogi-and-atari-without-rules), and
[Gumbel MuZero](https://openreview.net/forum?id=bERaNdoegnO). For computation
speed up, the implementation fully supports JIT-compilation. Search algorithms
in Mctx are defined for and operate on batches of inputs, in parallel. This
allows to make the most of the accelerators and enables the algorithms to work
with large learned environment models parameterized by deep neural networks.

## Installation

You can install the latest released version of Mctx from PyPI via:

```sh
pip install mctx
```

or you can install the latest development version from GitHub:

```sh
pip install git+https://github.com/deepmind/mctx.git
```

## Motivation

Learning and search have been important topics since the early days of AI
research. In the words of <NAME>: *One thing that should be learned [...]
{'fraction_non_alphanumeric': 0.09616919393455706, 'fraction_numerical': 0.0, 'mean_word_length': 4.940758293838862, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 11, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '273302', 'n_tokens_mistral': 766, 'n_tokens_neox': 720, 'n_words': 277}