Death First Search - Episode 1 - Puzzle discussion

Did you commit the solution? =)

Judging by the layout of the graph and agentā€™s starting position, thereā€™s no solution which can guarantee 50 links for every possible AI behavior.
You have to rely on luck or make certain assumptions about Skynetā€™s AI.
My current solution works in IDE but does not in Validator. I got the achievement somehow, but I donā€™t remember if it was with this solution or some different one.

EDIT: I have changed the order in which links were stored in my data (from sorted to original), and now my solution leaves 50 links in both IDE and Validator. So there.

Regarde dans les tests de soumission, ce ne doit pas ĆŖtre le cas (ils different des test de lā€™IDE)

How about result? Did you manage to at least 50 links left achevement?

Yes, me, but I think I am not the only

1 Like

Probably because you donā€™t output next command, so itā€™s solution problem

Thanks guy! I will try your recipe, because my way of managing the problem seems not adapt to the problem!

there is no guaranteed way to trap the Agent with 50+ links left. Itā€™s just luck and heuristics based on AI weaknesses. And AI behaves differently in Validator. Just try to tweak your solution somehow (change order of nodes, when several links are tied for selecton, try to select a different one etc)

1 Like

Skynet AI is predictable and does not change between Test and Validator.

Maybe, but solution behavior might change, because node enumeration order is different.
If the solution traps Agent due to luck/guess rather than correctly predicting its behavior.

1 Like

Iā€™ve got a problem on this puzzle, Iā€™m writing the cod in python3. It works ok in first and second tests but, on third test, when skynet agent moves, and move is shown in console output (ā€œAgent moved from 5 to 6ā€) the input() give me again the old value of the skynet agent position ( in this case it gives me ā€œ5ā€ when it should be ā€œ6ā€)
I happens on third turn in both scenarios, Star and Triple Star.
Thereā€™s a bug maybe?

Hi ! Iā€™m facing an issue with C# :
I managed to validate test cases 1,2,3,4, no hard coding
But when I submit, I only validate 2,3,4
What is weird is that the only failed test is number 1 ??
I challenged my code with bypassing the inputs and manually initializing the test with the same conditions as the submit validator :
1 [empty] - 2 [skynet] - 0 [gateway]
In debug mode it cuts the link 2 - 0, so the AI algorithm works fine
In submit mode also (because I input the values manually)
But when I store the actual input (which is supposed to be the same) it cuts the link 1 - 2
Iā€™m suspecting an initializing issue, anyone having the same problem with C#?

I finally got the last trophy for this one - 66 links remaining in both IDE and Validator

TESTCASES:

Hey,

I think you should add one TestCase. Such one where the agent can visit multiple exits from one node.
So itā€™s important which of the exitā€™s link we be sever at first.
Otherwise itā€™s random.

(This scenario could be solved by calculating the shortest path)

I got 56 links left in the 4Āŗ test and 100 score but didnā€™t got the gold trophy =(.
i tried resubmit multiple times but nothing seems to work, help!!

the problem was that i was using a HashSet to keep track of the links, i think there;s a bug on the validator.

Basically
http://pastebin.com/gmTmBk7k 100%, 56 links left, gold achivement (using Linked list for the links)
http://pastebin.com/byAjXYJa 100%, 56 links left, NO gold achivement (essentially the same code as above but using a hash set)

Thanks, your idea is really simple and it was very helpful for me to pass this challenge with a result of 100% :slight_smile:

Iā€™m seeing a strange behavior when solving the 4th test case in Python3. The first three tests work flawlessly then it seems to hang on the input() command to retrieve the skynet location on the very first loop.

Has anyone else had a problem like this?

snippet

  while True:
        print("Gather si.", file=sys.stderr)
        si = int(input())  # The index of the node on which the Skynet agent is positioned this turn
        print("Building Graph.", file=sys.stderr)
        p.build_graph()

output

Gather si.
Game information:
Timeout: your program did not provide an input in due time.

Your code seems to run forever.

I agree. I think it blocks on input() then never gets the index of the Skynet agent from the test app. If it is an issue with the tester then other people should have similar problems.

I donā€™t know of a different way to debug this - I wrapped the input() with a debug print just before and right after that line. The first print fires but the second never does. I even commented out the build_graph() method to see if that just took too long, but it seems to never reach that line.

Was the Python3 tester changed in some way recently? Or (more likely) am I missing something simple?