The competition called “Back to the Code” marked our return to multiplayer games. The mission of the game was to help Doc and Marty to get the Almanac before Bif Tannen put his paws on him. To achieve the goal, they had one secret weapon: a trick with which they could go back in time and change the course of things ... for better or for worse.
Members

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

Programming languages
Language Popularity

Counting Language Account

Podium and ranks
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.
A 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 neutral color field, or surround neutral cells with his own. In addition, to add a little pepper, you could go back in time and play differently!
As a first approach to the solution, it was possible to use the first rule: to move to cells of 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 viewing the entire grid and determining the coordinates, which reduced the Manhattan distance. This algorithm could be improved with the help of various heuristic methods, in particular, by avoiding cells that were located closer to the enemy than you, as you approach 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 get into the first 1000, but if we talk about a higher level of the game, you would have to concentrate on surrounding neutral cells. A popular solution that would allow you to enter the first hundred was to create a list of possible quadrilateral regions around your position and select the most promising. All magic is enclosed in an algorithm that calculates how good your chosen area is. Excellent mix of risk and reward.
And finally, the players had the opportunity to travel through time, but only once in each of the rounds. This greatly expanded the number of possible strategies. A jump in time could be used to go back and try to block a large piece of the grid from being captured by one of their opponents, or change their strategy to be more cautious or aggressive, given the behavior of your opponents.
How was your game going? Tell us where your wits show up and about the choice of strategy on
our forum .
And for those who could not take part in the game on its day, you can try your hand at the
Multiplayer section on the CodinGame website.