On the Double Agent level i managed to beat the level doing it incorectly.
by just having my pet move to the middel x
using this code
and following it i can beat the level.
1st condition when I submit the middle path happens to be the correct path
2cnd condition (just clicking run and not submit) the ogres are still there but i get knocked around and codecombat decides that i did it correctly
pics below show steps on what happens