Exemplo n.º 1
0
def make_gtp_instance(read_file,
                      readouts_per_move=100,
                      verbosity=1,
                      cgos_mode=False,
                      kgs_mode=False):
    n = DualNetwork(read_file)
    if cgos_mode:
        instance = CGOSPlayer(n,
                              seconds_per_move=5,
                              timed_match=True,
                              verbosity=verbosity,
                              two_player_mode=True)
    elif kgs_mode:
        instance = KGSPlayer(network=n,
                             simulations_per_move=readouts_per_move,
                             verbosity=verbosity,
                             two_player_mode=True)
    else:
        instance = MCTSPlayer(network=n,
                              simulations_per_move=readouts_per_move,
                              verbosity=verbosity,
                              two_player_mode=True)
    name = "Minigo-" + os.path.basename(read_file)
    gtp_engine = gtp_extensions.GTPDeluxe(instance, name=name)
    return gtp_engine
Exemplo n.º 2
0
def make_gtp_instance(board_size,
                      read_file,
                      readouts_per_move=100,
                      verbosity=1,
                      cgos_mode=False):
    n = DualNetRunner(read_file)
    instance = MCTSPlayer(board_size,
                          n,
                          simulations_per_move=readouts_per_move,
                          verbosity=verbosity,
                          two_player_mode=True)
    gtp_engine = gtp.Engine(instance)
    if cgos_mode:
        instance = CGOSPlayer(board_size,
                              n,
                              seconds_per_move=5,
                              verbosity=verbosity,
                              two_player_mode=True)
    else:
        instance = MCTSPlayer(board_size,
                              n,
                              simulations_per_move=readouts_per_move,
                              verbosity=verbosity,
                              two_player_mode=True)
    name = 'Somebot-' + os.path.basename(read_file)
    gtp_engine = gtp_extensions.GTPDeluxe(instance, name=name)
    return gtp_engine
Exemplo n.º 3
0
def make_gtp_instance(read_file,
                      readouts_per_move=100,
                      verbosity=1,
                      cgos_mode=False):
    # n = DualNetwork(read_file)
    fn = "/private/home/zhuoyuan/AlphaGo/ELF2_models/save-1661000.bin"
    # fn = "/Users/zhuoyuan/Exp/AlphaGo/ELF2_models/save-1661000.bin"
    n = DualNetwork(fn)
    if cgos_mode:
        instance = CGOSPlayer(n,
                              seconds_per_move=5,
                              verbosity=verbosity,
                              two_player_mode=True)
    else:
        instance = MCTSPlayer(n,
                              simulations_per_move=readouts_per_move,
                              verbosity=verbosity,
                              two_player_mode=True)
    # name = "Somebot-" + os.path.basename(read_file)
    name = "Somebot"
    gtp_engine = gtp_extensions.GTPDeluxe(instance, name=name)
    return gtp_engine