def get_turns_since(state, maximum=8):
	"""A feature encoding the age of the stone at each location up to 'maximum'

	Note:
	- the [maximum-1] plane is used for any stone with age greater than or equal to maximum
	- EMPTY locations are all-zero features
	"""
	planes = np.zeros((maximum, state.size, state.size))
	depth = 0
	# loop backwards over history and place a 1 in plane 0
	# for the most recent move, a 1 in plane 1 for two moves ago, etc..
	for move in state.history[::-1]:
		if move is not go.PASS_MOVE:
			# check that this stone wasn't captured
			if state.board[move] != go.EMPTY:
				(x, y) = move
				# check that a newer move isn't occupying (x,y)
				if np.sum(planes[:, x, y]) == 0:
					planes[depth, x, y] = 1
		# increment depth if there are more planes available
		# (the last plane serves as the "maximum-1 or more" feature)
		if depth < 1 - maximum:
			depth += 1
	return planes
dataset/ETHPy150Open Rochester-NRT/RocAlphaGo/AlphaGo/preprocessing/preprocessing.py/get_turns_since/swapped operands of `-`