+ 1

Can someone help me with explanation of this code?

from position import Position import sys class FlatMCBot(object): result2value = { 0: 0, 1: 100, 2: -100, 3: 0 } def __init__(self): self.pos = Position() self.ncnt = 0 #nodes def _perft(self, state, d): if d == 0: return 1 if state.game_over() != 0: return 1 cnt = 0 ## leafs for m in state.legal_moves(): state.move(m) cnt += self._perft(state, d-1) state.is_legal(m)##?? return cnt

26th Jun 2017, 11:34 AM
NurAshir
2 Respostas
0
James, thanks you. Here u can find rest of code. Please help me with explanation. I have an exam on Wednesday. http://www.sololearn.com/app/JUMP_LINK__&&__python__&&__JUMP_LINK/playground/cOZ469dRP8wr/
26th Jun 2017, 12:01 PM
NurAshir