maxpumperla / deep_learning_and_the_game_of_go

Code and other material for the book "Deep Learning and the Game of Go"
https://www.manning.com/books/deep-learning-and-the-game-of-go
953 stars 387 forks source link

ValueError: max() arg is an empty sequence #23

Open aletote opened 5 years ago

aletote commented 5 years ago

I get this error when running zero_demo.py, what is the probiem?

macfergus commented 5 years ago

Hi aletote, can you provide a full stack trace?

aletote commented 5 years ago

(base) ales-MacBook-Pro:code ale$ python3 zero_demo.py Using TensorFlow backend. WARNING:tensorflow:From /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tensorflow/python/framework/op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version. Instructions for updating: Colocations handled automatically by placer. 2019-03-21 12:30:54.012048: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA Starting the game! Traceback (most recent call last): File "zero_demo.py", line 78, in simulate_game(board_size, black_agent, c1, white_agent, c2) File "zero_demo.py", line 23, in simulate_game next_move = agents[game.next_player].select_move(game) File "/Users/ale/Desktop/deep_learning_and_the_game_of_go-master/code/dlgo/zero/agent.py", line 96, in select_move next_move = self.select_branch(node) File "/Users/ale/Desktop/deep_learning_and_the_game_of_go-master/code/dlgo/zero/agent.py", line 142, in select_branch return max(node.moves(), key=score_branch) # <1> ValueError: max() arg is an empty sequence

macfergus commented 5 years ago

Aha, I believe this bug is fixed in the chapter_14 branch. Can you check out that branch and try again? Sorry for the confusion-- we need to clean out the duplicate versions of some of the code samples

Dirtyboy1029 commented 3 years ago

Has the problem been solved? Please give the code