CHANGE: use piece value function as an initial dlshogi model #482
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run DL-Shogi Training | |
on: | |
push: | |
branches: [ main, develop, tmp ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
game: [ | |
{name: animal_shogi, rl_cycle: 5, nn_backbone_blocks: 3}, | |
{name: minishogi, rl_cycle: 4, nn_backbone_blocks: 3}, | |
{name: judkins_shogi, rl_cycle: 3, nn_backbone_blocks: 3}, | |
{name: shogi, rl_cycle: 1, nn_backbone_blocks: 2}, | |
] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.11 | |
- name: Upgrade pip | |
run: python -m pip install --upgrade pip | |
- name: Install dependencies | |
run: pip install .[dlshogi] | |
- name: Run command | |
env: | |
NAME: ${{ matrix.game.name }} | |
CYCLE: ${{ matrix.game.rl_cycle }} | |
BACKBONES: ${{ matrix.game.nn_backbone_blocks }} | |
run: python examples/dlshogi.py rl $NAME --rl_cycle $CYCLE --nn_backbone_blocks $BACKBONES --mcts_explorations 200 --self_play 100 --win_ratio_threshold 0.1 | |
- name: Evaluate model | |
env: | |
NAME: ${{ matrix.game.name }} | |
CYCLE: ${{ matrix.game.rl_cycle }} | |
run: python -m vshogi $NAME --player1 $NAME/models/model_0000.tflite --player2 $NAME/models/model_$(printf %04d $CYCLE).tflite |