Shadows of the Knight - Episode 1 - Puzzle discussion


#1

Feel free to send your feedback or ask some help here!

[]()


#2

Level 2 of this one doesn't seem to be anywhere. Is it normal ?


#3

It is called triangulation, un the very hard puzzle section


#4

Oh, right. Thanks !


#5

I'm running this one in Go. Has anyone had this error?

Invalid input: expected 'x y' but got: '3 5'.


#6

Are 3 5 valid coordinates in the test you are running ? If so, have you put the end line character after the line you print ?


#7

Got it, just let Println add the space for you, as in fmt.Println(x, y) instead of fmt.Println(x, " ", y)


#8

Did it with four IFs, seven assignments, and two simple mathematical operations. I dare you to do better, I DOUBLE DARE YOU, CODEHACKER! smiley

Seriously, bisection method is more than enough for this one. Skynet: the Virus have given me much more pain.

P.S. Am I qualified to be batman now? ^_^


#9

Alright guys, got all the tests but the last one to pass. I think this is because of truncation in int divisions. (ie 3/2=1).

Any idea on this matter ?


#10

I had a problem with the second to last test, 'Evasive', due to integer division. I solved it by doing double division and taking the ceil. Also, it might be a good idea to make sure you always move at least one step in the desired direction, i.e. step = max(1, step). Hope this helps!


#12

I used integer division and everything worked out fine.


#13

passed every test, on puzzle choosing screen it says 60\60 CP (whatever that it), 2\2 achievements, but 0% done. why?


#14

same here... how come?


#15

Just wait a couple of hours. Problem fixed by itself after some time passed.


#16

I tried bissection but what about the "evasive" test?
When the bomb is at the top left forner


#17

Bisection method? I'm afraid I'm not a mathematician. Are there any sites or links that can explain this concept?


#18

If I can give you a hint, activate debug mode, it'll be clearer winkYou just need to divide the distance by two each time you jump and you'll be alright


#19

I meant with the bissection methode (dividing the distance by two) because the bomb is at the top of the building (y = 0) on the "evasive" test, you'll need 8 jumps to find it. But you are allowed to do only 7 jumps smileySo you need to do a little trick about this one stuck_out_tongue


#20

I just checked my code, i only need 7 jump and I did the bissection method like you described, with no further tricks stuck_out_tongue


#21

Agree, the same for me. simple (minCoord + maxCoord) / 2 does the trick pretty well.

Probably some language related stuff like rounding?