You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Multiprocessing creates processes with the Train.py module, which has a get_tree procedure. It tries to create the MCTS.MCTS class, but the parameters of the call do not coincide with the MCTS.py file, but it does coincide with the MCTSTraining.py file, where the tree creation algorithm is different.
This is what get_tree looks like from Main.py:
# Creating and returning a tree with properties specified from the input
def get_tree(config, agent, game, dirichlet_noise=True):
tree = MCTS.MCTS(game, game.get_board(), agent, config)
return tree
And like this from Train.py:
# Creating and returning a tree with properties specified from the input
def get_tree(config, agent, game, dirichlet_noise=True, seed=0):
tree = MCTS.MCTS() # (game, game.get_board(), None, config)
tree.dirichlet_noise = dirichlet_noise
tree.NN_input_dim = config.board_dims
tree.policy_output_dim = config.policy_output_dim
tree.NN_output_to_moves_func = config.NN_output_to_moves
tree.move_to_number_func = config.move_to_number
tree.number_to_move_func = config.number_to_move
tree.set_evaluation(agent)
tree.set_game(game)
# print("setting seed", seed)
tree.set_seed(seed)
return tree
This results in the following error:
Traceback (most recent call last):
File "C:\Users\user\AppData\Local\Programs\Python\Python38\lib\multiprocessing\process.py", line 315, in _bootstrap
self.run()
File "C:\Users\user\AppData\Local\Programs\Python\Python38\lib\multiprocessing\process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "c:\AZ\AlphaZero-CogitoNTNU\Train.py", line 225, in generate_data2
game_generators = [GameGenerator(config1, agent, seed=seeds[i]) for i in range(num_games_each_process)]
File "c:\AZ\AlphaZero-CogitoNTNU\Train.py", line 225, in
game_generators = [GameGenerator(config1, agent, seed=seeds[i]) for i in range(num_games_each_process)]
File "c:\AZ\AlphaZero-CogitoNTNU\Train.py", line 42, in init
self.tree = get_tree(config, agent, self.game, seed=seed)
File "c:\AZ\AlphaZero-CogitoNTNU\Train.py", line 21, in get_tree
tree = MCTS.MCTS() # (game, game.get_board(), None, config)
TypeError: init() missing 4 required positional arguments: 'game', 'start_state', 'agent', and 'Config'
The text was updated successfully, but these errors were encountered:
Multiprocessing creates processes with the Train.py module, which has a get_tree procedure. It tries to create the MCTS.MCTS class, but the parameters of the call do not coincide with the MCTS.py file, but it does coincide with the MCTSTraining.py file, where the tree creation algorithm is different.
This is what get_tree looks like from Main.py:
And like this from Train.py:
This results in the following error:
Traceback (most recent call last):
File "C:\Users\user\AppData\Local\Programs\Python\Python38\lib\multiprocessing\process.py", line 315, in _bootstrap
self.run()
File "C:\Users\user\AppData\Local\Programs\Python\Python38\lib\multiprocessing\process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "c:\AZ\AlphaZero-CogitoNTNU\Train.py", line 225, in generate_data2
game_generators = [GameGenerator(config1, agent, seed=seeds[i]) for i in range(num_games_each_process)]
File "c:\AZ\AlphaZero-CogitoNTNU\Train.py", line 225, in
game_generators = [GameGenerator(config1, agent, seed=seeds[i]) for i in range(num_games_each_process)]
File "c:\AZ\AlphaZero-CogitoNTNU\Train.py", line 42, in init
self.tree = get_tree(config, agent, self.game, seed=seed)
File "c:\AZ\AlphaZero-CogitoNTNU\Train.py", line 21, in get_tree
tree = MCTS.MCTS() # (game, game.get_board(), None, config)
TypeError: init() missing 4 required positional arguments: 'game', 'start_state', 'agent', and 'Config'
The text was updated successfully, but these errors were encountered: