On November 7, the Russian Ai Cup 2017 beta test officially started. The championship is annual, and this year we decided to offer the participants a project called CodeWars - a contest for programming bots for the game, which the participants themselves immediately called the “RTS player simulator”. The beta test came to an end, the championship officially started, and under the cut we would like to report, share news about what we can now offer. Well, once again invite everyone to participate, not without it of course.
Just in case, briefly about the competition for those who do not know - a little bit of rules in free form. Every year we write a game of a certain genre, we give everyone to write a bot for this game with a certain strategy of behavior inside, and we launch this bot into the sandbox, where it fights with others the same from time to time. The rules of the game are gradually becoming more complex, after the selection of the best strategies among them, a series of rounds “one-by-one” is held. As a result, the coolest receive prizes (2 macbooks, smart watches, ipad, that's all). Not the coolest, too, get quite a lot of nishtyakov - T-shirts, sweatshirts with our symbolism, honor and respect. The battles themselves can be either viewed directly on the site or launched in the first mode of the local visualizer that we provide.
Well, this year we have the similarity of the RTS. There is a map of finite size, on this map 500 units of different types of equipment are mirrored in every corner:
Of course, units differ quite strongly in a number of parameters - speed, attack radius, reconnaissance radius, attack, defense, and so on. The map is, among other things, marked up by different types of terrain and weather (the terrain affects the speed of movement and visibility on the ground, the weather in the air). The task at first glance is quite simple - to destroy all the units of the opponent, to survive himself. The difference between management and traditional RTS here is that there is practically no micromanagement:
All these restrictions were introduced by us specifically to see the military strategic planning, and not a series of micro-strikes. In general, it turned out great, about this further.
Traditionally, the Russian AI Cup always begins the week of the beta test: participants try to play something on the API provided by us, praising or scolding both the game mechanics and this very API. Of course, they criticize, of course, our own traditions - “it used to be better,” “now so-so” and “everything is too complicated.”
We, in turn, quickly apologize for the found bugs, rule them, try to change the balance so that it becomes really interesting, and add new programming languages ​​to support. In addition, often at this stage, along with balance corrections, we add a certain number of new features to the game mechanics. This year is no exception.
From the very beginning, we slightly missed the number of CPS allowed for participants. At the start of the beta test, we gave strategies 6 actions per second (initially there were three types of actions: selecting a group, moving it along a vector, or turning around a given point). It turned out that this is completely inadequate for building any competent strategy for attack or defense. All that the participants had time to do before the first shot was either to send the fighters to attack, or to cower sadly in anticipation of the strike. As a result, we reduced the cooldown by half, the speed of the fighters was a little worse, it became much better. At least, sensible constructions have appeared.
Since the units do not have their own implementation of the search for the path, it was absolutely impossible for the pioneers to build a mixed squad of different types of units, they simply rested against each other and did not want to move on. We solved this problem by introducing a new type of action - SCALE . Roughly speaking, we take a detachment of units and order them to "scale out" by a given coefficient — either close the rows, or vice versa, open them. Thus, the participants had the opportunity to take two any detachments, order each of them to “disperse a little” and make one mixed division out of them (tanks + helicopters, infantry fighting vehicles + fighters, or whatever you like).
The resulting detachments of participants immediately called the "sandwich".
When we planned future battles, we imagined something like the series of games Total War, StarCraft, C & C and others like them - a smart tactical battle of slender ranks of technology, retreat offensive and other beauties of similar games. The reality at the very beginning of the beta test broke us off a bit: the top strategy turned out to be to simply mix everything a player has into one big pile (from a small combination of MOVE and ROTATE) and send the resulting “lump” to blame everything he reaches. Honestly, neither we nor the first participants were completely satisfied with this - we wanted a beautiful AI and a variety of tactics. As a result, a nuclear strike appeared - we take one of the units, assign them as a missile strike gunner, and while this unit is alive, we can hit the area in view of it.
Of course, this action has a fairly large cooldown, and it does not do much damage. But, nevertheless, it is no longer possible to overwhelm the enemy with a hard-nosed bunch of units - you need to teach the AI ​​new techniques - reconnaissance, launch gunners, distribute in case of danger. In short, it has become much more fun, the battles have become more interesting, and the strategies of the participants are more varied.
To have a more or less visual idea of ​​what and how we write, here is a small selection of what the guys managed to teach their strategies at the moment. In almost chronological order.
This is what was written at the very beginning, so to say, mastering control (well, sending a test strategy that we provide ourselves).
As you can see, there is no particular sense.
At a certain point, even before the introduction of additional types of actions and an increase in their total number, the participants realized that it was possible to randomly rotate the original squads several times, move them to each other and form such a mini-tornado:
Before the introduction of a nuclear strike, he ruled well. In some variations (with more intelligent construction and movement) taxis and now.
SCALE allowed to build smarter divisions of various types of troops mixed together. For example, these are:
Options for building weight, for every taste and color. The effectiveness of such pieces, of course, must be considered. Often it (efficiency) directly depends on what the enemy managed to build.
And here, by the way, the successful battle of a well-placed system against a heap, with the taking of a heap into ticks from two flanks.
It looks quite impressive:
While one of the strategies is being built, the second is already forming a detachment of "gunners" and in just a couple of seconds the first fighter arrives, suggesting a "nuclear strike" on the formation being built. The tactics of protection here can be very different, from interception to instantaneous division into several formations.
Here is the battle , where one fighter thus gradually endures the entire formation of the enemy.
A rather beautiful type of tactic, sorry gif cannot fully convey the beauty of such a construction:
It is clearly seen from the minimap that the strategy successfully manages a whole horde of scattered detachments, confusing and exhausting the only formation of the enemy with both conventional attack and nuclear strikes. Managing such a number of individual units under the existing restrictions requires a good algorithmic training. However, the potential of such tactics seems to be quite good.
The very clever use of SCALE is flooding the entire map with “partisan” single units (seen from the minimap), and each of them can be a gunner for a nuclear strike.
The movement of the enemy's division turns into a walk along a minefield, with the corresponding result. However, it seems that this should be elementary interrupted by the simplest intelligence - single units die almost instantly.
In fact, there are much more different attack and defense strategies, but the overwhelming majority of them cannot be shown normally with gifs (and even the post is already quite heavy). You can simply look through the game tops here .
And now everything is serious!
The beta test of the championship was quite successful, the rating in the sandbox was dropped, now the participants will have to write an AI each, able to get ahead and take part in the next rounds.
After 9 days, 1080 best strategies will be selected for the first round. Winners of the round will have the opportunity to get into round 2 and the final. By the way, the best 60 of those remaining in the sandbox will still get into the second round - there must always be a chance.
After the first round, buildings will appear in the game. By capturing them, it will be possible either to produce the equipment of the player’s choice, or to increase the number of actions available in the game.
This series of fights will take place on December 9-10, and the best 300 strategies from the first round and the best 60 strategies from the sandbox will get into it. Battles will be for the opportunity to reach the final. Those who do not come out of the second round will still have a chance if they take the first 10 places in the sandbox.
All participants of the second round receive T-shirts with our symbols. After the second round, the fog of war will appear in the game. It is necessary to teach AI such actions as intelligence and spy fishing.
On December 16-17, the top 50 of round 2 and the top 10 of the sandbox will compete for the final prizes - MacBook Pro, MacBook Air, Apple iPad, Samsung Gear s3, WD My Cloud 6TB, WD My Passport Ultra 4TB. By the way, the TOP-6 sandboxes that did not win the final will receive WD My Passport Ultra 2TB. In addition, all participants in the final get sweatshirts with our symbols.
We try to include everything we reach (and everything that the participants themselves send us). We started with the following set: C # , C ++ , Java , Python2 , Python3 , Pascal , Ruby .
During the beta test added: D.
Now added extra: Kotlin , Scala .
Next in line: Swift , Go , Rust , Nim .
Looks like the list will be updated. In addition, today we expect to support another language - English. In the sense that the rules are almost translated, and will soon be posted on the site in the English version.
Well, why would I write all this here? The official part of the championship has just begun, it will last until mid-December and you can join at any stage. You can register here , in the same place you can search for complete rules, guides, starting strategies, a forum, language packs and much more.
The championship is very active, in Telegram you can find an official chat , an official channel and an unofficial channel organized by the participants themselves (from the way there is an unofficial visualizer and a lot of other tools, for which many thanks to them). VC has a group for all our championships .
In short, go to us, we have here interesting. You will not be left without support - you can always ask a question to me personally as an organizer of the competition - sat2707 in all official and unofficial chat rooms / groups / anywhere.
PS It would be wrong not to express gratitude to the community for the support and assistance (and for many of the pictures in this post). Guys, you fire, keep it up!
Source: https://habr.com/ru/post/342408/
All Articles