def config(): conf = confs.TrainNNConfig("reversi") conf.generation_prefix = "x4" conf.overwrite_existing = True conf.next_step = 20 conf.validation_split = 1.0 conf.starting_step = 10 return conf
def breakthrough(self, gen_prefix): conf = confs.TrainNNConfig("breakthrough") conf.generation_prefix = gen_prefix conf.use_previous = False conf.next_step = 92 conf.validation_split = 0.9 conf.batch_size = 512 conf.epochs = 6 conf.starting_step = 20 return conf
def train_config_template(game, gen_prefix): conf = confs.TrainNNConfig("speedChess") conf.generation_prefix = gen_prefix conf.use_previous = True conf.next_step = 0 conf.validation_split = 0.9 conf.batch_size = 128 conf.epochs = 20 conf.starting_step = 0 conf.overwrite_existing = False return conf
def get_conf(): conf = confs.TrainNNConfig(game="cittaceot", generation_prefix="v8", use_previous=False, next_step=3, overwrite_existing=False, validation_split=0.9, batch_size=32, max_sample_count=1000000, max_epoch_samples_count=100000, starting_step=0, compile_strategy="adam", learning_rate=None) return conf
def c4(self, gen_prefix): conf = confs.TrainNNConfig("connectFour") conf.generation_prefix = gen_prefix conf.use_previous = False conf.next_step = 33 conf.validation_split = 0.9 conf.batch_size = 4096 conf.epochs = 1 conf.starting_step = 25 conf.overwrite_existing = True return conf
def get_conf_reversi(): conf = confs.TrainNNConfig(game="reversi", generation_prefix="v7", use_previous=False, next_step=15, overwrite_existing=True, validation_split=0.9, batch_size=256, epochs=3, max_sample_count=200000, max_epoch_samples_count=100000, starting_step=10, compile_strategy="adam", learning_rate=None) return conf
def speedChess(self, gen_prefix): conf = confs.TrainNNConfig("speedChess") conf.generation_prefix = gen_prefix conf.use_previous = False conf.next_step = 12 conf.validation_split = 0.9 conf.batch_size = 128 conf.epochs = 20 conf.max_sample_count = 300000 conf.starting_step = 3 conf.overwrite_existing = True return conf
def reversi(self, gen_prefix): conf = confs.TrainNNConfig("reversi") conf.generation_prefix = gen_prefix conf.batch_size = 512 conf.compile_strategy = "adam" conf.epochs = 6 conf.learning_rate = None conf.next_step = 20 conf.overwrite_existing = False conf.starting_step = 5 conf.use_previous = False conf.validation_split = 0.90000 conf.resample_buckets = [[10, 1.0], [0, 0.5]] return conf
def get_train_config(game, gen_prefix, next_step, starting_step): config = confs.TrainNNConfig(game) config.next_step = next_step config.starting_step = starting_step config.generation_prefix = gen_prefix config.batch_size = 512 config.compile_strategy = "adam" config.epochs = 8 config.learning_rate = 0.0005 config.overwrite_existing = False config.use_previous = True config.validation_split = 0.90000 config.resample_buckets = [[100, 1.0], [-1, 0.8]] config.max_epoch_size = 1048576 return config
def train_config_template(game, gen_prefix): conf = confs.TrainNNConfig(game) conf.generation_prefix = gen_prefix conf.next_step = 0 conf.starting_step = 0 conf.use_previous = True conf.validation_split = 0.95 conf.overwrite_existing = False conf.epochs = 1 conf.batch_size = 256 conf.compile_strategy = "SGD" conf.l2_regularisation = 0.00002 conf.learning_rate = 0.01 conf.initial_value_weight = 1.0 conf.max_epoch_size = 1024 * 1024 conf.resample_buckets = [[100, 1.00000]] return conf