Mission to Mars – Results from the Worlcup of 01/25/2014


On Saturday January 25th, though the moon was beginning to rise, we had all eyes fixed on Mars where, hundreds of millions of miles from here, Opportunity continues to survey the craters at her top speed of 5cm per second.

Your mission for this contest was no less: to land the module containing Opportunity and disembark the rover safe and sound on the Martian floor in increasingly complex configurations. The approach to the problem could be a little puzzling, we admit, compared to the exercises that we usually present, and with a higher degree of difficulty, but in the end, in light of the results that we had, it seems that this challenge won the day hands down.

And if you are part of those who worked several hours but for whom the score didn’t meet your expectations, assure yourself it was hard for everyone, and the most important thing is to have had the pleasure of taking part :)

To thank you for your perseverance, we take the opportunity to offer CodinGame stickers to those who requested them! Just ask us: coder [at] codingame.com



jan. 25 17:48:56 <Ammar_>  what if there is hostile form of life on Mars? I didn't bring my BB gun. :S

1st exercise: Mars Lander Level 1

For this challenge, we left the traditional algorithmic question behind to immerse you in a NASA-type landing simulator. To start smoothly, it was necessary to proceed with a simple vertical landing. Prerequisite: detect the floor to touch down without mishap (and not like a klutz, falling in a heap). A few judiciously directed upward thrusts sufficed to avoid dismally crashing Opportunity.

2nd exercise: Mars Lander Level 2

jan. 25 20:11:42 <obourgain> After lot of efforts, I can pass 4 test cases for question 2. Watching the lander find its path is just amazing.

Here it gets more complicated: the trouble was to find the landing zone, to not descend too much and to take it easy with the gas power to manage the fuel gauge (at risk of miserably crashing anew in a heap). And despite everything, it wasn’t obvious to also manage the speed of approach, the rotation for leaving on the correct side, to take off again… But in the end there was no need to find a route with respect to the ground (even if it was necessary to land in a flat area).

3rd exercise: Mars Lander Level 3

jan. 25 21:24:10 <skypers> I just screwed
jan. 25 21:24:14 <skypers> dammit!

As everyone knows, there are caves on Mars (yes, yes!) and this eventuality had to be taken into account by the brilliant engineers of NASA (of whom you are a part).

Ultimate problem: this time there were obstacles. Thus a makeshift job could not do, it was necessary to break out some math and a touch of physics to detect the walls and calculate the trajectory of the vessel in advance. The real algorithmic element came down to applying the methods of path finding –– an extremely arduous task that gives all the more reason to congratulate those who made it!

Why, in the end, “hardcoding” couldn’t work:
For the 2nd and 3rd problems it wasn’t possible to trace a predefined path for Opportunity. Indeed, let it be repeated, the validators are in the end always different than the usecases given in the statements. Warning: neither are we looking to trap you –– the validators are consistently very close to the proposed tests (here the difference is a close shave of only a few meters downwards).

>>> You can redo these exercises via the training page.


The first to achieve a 100% is pulse (01:34:30) in C#, followed by kangz (01:43:23 in Python 3) and by where-is-s (2:40:24 in C++). Bravo to all three!


Find the rankings and the leaderboard by language with the link to the source code of participants: http://www.codingame.com/cg/#!ranking:21

As promised, the Top 10 globally ranked participants win a CodinGame t-shirt, as well as the first finishers in the ranking by language who have a score greater than or equal to 50%.

For the first time among the Top 10 participants, Python 3 and Haskell are represented!

To see the source code of the participants with a replay of the landing of Opportunity, click the buttons { }

For each question, to see the replay of your landing, use the "play" buttons next to the validators:

1st in each Programming Language
TOP 10 
  1. pulse (100% 01:34:30 C#)
  2. kangz (100% 01:43:23 Python 3)
  3. where-is-s (100% 02:40:24 C++) 
  4. MrAaaah (100% 02:40:30 Python)
  5. Achess (100% 02:48:23 C#)
  6. SimonB (100% 03:06:56 Haskell)
  7. codename68 (100% 03:20:13 C++)
  8. I208iN (100% 03:25:45 C++)
  9. serhiyb (100% 03:25:56 Java)
  10. Ilya (100% 03:33:56 Python)
Java : serhiyb (100% 03:25:56 Java)
C++ : where-is-s (100% 02:40:24 C++)
Python : MrAaaah (100% 02:40:30)
Python 3 : kangz (100% 01:43:23 Python3)
C : Doraj (90% 04:12:39)
PHP : Pixel166 (100%  03:42:27)
C# : pulse (100% 01:34:30 C#)
Javascript : sadiquo (100% 04:41:36)
Ruby : floum (100% 04:45:40)
Scala : Ironc2 (100% 04:41:32) (Only 17 years old!)
Perl : Kwaio (80% 03:17:13)
Haskell : SimonB (100% 03:06:56 Haskell)
Objective C : zubin29 (75% 04:38:03)
Go : yann (90% 03:18:27)
Dart : grosplant (90% 04:00:33)


Among the 1,524 registered, 963 participants made it to the end of the Mars Lander adventure.

The entrants come from 56 different countries. In the Top 10 of most represented countries: France, India, Morocco, Russia, Tunisia, Ukraine, Brazil, USA, Romania, UK.


jan. 25 22:55:29 <Ammar_> It was the most fun I had in decades. Thank you guys for making this possible.

jan. 25 23:18:12 <VonRickRoll> admin_* : Congratulations on you guys and thank you :) good luck on the follow-up of the challenge ^^

jan. 25 23:35:00 <dolmen> It would be interesting to show ranking by fuel usage… my remaining fuel for question 1: 3021. Anyone better?

« I would like tot say I really enjoyed the challenge. I participated for fun and fun is what I had. » bolemeus

No comments

Post a Comment