Skip to content

Commit 9e99490

Browse files
author
asdfjkl
committed
flat directory structure for chapter 4 (easier to execute)
added README.txt for instructions
1 parent cef52a4 commit 9e99490

18 files changed

+59
-44
lines changed

chapter_04/README.txt

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
This contains the source code for the Hexapawn example of Chapter 4.
2+
3+
Execute the files as follows:
4+
5+
- create a command prompt and change to the this directory:
6+
7+
# generate training data for supervised learning
8+
# by solving the game with minimax
9+
python mnx_generateTrainingData.py
10+
11+
# train the network with supervised learning from the data
12+
# that was created using minimax search
13+
python sup_network.py
14+
15+
# evalute the supervised network
16+
python sup_eval.py
17+
18+
# train the network using reinforcement learning
19+
# using MCTS, i.e. in "AlphaZero-style"
20+
python rnf_train.py
21+
22+
# evaluate the network that was trained
23+
# by reinforcement learning
24+
python rnf_eval.py
25+

chapter_04/common/__init__.py

Whitespace-only changes.
0 Bytes
Binary file not shown.

chapter_04/minimax/generateTrainingData.py renamed to chapter_04/mnx_generateTrainingData.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
from HexapawnZero.common.game import Board
2-
from HexapawnZero.minimax.minimax import minimax
1+
from common.game import Board
2+
from mnx_minimax import minimax
33
import copy
44
import numpy as np
55

chapter_04/model_it0.keras

318 KB
Binary file not shown.

chapter_04/model_it10.keras

318 KB
Binary file not shown.

0 commit comments

Comments
 (0)