NNG C++ Grand Prix 2016

The team

Two of my colleagues contacted my to join their team on the NNG’s programming competition and I was of course willing to do this. Our goal was to finish as the runner-up and win the Herman Miller chair so our team name was Hárman Hermané (it a pun, it means three for Herman).

The final was preceeded by an online qualification where had to solve five problems. The first ten team could get to the final round and fortunately we had the fifth place. Most of the problems were mathematical but with a twist like you had to solve it with number containing 100000 digits.

We knew that in the previous years the competitors in the final round had to write a bot that can win a game. This hasn’t changed in this year.

The game

  • Round based game
  • Square shaped, tile based map
  • Two bases in the opposite corners of the map
    • Periodically it can build a new building.
  • Buildings
    • In every tick its occupied area grows by one tile in a given radius.
  • Moving units
    • They are spawn on the base with a proportional frequency as the occupied area.
    • They can build a new building periodically on their position.
    • They can attack enemy units and buildings.
    • They heal in our area.
    • They are damaged in every tick if they are in enemy territory.

Our options to control the game:

  • Choosing the position of the buildings
  • Moving units, attack or build

The strategy

  • Building buildings
    • We choose the building site to have the largest area that can be occupied.
  • Controlling units
    • If there was an enemy unit in our are we attacked it.
    • We gathered our units at the building which was closest to the enemy area.
    • If we could kill/destroy an enemy unit/building without dying we went for it.
    • Before attacking the base we waited to have enought units.

Using the strategy above we end up as the runner-up so we completely achieved our goal and got the chair. You can play back the final rounds if you download this package.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top