alpha-zero-general icon indicating copy to clipboard operation
alpha-zero-general copied to clipboard

Not able to run main.py on m1 chipped machine

Open alicezou opened this issue 4 years ago • 1 comments

Hi, I got assertion error on m1 chipped machine. I git clone directly from the main branch. I was able to run on my other computers or google coLab.

Attached is the log that I got: 2021-11-10 13:30:51 alicezous-Mac-mini.local main[11455] INFO Loading OthelloGame... 2021-11-10 13:30:51 alicezous-Mac-mini.local main[11455] INFO Loading NNetWrapper... 2021-11-10 13:30:51 alicezous-Mac-mini.local main[11455] WARNING Not loading a checkpoint! 2021-11-10 13:30:51 alicezous-Mac-mini.local main[11455] INFO Loading the Coach... 2021-11-10 13:30:51 alicezous-Mac-mini.local main[11455] INFO Starting the learning process 🎉 2021-11-10 13:30:51 alicezous-Mac-mini.local Coach[11455] INFO Starting Iter #1 ... Self Play: 0%| | 0/100 [00:00<?, ?it/s]2021-11-10 13:30:51 alicezous-Mac-mini.local MCTS[11455] ERROR All valid moves were masked, doing a workaround. Self Play: 0%| | 0/100 [00:00<?, ?it/s] Traceback (most recent call last): File "/Volumes/S/EECS592/alpha-zero-general/main.py", line 57, in main() File "/Volumes/S/EECS592/alpha-zero-general/main.py", line 53, in main c.learn() File "/Volumes/S/EECS592/alpha-zero-general/Coach.py", line 89, in learn iterationTrainExamples += self.executeEpisode() File "/Volumes/S/EECS592/alpha-zero-general/Coach.py", line 58, in executeEpisode pi = self.mcts.getActionProb(canonicalBoard, temp=temp) File "/Volumes/S/EECS592/alpha-zero-general/MCTS.py", line 38, in getActionProb self.search(canonicalBoard) File "/Volumes/S/EECS592/alpha-zero-general/MCTS.py", line 122, in search next_s, next_player = self.game.getNextState(canonicalBoard, 1, a) File "/Volumes/S/EECS592/alpha-zero-general/othello/OthelloGame.py", line 43, in getNextState b.execute_move(move, player) File "/Volumes/S/EECS592/alpha-zero-general/othello/OthelloLogic.py", line 111, in execute_move assert len(list(flips))>0 AssertionError

alicezou avatar Nov 10 '21 18:11 alicezou

This may have been fixed; I'm able to run just fine on an M1 in the current build, though not with pytorch's new mps device support.

dweekly avatar Sep 09 '22 00:09 dweekly