Russian AI Cup — annual IT-oriented competition initiative, organized by Mail.Ru Group and Codeforces. In this championship participants compete writing an artificial intelligence for the game strategies.
This year’s game is called CodeBall. Participants write code to make their bots hit the ball into their opponent’s net.
One game - one app
Before, there was a separate web player, capable of replaying games that were tested by the system, and a local runner, where you could test your strategies locally. So, there were also two renderers - fancy web based, and schematic for local testing.
Last year we started using Rust compiled to WebAssembly to show the games on web.
This time, we went even further, and the game itself is now written in Rust. So, now web player, local game runner and testing suite is actually same application with same source code. This means that you can, among other things, play the game in browser, which was not possible before.
CodeBall is based on simple physics. The engine was written from scratch specifically to be as simple as possible. All objects in the game are spheres (except the arena), there is no rotation or friction, so the whole simulation code is less than 100 lines. That is if we don’t count the arena geometry code, which is the hardest part since it is not represented by polygons :) Although, simple strategies can simplify arena’s geometry in their computations.
There is also some randomness in the physics, so that the games actually differ, and not everything can be 100% predicted.
You’re welcome to participate
Despite the name, the championship is not actually Russian-only, and it is also not really 2018 :) Basically, the championship has just begun recently, there is more than a week till Round 1, and the Finals are in the beginning of February, so there is plenty of time to join if you would like to. There is an example Rust strategy in quickstart guide.
As a fan of Rust, I would love to see more Rustaceans among the competitors.