Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- h = 0
- position = state[0]
- visits = state[1:5]
- for corner, visited in zip(corners,visits):
- if not visited:
- h += abs(position[0] - corner[0]) + abs(position[1] - corner[1])
- return h
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement