Could you list out all the coordinates in Blunder’s path as per your interpretation, so that I can more easily check where our differences lie?
Why is the LOOP test actually a LOOP? It seems like the assumption is if you cross the same space in the same status it’s an infinite LOOP and so the idea is this map should return LOOP but unless I’m wrong this map is actually solvable and that’s why my tests are failing.
###############
# IXXXXX #
# @ #
#E S #
# #
# I #
# B #
# B S W#
# B T #
# #
# T #
# B #
#N W$#
# XXXX #
###############
Path to completion
SOUTH
SOUTH
SOUTH
SOUTH
SOUTH
SOUTH
SOUTH
SOUTH
SOUTH
SOUTH
SOUTH
WEST
WEST
NORTH
NORTH
NORTH
NORTH
NORTH
NORTH
NORTH
NORTH
NORTH
NORTH
EAST
EAST
SOUTH
SOUTH
SOUTH
SOUTH
SOUTH
SOUTH
SOUTH
SOUTH
SOUTH
SOUTH
EAST
EAST
EAST
EAST
EAST
NORTH
NORTH
NORTH
NORTH
NORTH
NORTH
NORTH
NORTH
NORTH
NORTH
NORTH
EAST
EAST
EAST
EAST
EAST
SOUTH
SOUTH
SOUTH
SOUTH
SOUTH
WEST
WEST
WEST
WEST
WEST
WEST
SOUTH
SOUTH
SOUTH
SOUTH
EAST
EAST
EAST
NORTH
At Step 52, Blunder should go south instead of east.
Ok, I solved that issue handling for state correctly, but now I fail multiple loops because cells in columns 6 and 8 are traversed multiple times with the same exact state. Am I missing something in the instructions? If I can’t assess based upon just having the same exact state twice how should I go about this?
DIR CELL X Y B I
SOUTH 4 2 false false
SOUTH 4 3 false false
SOUTH 4 4 false false
SOUTH B 4 5 true false
EAST 5 5 true false
EAST X 6 5 true false
EAST B 7 5 false false
NORTH N 8 5 false false
NORTH 8 4 false false
NORTH 8 3 false false
NORTH I 8 2 false true
NORTH 8 1 false true
WEST 7 1 false true
WEST I 6 1 false false
SOUTH 6 2 false false
SOUTH 6 3 false false
SOUTH 6 4 false false
SOUTH 6 5 false false
SOUTH 6 6 false false
SOUTH 6 7 false false
SOUTH 6 8 false false
SOUTH 6 9 false false
EAST 7 9 false false
EAST 8 9 false false
EAST 9 9 false false
WEST W 9 8 false false
WEST 8 8 false false
WEST 7 8 false false
WEST 6 8 false false
WEST 5 8 false false
WEST 4 8 false false
SOUTH 4 9 false false
SOUTH B 4 10 true false
EAST 5 10 true false
EAST X 6 10 true false
EAST B 7 10 false false
NORTH N 8 10 false false
NORTH 8 9 false false
NORTH 8 8 false false
NORTH 8 7 false false
NORTH 8 6 false false
NORTH N 8 5 false false
NORTH 8 4 false false
The state of the last is the same as a previous one right down to direction, so I return loop here. I can see how the map would complete correctly, though.
They’re not the same states because the map has changed.
Hello
I need help understand inverters.
On the test n°7 I got the following map :
##########
# I #
# #
# $#
# @#
# #
# I#
# #
# #
##########
we’re starting to go south, then west, north, east and finally south. That’s the expected result.
We pass the first inverter (so the priority change to south,west,north,east) and before reaching the top right of the map we pass the second inverter than change priority again.
The expected result is that blender go south but with default priority he should try to go north then west (so he’s in a loop).
Did I miss understand something about inverter ?
Your understanding seems a bit off.
At the beginning (before encountering the first inverter), the priority is south, east, north, west (see the puzzle statement).
After reaching the first inverter, the priority changes to west, north, east, south (instead of what you mentioned in your post). Blunder will continue to go south, but upon reaching the wall on the south end, it will turn to west because of the new priority.
After reaching the second inverter, the priority changes back to south, east, north, west.