Death First Search - Episode 1 - Puzzle discussion

Oh, I see. I didn’t realize that I can check the validator tests exact results and I’ve thought the IDE and validator tests were the same for this one… I’ll improve my code then.
Thanks

1 Like

I meet the same problem. Anyone can help? 52 links left but still cannot get the last achievement.

Same. :slight_smile:

Hi!
I have a problem with the last checking sequence (triple star), in the preview it works perfectly, but in the submitting test it is refused for some reason. In the view of the submiting triple star, the skynet agent go simply, my program works and the preview simply stop, the skynet agent do not move

1 Like

Sounds like your program crashed or gave invalid output.

Hello,
I am not very used to use forum, so I apologise if do something wrong.
I have the same problem on Skynet, the “si” value stays the same at the second turn on every test case… Did you solve this?

I don’t understand the link variables (N1 and N2). How do I check to see if the nodes are linked ans what do these two variables, N1 and N2 mean ?
Thank you in advane :slight_smile:

Hey, nice puzzle, but it fails only on triple star after submitting. As you can see in this picture <edit : can't upload image since I'm a new user... stupid rule> the skynet agent is stuck and can’t move anymore, so the test should pass. I think there must be an error thrown, but I can’t find which error or where it occurs. Is there any way to see error logs of sumitted tests ? Someone can help with that ?

Hey gang,

I’ve submited my results and they work fine on the testcases, but after the submit it says 1 validator has failed. So when I replay it, I see my program working fine and skynet just apparently giving up after having tried to get to 2 of the 3 gateways. I’d like to show a screenshot but apparantly new users aren’t allowed to add a screenshot. Is there anyone else experiencing this problem?

Cheers!

Almost the same for me. Mine actually can still move, but just doesn’t and the validator fails.

I did a similar approach and it worked for me, trickiest part is to learn how to properly represent the graph’s Edges and search for them. once this is done it’s just a search for the node occupied by skynet and find the matching “skynet-exit gateway”.

I got 50% the first time, added some lines a little bit but it’s down to 25%. Decided to overwrite my own algorithm with BFS that started from the virus’ position. It works! I got 100%. I just wasted 2 hours thinking the quickest algorithm by my own. Oh, at least it was fun.

L’agent n’a pas le même comportement dans le test et dans le validateur.
Peut-être que, comme moi, tu as réussi a faire plus de 50 liens restant dans le test mais pas dans le validateur.

D’ailleurs, j’en suis à ma 4ème stratégie qui échoue…

I try to solve this one with c#.
But I have some problems to find out how I can make the graph to represent the network.

Do I have to make some seperate classes for the nodes and the network or can I better use another data-type and if so, which datatype

It can be done with an array of lists, i.e.
var map = new List<int>[number of nodes];

Each list would represent the ids of the nodes that each node connects to. The list in position 0 would be the connections for node 0, etc. As nodes are cut, you remove the appropriate values from the list.

A custom class also works, though you’d still need a way to look at a particular node quickly. You can judge for yourself whether the extra code is worth it.

Thanks, I think I can solve it now

I did pass this for 100 % . And I did not used BFS.
algorithm: 1. check if spy is next to the gate: if yes > then cut the link
2. else: cut random link around the spy

For saving/representing a graph (nodes and links) I used “adjacency list” using ArrayList of ArrayLists.

1 Like

Bonjour,

C’est un très bon puzzle. Dommage que les tests ne soient pas complets

Il faudrait tester ce test
8
7
4
1-2
1-3
1-7
7-8
3-6
3-5
2-4
8
6
5
4
Skynet commence en 1
En gros il faut que l’aglo, si le skynet n’est pas au plus proche d’une sortie ne coupe pas un liens au hasard mais le bon lien

shema de l’exemple si dessus
sortie: {}
noeud: [] ou {}
liens: ---- ou |
Le skynet commence en 1
{8}----[7]----[1]----[2]----[4]
…|
…{6}----[3]----{5}

La plus part des algos vu dans les meilleurs solutions, si skynet n’est pas dans un nœud adjacent a une sortie ils (les algo) détruisent un liens au hasard (le premier lien ou dernier lien dans l’ordre de la construction de leur ‘diagramme’).
Or cette fois il ne faut détruire pas un lien au hasard mais bien le 1-3 sinon le skynet va dessus et c’est perdu car il a deux possibilités pour gagner. Or ce cas n’est teste dans aucun test. Dommage

2 Likes

Is there a bug in the way the site evaluates python scripts? My code uses graphs and BFS, and systematically finishes puzzle 4 with 56 connections left, but am not getting the 3rd achievement.

You must finish all the other validators too.