Open AI Championship

AI Cup — artificial intelligence programming contest



Round 1

Round 2


Sandbox December 25, 2016

Recent comments

6 october 12:06: tyamgin wrote comment on post The closing of the Russian AI Cup 2016
6 october 02:27: enot110 wrote comment on post The closing of the Russian AI Cup 2016
12 august 11:03: cheeser wrote comment on post The closing of the Russian AI Cup 2016

VK Group

Telegram chat


This year task — CodeWizards

Write an artificial intelligence to control a wizard, compete with other participants in the championship!

Detailed description of the task can be found in “CodeWizards” championship and Rules sections.

Let's register! Quick start

Russian AI Cup — open artificial intelligence programming contest. Test yourself writing a game strategy! It’s simple, clear and fun!

Fifth Russian AI Cup championship is named CodeWizards. You are to program an artificial intelligence to control a wizard. Your strategies will compete with each other in the Sandbox and the championship. You can use any of programming languages: C++, Java, C#, Python, Pascal or Ruby. The Sandbox is already open. Good luck!

We welcome both novice programmers — students and pupils, as well as professionals. Writing your own strategy is very simple: basic programming skills are enough.

Championship schedule

  • Sandbox: open for everyone from November 6, 21:00 UTC till December 25, 21:00 UTC; first and fourth weeks will be beta-testing, system instability and significant changes in the rules are possible during these periods.
  • Round 1: November 25, 21:00 UTC – November 27, 21:00 UTC.
  • Round 2: December 9, 21:00 UTC – December 11, 21:00 UTC.
  • Finals: December 16, 21:00 UTC – December 18, 21:00 UTC.

Begin from the Quick start quide. Writing a simple strategy is not hard at all!


Prizes aren't available

Championship News


The closing of the Russian AI Cup 2016

The fifth anniversary championship has completed. As usually, it was not easy, but isn’t that the whole point? Only overcoming difficulties, making mistakes, a person learns something. We hope that every participant not only enjoyed our event, but also discovered new knowledge, became better than few months ago. Someone aimed an absolute victory, the other was satisfied with the fact that just taught his wizard to move around the map. All are welcome. The main thing is development and progress. The championship serves this purpose.

And now it’s time to take stock. Places in the Finals as follows:

  1. 1st place Anton Chumachenko - Antmsu (Russia, Moscow) - MacBook Pro. It should be noted that Anton participated in our championship from the very first year. Every time he took a higher place and finally managed to achieve the title of winner of the championship. We heartily congratulate him.

  2. 2nd place Alex Dichkovsky - Commandos (Belarus, Grodno) - MacBook Air. For a long time his AI was the absolute favorite of our championship. Alex also participated in the championship of 2012 year, but then he had gaps in attendance :) Apparently, this explains the second place.

  3. 3rd place Maksim Posazhennikov - NighTurs (Belarus, Baranovichi) - iPad Air 2. The CodeWizards championship was the debut of the Maxim, in which he immediately decided to take the bull by the horns. A well-planned strategy and a significant amount of the effort has earned him a well-deserved third place in the Finals.

  4. 4th-6th places Oleg Kuznetsov - Recar (Ukraine, Kiev) - iPod shuffle + WD MY PASSPORT ULTRA 2TB. Like for many finalists, this is not the first participation of Oleg in our championship. This time he took 4-th place, but we are confident that he is capable of more and prove himself.

  5. 4th-6th places Tony Kozlovsky - TonyK (Belarus, Minsk, BSU) - iPod shuffle + WD MY PASSPORT ULTRA 2TB. Belarus took another prize. Well done, guys!

  6. 4th-6th places Ivan Tyamgin - tyamgin (Russia, Simferopol, KFU) - iPod shuffle + WD MY PASSPORT ULTRA 2TB.

It should be noted that there is a significant gap between the first and second three, and between the second three and the rest of the finalists. This indicates significant differences between strategies and minimal influence of the random. We should also mention Cyril “core2duo” Bolonkin, which unexpected strategy has managed to present a few unpleasant surprises to the leaders and other participants of the Finals.

