Blunder - Episode 1 - Puzzle discussion

On the top of the test zone, there’s a “list” icon. By clicking on it you can see the answer expected for each test case.
Here your answer takes too much moves, and the first difference with the valid solution is a “NORTH” instead of a “SOUTH”.

thanks a lot for the answer
but I did actually understand
What I don’t get is why NORTH
image

My unserstanding from the above sentence was that after east we should try go North
But I think I misunderstood,
Maybe we should always try SOUTH first

Ah yes. You always have to try from the list start.

Hello,
Row 2 of the Multiple Loops test is as follows:

#@#I T$#

Bender is to the left of ‘T’, heading North, and having just passed its first inverter.
Bender can’t go further North because there is a wall on Row 1.
Since directions are inverted once, Bender should now go East, according to Rule 6.
However, the test is showing Bender going West instead.
What rule am I misunderstanding?
Thank you,
John

Never mind. Got it.


How it’s possible ? :crazy_face:

Your code must be incorrectly handling a situation present only in this one validator.
I don’t know what that validator looks like, but they are usually very similar to the corresponding test case.

In settings you can enable Expert mode - that gives you access to custom test cases.
My advice would be to try some different variations of the first test case.

For example

5 5
#####
#  $#
#   #
#@  #
#####

Expected output:

EAST
EAST
NORTH
NORTH

2 Likes

this is happening to me also…did you figure it out?

could you post the case for the first validator? (Simple moves) i’m passing all tests but that one. thanks!

here you go:

#####
# @ #
#   #
#   #
#  $#
#####

SOUTH
SOUTH
SOUTH
EAST

thank you!

I fail the last test, which is fine, but the message confuses me. This is the output:

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

SOUTH

LOOP

### Failure

Found:

SOUTH...

Expected:

LOOP

As you can see, my last input is “LOOP”, but the tests says that “SOUTH…” is found.

The test could be complaining about a previous step, but in the other tests I always got catched in the wrong step, not at the end.

If that’s the reason, it would be useful that the test specifies which step is wrong, like this is quite difficult to find, more because when I put debug traces, then it is truncated at some point and I cannot see all the flow.

Thanks a lot.

Okay, I misunderstood, I thought in case of loop we should write everything until we realize the LOOP, but it was avoid to write anything but LOOP.

Kind of stuck in the second test. For some reason while moving east and hitting an obstacle the console is telling me i should have moved south instead of north (there’s no reversal in the map)

You are supposed to try south direction first if the current direction would land you on an obstacle…

When Bender encounters an obstacle, he changes direction using the following priorities: SOUTH, EAST, NORTH and WEST.

1 Like

Yea found out the second i sent this message but then i couldn’t find the message to delete it. Thanks for the help anyway ~~~~

Hello coders :),
I’m writting the program in Java and I am getting time outs all the time. If I run the text locally everything is nice (tested locally) and smooth (like running android apps in the AVD of Android Studio). I am using a big while(true) loop with 3 switchs inside (first one for storing next posion, second one for checking map [here there ir more switch and if-else logic but ther is’t loops] and the last one for printing directions to System.out). Can anyone give me some advice on time optimization of the algorithm?

Thanks in advance,
Happy coding.

Wow what a big working loop…perhaps it’s time to take a break :grinning:.

3 Likes

Hey, loved this puzzle.
I just loved it in python but I had troubles with the last one. I figured it wasnt a loop but I didnt understand why it was looping.

Then I saw that the TP positions I saved earlier got corrupted during the run and one of the position was replaced by the other (they were both the same) so I just had a loop in the end. I dont understand why it happens. Solved it by recalculating the TP positions each round.

Hi, i don’t know if it is the right place to put this. But i can’t complete to 100% Bender, even though all test are clear and no anwser are harcoded. Is it normal ?