In ray, by default, the alpha-zero algorithm is for one-player game.
Now, you can specify if your game is made for one or two players.
You just have to set the mcts
parameter is_two_players to True
Example:
# === MCTS ===
"mcts_config": {
"puct_coefficient": 1.0,
"num_simulations": 30,
"temperature": 1.5,
"dirichlet_epsilon": 0.25,
"dirichlet_noise": 0.03,
"argmax_tree_policy": False,
"add_dirichlet_noise": True,
"is_two_players": True,
}
Some games along with their trained agent are implemented in the examples
directory.
Connect2
(To win, connect two token of your color on a board mode of 1 row and 4 columns)Tic Tac Toe
Connect4
For Connect2
and TicTacToe
, their trained agent plays perfectly.
Ray is packaged with the following libraries for accelerating machine learning workloads:
Tune
: Scalable Hyperparameter TuningRLlib
: Scalable Reinforcement LearningTrain
: Distributed Deep Learning (beta)Datasets
: Distributed Data Loading and Compute
As well as libraries for taking ML and distributed apps to production:
Serve
: Scalable and Programmable ServingWorkflows
: Fast, Durable Application Flows (alpha)
There are also many community integrations with Ray, including Dask
, MARS
, Modin
, Horovod
, Hugging Face
, Scikit-learn
, and others. Check out the full list of Ray distributed libraries here.