5DN1L
January 10, 2023, 7:21am
#22
You may try these first:
read the statement again to see if your code has missed anything.
read the previous discussion here to see if other players’ hints and experience may apply to you.
create custom cases to test your code.
check/improve/optimise your code for any inefficiencies, never-ending while loops, unreachable if-conditions, etc.
If you still get stuck after trying the above, you may ask again.
Remi
January 10, 2023, 9:41am
#23
The last validator doesn’t check something that would not be checked by an IDE test. Maybe you just need some optimisation in your algorithm.
Remi
January 10, 2023, 10:41am
#24
I checked the last validator, in comparison to the last test case, and there are more moves to do. So it might be an optimisation problem.
Hello,
I tried to redo the code but it does not validate it for test 11. I have provided the code on github along with some documentation if you want to take a look.
Remi
January 13, 2023, 7:01pm
#26
I’m not friend with python, but i ran your code on validator 11 and this is the error :
KeyError: (11, 77)
at Answer.py. in theWayTo on line 115
at Answer.py. in stepByStep on line 144
at Answer.py. in <module> on line 181
Does it help you ?
line 115 : end = p[end]
Challenging puzzle, yet very fun to solve
2 Likes
Hello,
From the error you show me, I can’t see how to fix it.
Actually my code is not working on the validator so, I thought it was working but it took too long to solve the maze 11.
m4683
February 5, 2023, 6:54pm
#29
I was able to reproduce the problem with validator 11.
Apparently it has to do with the collected set of keys.
Eg: If a route collects key “a”, another route collects key “b”, both arrive in cell X, then you mark this cell containing the two keys. In this case, even if another route passes through both keys, it will be discarded.
Solved it by creating in each cell, different sets of collected keys.
Remi
February 5, 2023, 8:06pm
#30
Did you see this problem only with validator 11 ?
m4683
February 5, 2023, 9:37pm
#31
The code described passes all tests and validators except validator 11.
The problem was with my code, not the validator.
Remi
February 5, 2023, 10:00pm
#32
Yes but the tests have to help you to debug, I should correct test 11 to make this bug appear …
m4683
February 5, 2023, 10:02pm
#33
I created this test to simulate the situation:
8 4
########
#Sa#####
##b.ABE#
########
R DL R R R R
Remi
February 6, 2023, 8:58am
#34
It can also be DR UR DR R R R with the same length, so I can’t add this test. But I understand what to do, thank you very much.
m4683
February 6, 2023, 11:14am
#35
You’re right, I think this is a better example:
8 5
########
#S.a####
##b.####
###ABE##
########
DR UR R DL DR R R
Thanks
Remi
February 6, 2023, 9:31pm
#36
Can you tell me if this test let reproduce the problem with validator 11 ?
6 12
######
#S####
##...#
##.#a#
###..#
###.##
###..#
##.#b#
##...#
#.####
##ABE#
######
DR R R DR DL DL DR DR DL L L DL DR R R
To make it easier to see :
# # # # # #
# S # # # #
# # . . . #
# # . # a #
# # # . . #
# # # . # #
# # # . . #
# # . # b #
# # . . . #
# . # # # #
# # A B E #
# # # # # #
m4683
February 6, 2023, 10:33pm
#37
Yes, this test reproduces the problem.
Remi
February 6, 2023, 10:53pm
#38
Thank you. I added this bonus test, I hope it will help everyone having a problem with Validator 11.
1 Like