Skip to content

Instantly share code, notes, and snippets.

@pragatibaheti
Last active March 13, 2020 01:54
Show Gist options
  • Save pragatibaheti/ffb3aaab96d804e1bf4022e5e889129a to your computer and use it in GitHub Desktop.
Save pragatibaheti/ffb3aaab96d804e1bf4022e5e889129a to your computer and use it in GitHub Desktop.
# assign zeros to paths and 200 to goal-reaching point
for point in points_list:
print(point)
if point[1] == goal:
R[point] = 200
else:
R[point] = 0
if point[0] == goal:
R[point[::-1]] = 200
else:
# reverse of point
R[point[::-1]]= 0
# add goal point round trip
R[goal,goal]= 200
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment