Downloads · 30 days
1
3% of all-time downloads
capser54/gomoku-maskable-ppo-stage3-h6
gomoku-maskable-ppo-stage3-h6 is a reinforcement learning model from capser54. Use it for the reinforcement learning task on the model card, and read the license before you ship it in a product. It is set up for stable-baselines3.
This repository contains a compact release of a Gomoku (9x9, connect-5) agent trained with MaskablePPO from sb3-contrib.
Downloads · 30 days
1
3% of all-time downloads
All-time downloads
38
Public
Repo size
18.1 MB
Likes
0
Public
Click a slice to open those files.
.zip18.1 MB · 99%
From the Hugging Face model README
This repository contains a compact release of a Gomoku (9x9, connect-5) agent trained with MaskablePPO from sb3-contrib.
best_model/best_model.zip: best checkpoint selected by evaluation callbackbest_model/evaluations.npz: raw evaluation callback outputgomoku_maskable_ppo_final.zip: final checkpoint at the end of traininggomoku_rl/: environment, opponents, and custom CNN feature extractor required to load the modelplay.py: local browser game against the agentevaluate.py: evaluation scriptmetrics_summary.json: compact summary of tracked metricsupload_to_hf.py: helper for uploading this prepared folder95MaskablePPOGomokuCNN)models_stage3_h5 and continued in models_stage3_h6Training command used for this stage:
python train.py --resume-from models_stage3_h5/best_model/best_model.zip --opponent heuristic --heuristic-search-depth 1 --heuristic-max-candidates 4 --heuristic-early-max-candidates 6 --vec-env subproc --n-envs 8 --total-timesteps 5000000 --models-dir models_stage3_h6 --log-dir logs_stage3_h6 --eval-opponent heuristic --eval-freq 500000 --eval-games 100
13350000 timesteps13850000 timesteps1.52491.4882The following checks were run locally after packaging:
depth=1, radius=2, max_candidates=4, early_max_candidates=65047 / 3 / 094%depth=1, radius=2, max_candidates=4, early_max_candidates=65038 / 10 / 276%The best checkpoint is stronger than the final checkpoint for this release, so best_model/best_model.zip is the recommended file.
pip install -r requirements.txt
from sb3_contrib import MaskablePPO
model = MaskablePPO.load("best_model/best_model.zip")
Because the policy uses a custom feature extractor, keep the gomoku_rl/ package next to the model files or in your Python path.
python evaluate.py --model-path best_model/best_model.zip --opponent heuristic --games 100 --opponent-search-depth 1 --opponent-max-candidates 4 --opponent-early-max-candidates 6
python play.py --model-path best_model/best_model.zip --host 127.0.0.1 --port 8000 --human-first
If you cloned or copied this release locally and want to publish it under your own Hugging Face account:
python upload_to_hf.py
Or specify a target repository explicitly:
python upload_to_hf.py --repo-id your-name/gomoku-maskable-ppo-stage3-h6