For six years in a row, we (Mail.Ru Group) together with SSU have been holding the Russian Ai Cup (a contest for writing game bots). We invent the game world, write APIs to it and confront strategies written by the participants. It turns out every time is quite interesting, original, and in general it is the largest annual competition in the CIS in AI!
Under the same sauce, in the fall of 2017, we wrote, launched, and held the first contest on another site, MiniAiCups , turned out to be a mini-clone Russian Ai Cup with its strange atmosphere, rules and mechanics. I liked very much, and, after the distribution of prizes, we, on the sly, promised another contest. And finally, we are happy to invite everyone to participate in it.
There is a game world that lives according to certain laws. Out of this world, the API sticks out (just a text protocol). In accordance with this API, a player's strategy written in his favorite language reads (simply from STDIN) changes in the state of the world in a loop and sends (simply to STDOUT) his actions. This is how the game itself takes place. Technical details - at the end of the post.
All championship games will be held in 4x1 format (4 players in the game, every man for himself). The game can be rated (affects the placement of players in the rating table) and non-rated (just a duel, look at the opponent, test the strategy, a sort of sandbox).
March 28 - we open a contest, non-rated games start at 7500 ticks (a tick is one indivisible unit of time in the game world)
April 2 - start of rating games for 7500 ticks (every few minutes the system will start several games, selecting participants according to the trueskill system and scoring points based on the results)
April 19 - TOP participants from the sandbox pass to the final, we stop the rating games and give the opportunity to create non-rated games of 25,000 ticks
April 23 - we completely stop the sandbox and hold the final. It will be a lot of games with 40,000 ticks, we will select them in such a way that in the framework of 4x1 games everyone will play with each. Then we give prizes (about them below), all participants of the final traditionally receive T-shirts as a keepsake
On April 26, we will turn back the sandbox with non-rated games, and this task will become the second (together with the autumn puzzle), which will remain working forever.
This is how it will be. We tried to make it so that between the important events of the competition there were as many days as possible. Everything is for you.
And everything is simple. We took agar.io , admired and decided to make a contest on the mechanics of this wonderful game. Made. Then it seemed to us that it was too simple. Added inertia when moving, some physics ... Still rustic. Okay, they thought and decided to put on each game their own set of coefficients of inertia, acceleration, weight gain and all that constitutes the physics of this strange world. On this we stopped.
Thus, the player’s task is to first deal with the current physical laws (either everything flies on the playing field, instantly stopping and turning, or creeps inertia, trying to go somewhere in orbit). Well, and only then comes such a sweet heart "eat-them-all." More detailed rules - below, after the prizes (yes, there are prizes).
For the first place we give a new MacBook Air (or equivalent in value, the participant will have the opportunity to express their own wishes).
Second and third places - Apple iPad
From fourth to sixth place - Samsung Gear S3. But, to be honest, we ourselves do not know what to give, jot down options in the comments. We are a community.
According to tradition, all those who passed to the final will receive T-shirts with our symbolism.
Here I will try to informally describe the rules so as to convey the essence of the mechanics of the championship. So:
Let's start with shock content - we have a rectangular playing field! No one ever did, and here again :)
The countdown of coordinates begins from the upper left corner. Each object on the field has two coordinates, a mass and a velocity vector. Every object is a circle.
Before the start, the player’s strategy reads in the game world a series of physical coefficients according to which the game world will live. It is a measure of inertia, a measure of mass growth, maximum speeds, and so on. For each game we generate random variables (within certain limits).
At the beginning of the game in the world randomly (but symmetrically from the central axes) there are four players, each represented by his chosen strategy. The mass of each is still small, the speed is zero. It is time to move, otzhirayatsya and grow, this is the essence of victory. We specify the motion vector (in fact, two coordinates) and start to pick up speed in accordance with the coefficient of inertia defined in this game, mass, etc. (all this will be described in detail in the full rules at the start of the championship). In short, the greater the mass of the object, the less responsive it reacts to attempts to give it an impulse, in addition, the maximum speed that it can develop is limited.
There are two ways to increase your own mass (and this should be done, since the player loses this mass over time):
Firstly, a certain amount of “food” is scattered over the playing field - these are small stationary objects that have a certain mass. When overlapping such an object, the player adds a mass of such an object to himself, and the object is destroyed. From time to time, food is added to the playing field (in a random place, but equivalent to the four sides of the field).
Secondly, you can eat each other. If two players overlap completely, the one that is more adds to itself the mass of that which is less. Eaten is taken out from the field. Well, until the end of the game.
In fact, it is a virus in the terminology of agar.io. A number of death stars are randomly located on the map. If a player already exceeding the mass of a death star collides with it, then the death star is destroyed. The player throws an explosion into several smaller parts (their number, masses and impulses depend on many parameters). After that, the player controls already all these objects in a crowd (giving them the impulse vector to the same point). In this form, the player is easier to gobble up, but the speed and response of smaller objects is higher. In contact with each other, the parts of the whole merge, so that it is possible to assemble back into something big.
In addition to movement, the player’s strategy has two more actions:
Division Each of the player-controlled parts is divided exactly into 2 parts.
Mass ejection . Each of the player-controlled parts ejects a small amount of its own uncontrolled mass, the direction of which is considered according to the player’s speed vector. It turns out a sort of "food shot." If such a thing falls into a death star, it becomes part of it. The "overfed" star of death throws its part in the direction opposite to the last shot. In this way, you can splash someone else’s too-oiled strategy.
Yes, he is. See not all. It is considered an ellipse, taking into account the direction of movement, depends on a variety of parameters (group size, mass of parts in a group, speed). In general, fog of war turned out um ... fun.
Throughout the game, players somehow gain game points (awarded by game events). For these points and awarded a victory at the end of the game.
If three of the four strategies die, then the game can stop early at the moment when the rest will be selected in top1 on points.
We are currently working with Go 1.10, Java 1.8, C # Mono 4.3, NodeJS 6, C ++ 11, Python 2.7 / 3.5, php7. In addition, we have tried to simplify the addition of new languages ​​as much as possible - we only need dockerfile with a specific pattern if you want your favorite XXX language to appear in the list of supported.
The maximum amount of source code for one strategy is 20 megabytes in an archived form at the moment.
If you want any libraries to appear in the list of already supported languages ​​that you need (you never know, someone will decide to run up in ML) - write in kamentah, put all that we have time before March 25 (however, during the championship we will if possible, continue to fill docker-images for PL).
Full rules at the start of the championship will be opened in this repository.
Of course, we do not sit still. From the last championship:
localrunner
was developed (written in C).Design, meanwhile, is the same. We decided to finally pretend that we see this ... :)
You can register now on the site aicups.ru , the official group of the championship is @aicups , the official channel for those who do not want to join the group is @mrgchamps . We are waiting for you, it will be fun!
Source: https://habr.com/ru/post/351522/
All Articles