The Labyrinth - Puzzle discussion

Hello 5DN1L,

Thanks for replying and your directions , I will get back at it again.

Best regards,

Th.078

1 Like

Hello all!

I built an horrible but functional code that solve all of the test cases in IDE.
When I published it, it failed two validators:

  • one of them was an AHA moment - of course I didnā€™t implement one of the features that I needed - and I corrected it.
  • the second one doesnā€™t even start, looking at the only output I can get I see ā€œTimeout: your program did not provide an input in due time.ā€
    No debug info, of course, but Iā€™m at loss on why it wouldnā€™t return on time, given I already played worse case scenario off-IDE.

Am I stuck forever with an 87% score?

Not sure what you meant by ā€œI already played worse case scenario off-IDEā€? How did you test the case off-IDE? Did you use the mini-map at the lower left corner of the replay to rebuild the case for your debugging?

I printed each input for a number of turns in a few cases that were putting pressure (AKA computing time) to my algorithm, then used that input in a local IDE (PyCharm) to do some line-by-line debugging and remove the bottlenecks.

The case that fails is not even that complex: my code had issues with the open maps and not with the labyrinths with walls.

The fact that the test case fails with my code not providing a reply is puzzling.

If you want, you may send me your codes (the one you use for IDE and the one you use for off-IDE) by private message to have a look.

No need anymore, thank you!

I did not think to infer the input from the minimap.
I did just that, tested locally, and found the error.
I do a check on maxrow when attaching a node, and used maxrow instead of maxrow -1.

Really interesting that this didnā€™t came up with the empty map case.

Now sorted, 100% achieved.

thank you!
Mikro-mx

1 Like

Thank you very well it works for me and pass the harder tests
to aviod same distance use euclidian distance

Really challenge for me. Didnā€™t give up yet. But why do I have Rick in the explanation and code comments and Kirk in console output ?

It was Kirk originally, and later for some reason (copyright?) the name was changed to Rick, but probably the staff forgot to update some instances of the name.

1 Like

:wave: Hi to all and thanks to the CodinGame team for this very good Puzzle :+1: !
ā†’ Yes, itā€™s an old puzzle, but so happy to solve it today :joy: .
I have to say that, yes : RedBlogGames helped me a lot to understand Path-finding theory, and after that, to experiment trainings in my preferred 2 languages (C# & Python) ā€¦
But, i had to train a lot before success solving it today.
=> Good luck and exercises to new users ā€¦ itā€™s a hard Puzzle ā€¦ now you know why :wink: !
By to all : have :sun_with_face: sun, :dark_sunglasses: fun and :keyboard: CodinGames :joy: ā€¦