Next are the winners of the Sandbox. Each of them will receive WD MY PASSPORT ULTRA 2TB. Everyone else good luck next year. So, meet:

  1. 1st-6th places Vasily Zverev - vzverev78 (Russia, Novocherkassk, Softgrad Solutions).

  2. 1st-6th places Vladimir Saveliev - Oxidize (Russia, Ufa).

  3. 1st-6th places Denis Labyskin - r2d2 (Russia, Samara, Netcracker).

  4. 1st-6th places Constantine Pervin - mustang (Russia, Samara).

  5. 1st-6th places Pavel Savilov - cheeser (Russia, Moscow, Glowbyte).

  6. 1st-6th places Igor Korshunov - WildCat (Belarus, Gomel).

The intrigue remained until the very end. The rating of Pavel Savilov, Igor Korshunov and Denis “ud1” Utkin was the same, and only the time of their last accepted submissions allowed us to order them.

Now the Sandbox is frozen, but in the coming days it will resume its work with some adjustments of the game balance. The Sandbox will work for several months. Of course, all results will be unofficial. Note that we won’t support the Sandbox as during the championship.

With the best wishes, Mail.Ru Group and Saratov SU teams.

Attention! All participants of Round 2 and the Finals should make sure they specified an actual address and t-shirt size in their profile.


Finish line

So, the Finals of the Russian AI Cup 2016 has passed, and our competition came to the finish line. It is too early to sum up the results, the battle for the Sandbox prizes is ahead. And only six lucky finalists can now relax and enjoy a well-deserved rest.

We remind that all participants of Round 2 and Finals, as well as future winners of the Sandbox must fill information about mailing address, t-shirt size and the method of obtaining prizes: by mail or at the Mail.Ru office.



Good evening all!

A decisive magic battle is approaching. We hope that you are well prepared. Just yesterday it seemed that the winner of the Finals already decided, but Sandbox has managed to surprise us. The passions are coming serious.

The initial rating of each strategy in this stage of the competition is equal to zero. The strategy gains 2 points for a victory, nothing for a defeat, and for a draw… Draw?! There is no such word!

We remind you that candidate finalists must be at least 18 years old and update their age in the profile. If for some reason you haven’t done it already, now you have the last chance.

Good luck! And let the strongest win!


Minor announcement

Changed limits on the submitting of strategies and the creation of games. Read the rules for more detail.


Freeze of logins

Starting with the very first Russian AI Cup championship, the information about the names of the game participants was available to user strategy. In fact, when a boxer or a chess player preparing for a match, he studying his opponent in addition to general training. The participants of this championship also have such possibility. If someone has implemented efficient, but inflexible strategy, you can always take this into account and predict the behavior of such artificial intelligence by its name. Everything worked properly… up to some time.

The recent integration of accounts with the IT.Mail.Ru portal, among other things, added unexpected ability to change the username before an important stage of the competition and thereby confuse other strategies. Despite the fact that formally the use of such possibility is not prohibited, we consider it unsportsmanlike conduct. Therefore, the possibility to change your login will be frozen the day before the start of the Finals and recovered during the day after.

Of course, we will not ignore the opinion of the community and will remove the information about the user name from the API in the next year. However, this time the Finals will be played the way it’s meant to be played.


The next stop is "Finals!"

The Round 2 is finished, and we hasten to congratulate the top 50 according the final results. Hooray!

We especially want to note the success of Alexey Commandos Dichkovskiy, who won with a gap, and currently holds the top row in the Sandbox. Bravo!

We remind you that if you didn’t advance to the Finals (even if you did not participate in the Round 2), you could still be in the Finals! At the time of the start of the Finals (December, 17 MSK), we will add to the finalists the top-10 strategies from the Sandbox (not among the finalists). Do not despair. All in your hands!

In the Finals in every game a participant will control a faction of 5 wizards. That is, the system will run 5 copies of your strategy. Five wizards in the opposing faction will be controlled by 5 copies of the opponent’s strategy. A random wizard is appointed to be the Supreme Wizard in each faction. He can control other wizards in that faction by sending messages in binary format. Read more about the rules of the games in the Finals in the documentation.

The games on the Finals rules are already available in the Sanbox. It’s time to start preparing!

Good luck.


Round 2

