Skip to content

Instantly share code, notes, and snippets.

@kartikkukreja
Created July 11, 2015 18:18
Show Gist options
  • Save kartikkukreja/3591944311b1e577c093 to your computer and use it in GitHub Desktop.
Save kartikkukreja/3591944311b1e577c093 to your computer and use it in GitHub Desktop.
Checkers Bot Integration
if __name__ == '__main__':
player = raw_input()
boardSize = int(raw_input())
grid = []
for i in xrange(boardSize):
grid.append(raw_input())
IsPlayerBlack = player[0] == 'b'
state = CheckersState([list(row.rstrip()) for row in grid], IsPlayerBlack, [])
move = iterativeDeepeningAlphaBeta(state, piecesCount)
print len(move) - 1
for step in move:
print step[0], step[1]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment