Quite often, student olympiads consist not only of competition in the ACM ICPC format, but also are accompanied by other competitions, which in no way affect the overall result, and serve to increase interest in the competition.
Among such competitions I want to stay at the Code Game Challenge competitions.
The Code Game Challenge format competitions are strategy writing competitions (roughly speaking, artificial intelligence) for some of the proposed worlds. ')
A team of 3 people is given one computer on which the following software is installed:
development environments;
Software for sending solutions and viewing results;
project template for strategy.
The set of languages varies from Olympiad to Olympiad, but it always includes languages that are allowed by the ACM ICPC rules.
Software for sending solutions and viewing the results allows you to send your solution to the server and view the simulation results.
A strategy project template usually contains a file in which all the necessary libraries are connected, and containing an empty strategy (the managed unit remains in place).
In addition, for a day or two, participants are given the rules of the game world, which describe the physics of the game world, they define the basic constants (for example, maximum acceleration) and, most importantly, the rules provide an API for managing units and interacting with the outside world.
The time to develop a strategy is usually 4 hours. During this time, participants can send solutions to the server as many times as necessary. Penalty points are not awarded. The last decision sent by the participants is considered as final.
To assess the quality of strategies, participants send the decision to the server, where it is compiled and, after that, you can see how your unit is opposed to the enemy. To do this, there is a special visualization module that can play battles between units.
Simulation of the fight step by step. Those. time in the game world is discrete. Each turn, the simulator polls the game strategies (usually in the order of the players in the list of participants in the battle), the strategy fills in some structure that describes the “wishes” of the active unit, then the values of this structure are adjusted to the restrictions, and then apply.
Now, that would be clearer, let's look at an example.
Classics of the genre were competitions with the participation of tanks. So in more detail I will consider on their example.
So, you are given the game world, which is a rectangle of 2048 x 1536. During the battle, bonuses can appear on the field - objects with a radius of 10, when hit by a unit, they gain an increase of 5 units to the current HP level.
In combat, 4 units are participating.
Each unit is a circle with a radius of 20 units. The unit is equipped with weapons directed in the direction of motion. Reloading weapons occurs within 10 turns. The projectile flies at a speed of 3 units / tact.
The fight consists of 500 moves.
Usually, the rules are painted on 10-15 pages, but here’s a brief summary.
For such a game world, one would expect the following API: Functions for obtaining information about the game world:
get the size of the game world
get information about the bonuses currently located on the map
get information about enemy units
get a link to your unit
get information about the projectiles on the map
get the current move
get fight duration
Unit control function:
set the speed
turn to a given angle
Fire
get information about the state of the gun
get information about the location of the unit
get information about the state of the unit
Functions for obtaining information about enemy units:
get information about the state of the unit
get information about the location of the unit
Functions for receiving information about bonuses:
get information about the location of the bonus
get information about the lifetime of the bonus
That's all. Quite a short API, but enough)
Everything else you need to implement yourself.
Here is a brief list of the tasks that you will have to solve:
strategy of choosing the type of units (usually, at the beginning of the battle you are asked to choose the type of unit. Different types of units have different characteristics.)
obstacle avoidance
prediction of the location of objects (for example, for shooting ahead)
calculation of the trajectory of its movement
...
These 4 hours have passed, after that there is usually a break of several hours, so that the participants can rest a bit, have a snack and warm up. In the evening, they are again collected in the hall with a large screen, and the most colorful stage of the CGC comes - the Code Game Show. Participants are grouped into groups at random, and the show of all battles begins. As a rule, from the group the winner team goes to the next stage, the losers remain overboard. And so on, until the winner is determined.
And lastly, several videos of such competitions, not all videos are in good quality, so do not be angry.
In general, CGC is interesting, ACM ICPC is interesting.
CGC held in 2007 at the TIT SFU Olympiad
CGC held in 2007 at the quarter finals in Saratov
CGC held in 2007 in Volzhsky
CGC held in 2009 in Volgograd
UPD.1 CGC held in 2009 at the quarterfinals of the southern region in Saratov
Where to go if you are interested (links are presented as-is):