Round 2 will start on December 9, 2016 at 21:00 UTC and finish on December 11, 2016 at 21:00 UTC. Best 300 strategies from Round 1 and additional 60 strategies from the Sandbox will take part in it. Format of the games will be 10x1 with unlocked wizards’ skills. This stage, same as previous, will consist of 2 parts 12 hours each, and a break in between 24 hours long, so that participants can improve their strategies. Games in each part will use latest correct strategy, submitted before the beginning of the corresponding part. Games will be held, like before, in waves. Each wave each strategy will take part in exactly one game. In the end rating will be calculated, similarly to Round 1, and 50 best strategies (in case of equal rating participant who submitted his strategy earlier has priority) will pass to the Finals to find out the best one.


Balancing skills. Part 2

The protection of Shield status increased from 25% to 33.3%.


Balancing skills

The duration of the Haste and the Shield statuses granted by spell is now 1200 ticks. The duration of these statuses granted by bonus remains the same. Now the wizard that casts a status spell on any friendly wizard automatically gets the same status.


Banned by VAC the Jury of Russian AI Cup

Bad day :(

We have carefully analyzed the strategies participated in the Round 1 and became really disappointed. We’ve found that not all the participants follow the rules and ethical standards of fair play. We have found a number of cases of collaboration or using of multiple accounts by single person.

The unfair participants from the top-300 could have causeless right to receive extra prize t-shirts. All of them knew about it, but none of them had not informed us about violation and had not requested to disqualify and disable extra accounts.

For the first time we decided to limit punishment to a strict warning and disqualification from the Round 1. The unfair participants from the top-300 will not be disqualified from the competition completely, but will not advance to the Round 2. We will invite to the Round 2 next participants from the final standings of the Round 1. For sure they will be notified by e-mail.

We will not publish the list of shame, but anyone can check their login here and make appropriate conclusions. If you have considered themselves a participant of Round 2, but were surprised to find yourself on the page above, be aware that wildcards from the Sandbox are open to you if you contact us and acknowledge your offense.

We reserve the right to carry out such inspections before and after any stage of the championship and next time we will not be so loyal.


The second week of beta

So, the second week of the beta test has begun, and we are almost ready to replace the wizards with the space marines ;) Prepare yourself!

Meanwhile, we decided to please you with a solid portion of the changes so you don’t get bored waiting. It seems that all wizards have mastered new skills and just don’t know what else to do.

Here they are:

  • reduced hitpoints of all buildings by 2 times;
  • increased factor of experience points for damaging and destroying of buildings from 0.25 to 0.5;
  • reduced experience points for taking a bonus from 200 to 150;
  • reduced max tree life from 36 to 30;
  • reduced empowered damage factor from 2 to 1.5.

And yet Marat Vafin (LastVar) bothered to develop his strategy in Java, and after the end of Round 1 he decided to rewrite everything on Kotlin. Actually, why not? Small side effect is that all participants of the championship can also take advantage of this opportunity.

P.S. Not all statements of this post are true.


Round 1 and... Whoops!


Round 1 has been launched. You will be surprised - 1090 strategies are participating in it. Yeah, 10 strategies more than there were supposed to be.

That’s how that happened: before Round 1, the number of user games has increased so much, that we had to quickly find new and optimize existing powers. We are sorry for long intervals between games in the Sandbox. The system was stabilized just before the beginning of Round 1, but rating was calculated with a big delay. Only after the launch we realized that we rushed too quickly, and let top 1080 rated users advance to Round 1 before completely updating the rating. Based on the result of last tested Sandbox games 5 additional contestants earned their right to participate in Round 1. And, since games are grouped by ten, we have increased total number of players to 1090 according to the standings in the Sandbox.

Now 1090 strategies will compete in Round 1, trying to get to top 300 to proceed to Round 2. Besides top 300 from Round 1, 60 best participants of the Sandbox (at the moment of Round 2 beginning) will join them in Round 2. Remember, all Round 2 participants will receive a T-shirt. There is something to fight for!

Round 1 will consist of 2 parts, with a break in the middle (Sandbox will be available during the break), that will allow you to improve your strategy. Each part will take 12 hours, and the break is 24 hours long.

Good luck in Round 1!


