Thanks for kamildar/gym-match3 publish the baseline of building gymnasium match-3 games
-
You need to clone this repo into local first:
git clone https://github.com/htrbao/PPO_M3_Simulator
-
Install the requirements
-
Using conda:
conda create -n m3_simu python=3.9 conda activate m3_simu conda install pytorch pytorch-cuda=11.8 -c pytorch -c nvidia cd gym-match3 pip install -e . pip install -r requirements.txt
-
Using venv:
python -m venv ./venv path/to/venv/Scripts/activate pip3 install torch --index-url https://download.pytorch.org/whl/cu118 cd gym-match3 pip install -e . pip install -r requirements.txt
-
- Please refer to this notebook to know how to use gym-match3 environment.
-
You can also contribute your custom levels by append it into
LEVELS
list within gym_match3.envs.levelsFor example:
Level(h=10, w=9, n_shape=6, board=[ [-1, -1, -1, -1, 0, -1, -1, -1, -1], [-1, -1, -1, 0, 0, 0, -1, -1, -1], [-1, -1, 0, 0, 0, 0, 0, -1, -1], [-1, 0, 0, 0, 0, 0, 0, 0, -1], [ 0, 0, 0, 0, 0, 0, 0, 0, 0], [-1, 0, 0, 0, 0, 0, 0, 0, -1], [-1, -1, 0, 0, 0, 0, 0, -1, -1], [-1, -1, -1, 0, 0, 0, -1, -1, -1], [-1, -1, -1, -1, 0, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], ])
- To understand board on
wandb
, you can follow stackexchange.