Testing the model

To let version 4, for example, of the model play against version 1, first create a new directory path by running mkdir -p run_archive/connect4/run0001/models and copy the *.h5 files from run/models to the run0001/models directory. Then change your play.py in the DeepReinforcementLearning directory to be like this:

playMatchesBetweenVersions(env, 1, 1, 4, 10, lg.logger_tourney, 0)

The first value of the 1,1,4,10 parameters means the run version, so 1 means the models are in run0001/models of run_archive/connect4. The second and third values are the model versions of the two players, so 1 and 4 means version 1 of the model will play against version 4. 10 is the number of times, or episodes, to play.

After running the python ...

Get Intelligent Mobile Projects with TensorFlow now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.