Scala package and more

A little late, but now anyone can develop their strategies in Scala. Thanks to Pavel Lomovtsev for this package.

For our part, we have fixed the incorrect angle ranges when playing for Renegades. Also fixed a rare bug where minions can move a bonus ;) Some less important improvements and fixes.

We decided to weaken the empower bonus. During the first weeks after the Round 1, the damage ratio will be reduced from 2 to 1.5.

On the forum there is a vote about reducing the role of bonuses. If it succeeds, the number of score points for taking a bonus will be reduced from 200 to 150.

Of course, before the end of Round 1, the rules will remain unchanged.


Results of the week

Hi all!

The first week after the release of the competition coming to an end. We did not sit idly by and now we can summarize.

As many of you already noticed, there are numerous improvements in the web-renderer. Most of them was made by your request.. Dramatically reduced the amount of used RAM, slightly increased speed.

The number of both submissions and custom games are limited to 3 in 20 minutes. It’s not exactly good news, but a necessary step. Some participants last year suggested us to go to for it, to reduce the load of the testing system. In fact, why create more games than you can watch? I hope that now no one will have a long pauses in the Sandbox.

We also optimized the communication protocol between game engine and strategy. Now the amount of transmitted data is smaller and will be easier for us to store it. For you, this means a strategy speedup. The changes did not affect C++ and Pascal. These two languages are too fast already :) The strategies already sent to the system will continue to operate under the old protocol. Keep this in mind when loading dumps by Repater.

We strongly recommend you to download the latest versions of the language packs and utilities.

Like all previous years, we are pleased to introduce the new language packs prepared by community:

  • The D package was prepared by Ivan Gassa Kazmenko with the assistance of Nickolas SirNickolas Boukreev.
  • The Go package is a result of collaborative work of Alexander Barsukov (Irioth) and Eugene Petrov (weterok_ai).
  • After several days of hard work we finally were able to overcome the exorbitant curiosity of NodeJS and integrated the JavaScript strategies to launch under our security restrictions. As an additional security measure, Vasily Kostin (Megabyte) has restricted the loading of some modules in the package. Vasily Kostin has repeatedly won prizes in our competition. We wish him good luck this year!

The end of the beta test

We are pleased to inform and congratulate you about the completion of the first beta week. During this week we made a huge number of improvements and fixes.

Please re-download the latest version of language packs and various utilities. Please note that the rules of the game, language packs and the Local runner utility are also published on Github. There you will be able to track the changes and also to see a list of edits made.

We won’t make changes that could affect the behavior of the strategy in the game till the end of Round 1 and the beginning of the second beta week. However, we will continue to fix known bugs, and we reserve the right to change the mechanics of the game beyond the rules if we deem these changes necessary.


Open beta

We are pleased to welcome all the participants of the Russian AI Cup: CodeWizards 2016 open beta!

The beta test will run until 21:00 UTC on 13 November. Please note that at this time we can make a significant changes in the rules, scoring system and any other aspects of the championship. This week we will try to fix possible mistakes, optimize performance and make any other necessary improvements. We are counting also on the community and you.

This is the first time we open our championship for English-speakers. Not all the texts are translated yet, but we are working hard on it.

The ratings will be reset after this week of beta.

Good luck and have fun!


  • November 10: the game engine now spawns two bonuses at once; increased amount of score points for taking a bonus from 100 to 200; slightly increased damage of all buildings.
Latest games of leaders
# Name Rating
1 Antmsu Antmsu 1250
2 Commandos Commandos 1246
3 NighTurs NighTurs 1244
4 Recar Recar 1142
5 TonyK TonyK 1122
6 tyamgin tyamgin 1112
7 WildCat WildCat 1028
8 cheeser cheeser 1004
9 r2d2 r2d2 1000
10 Oxidize Oxidize 994
# Name Rating
1 NighTurs NighTurs 3610
2 Antmsu Antmsu 3608
3 Commandos Commandos 3601
4 mortido mortido 3454
5 tyamgin tyamgin 3447
6 cheeser cheeser 3435
7 TonyK TonyK 3418
8 r2d2 r2d2 3396
9 ud1 ud1 3391
10 Oxidize Oxidize 3377