Back to the Code - Competition Report

Original author: Aude Barral
  • Transfer
image

A contest called “Back to the Code” marked our return to multiplayer games. The mission of the game was to help Doku and Marty get the Almanac before Bif Tannen put his paws on it. To achieve their goal, they had one secret weapon: a trick with which they could turn into the past and change the course of things ... for better or for worse.


Members


image

Among 110 countries represented, the top ten by the number of participants were: France, India, USA, Russia, Germany, Ukraine, Hungary and Brazil.

Top 10 students


image

Programming languages


The popularity of languages


image

Programming Language Score


image

Podium and grades


Thanks to all 6285 participants who competed in this game. After 8 days, 2018 participants reached the finish line: congratulations to all! On the podium: Recar (Ukraine, C ++), AlexSurin (Russia, Javascript), and Olaf69 (France, C ++). Clear and impressive. Great job, friends.

The game


The goal of the game was to help McFly capture the maximum number of cells in the grid. To achieve this, the player had two options: either move to a field of neutral color, or surround neutral cells with his own. In addition, to add a little pepper, you could go back in time and play differently!

As the first approach to the solution, the first rule could be used: move to cells of a neutral color in order to capture them. The easiest move is to find the nearest neutral cell and move along the coordinates of this cell. This was done by looking at the entire grid and determining the coordinate, which reduced the Manhattan distance. This algorithm could be improved using various heuristic methods, in particular avoiding cells that were closer to the enemy than to you, as you get closer to the end of the game. Another possibility is to give preference to a group of cells in the distance, rather than one, but located nearby.

This approach was sufficient to hit the first 1000, but if we talk about a higher level of the game, you would have to concentrate on the environment of neutral cells. A popular solution that would allow you to enter the first hundred was to create a list of possible quadrangular areas around your position and choose the most promising one. All the magic is in an algorithm that calculates how good your chosen area is. A great mix of risk and reward.

And finally, the players had the opportunity to travel in time, but only once in each of the rounds. This has greatly expanded the number of possible strategies. A time jump could be used to return and try to block the capture of a large piece of the grid by one of your opponents, or change your strategy to a more cautious or aggressive one, given the behavior of your opponents.

How was your game progressing? Tell us in what places your ingenuity appeared and about the choice of strategy on our forum .

And for those who could not take part in the game on the day of its holding, you can try your hand at the Multiplayer section on the CodinGame website.

Also popular now: