def play_game(board_size, fnet, mcts_sims): """ Generate a single game and batch """ game_batch = [] try: eprint ("instantiating sim") simulator = MonteCarlo(board_size, fnet, mcts_sims) # Create a MCTS simulator game_batch = simulator.play_game() except: tb = traceback.format_exc() else: tb = "No error" finally: eprint(tb) return game_batch
def play_game(nrows, ncols, inarow, fnet, mcts_sims): """ Generate a single game and batch """ game_batch = [] try: eprint("Instantiating Sim") simulator = MonteCarlo(nrows, ncols, inarow, fnet, mcts_sims) # Create a MCTS simulator game_batch = simulator.play_game() except: tb = traceback.format_exc() raise # else: # tb = "No error" # finally: # eprint(tb) return game_batch