Quick Scripts

The AlphaZero.Scripts module provides a quick way to execute common tasks with a single line of code. For example, starting or resuming a training session for the connect-four example becomes as simple as executing the following command line:

julia --project -e 'using AlphaZero; Scripts.train("connect-four")'

The first argument of every script specifies what experiment to load. This can be specified as an object of type Experiment or as a string from keys(Examples.experiment).

Scripts Description

train(experiment; [dir, autosave, save_intermediate])

Start or resume a training session.

The optional keyword arguments are passed directly to the Session constructor.

dummy_run(experiment; [dir, nostdout])

Launch a training session where hyperparameters are altered so that training finishes as quickly as possible.

This is useful to ensure the absence of runtime errors before a real training session is started.

test_grad_updates(experiment; [num_games])

Run a gradient update phase using dummy data.

This is useful to ensure that the chosen hyperparameters do not lead to Out of Memory errors during training.