checkers
checkers copied to clipboard
TypeError: unsupported operand type(s) for <<
When I run game.py with either arthur or random_agent, I get the following error :
Traceback (most recent call last):
File "game.py", line 237, in <module>
status = main()
File "game.py", line 168, in main
B.make_move(cpu_1.make_move(B))
File "C:\Users\julro\Desktop\Coding\DeepCheckers\checkers-master\checkers.py", line 66, in make_move
taken_piece = int(1 << sum(i for (i, b) in enumerate(bin(move)[::-1]) if b == '1')/2)
TypeError: unsupported operand type(s) for <<: 'int' and 'float'
It doesn't always occur on the same line but it's always that same TypeError
You're probably using Python 3, in Python 3 the / operator is a floating point division, change it to // instead for integer division.