Closed lang07123 closed 1 year ago
(SnakeAI) PS E:\ai-demo\snake-ai-master\main> python .\train_cnn.py
Using cuda device
Wrapping the env in a VecTransposeImage.
Process SpawnProcess-28:
Traceback (most recent call last):
File "D:\miniconda3\envs\SnakeAI\lib\multiprocessing\process.py", line 315, in _bootstrap
self.run()
File "D:\miniconda3\envs\SnakeAI\lib\multiprocessing\process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "D:\miniconda3\envs\SnakeAI\lib\site-packages\stable_baselines3\common\vec_env\subproc_vec_env.py", line 30, in _worker
observation, reward, done, info = env.step(data)
File "D:\miniconda3\envs\SnakeAI\lib\site-packages\stable_baselines3\common\monitor.py", line 95, in step
observation, reward, done, info = self.env.step(action)
File "D:\miniconda3\envs\SnakeAI\lib\site-packages\gym\core.py", line 289, in step
return self.env.step(action)
File "E:\ai-demo\snake-ai-master\main\snake_game_custom_wrapper_cnn.py", line 47, in step
self.done, info = self.game.step(action) # info = {"snake_size": int, "snake_head_pos": np.array, "prev_snake_head_pos": np.array, "food_pos": np.array, "food_obtained": bool}
File "E:\ai-demo\snake-ai-master\main\snake_game.py", line 96, in step
self.sound_game_over.play()
AttributeError: 'SnakeGame' object has no attribute 'sound_game_over'
Traceback (most recent call last):
File "D:\miniconda3\envs\SnakeAI\lib\multiprocessing\connection.py", line 312, in _recv_bytes
nread, err = ov.GetOverlappedResult(True)
BrokenPipeError: [WinError 109] 管道已结束。
bugfix: train error when the slient_mode is True.