FEATURED

Logic of decision making / SurprizingFacts

Description

Vindinium is a multi-user step-by-step roguel. Each of the four players has one hero who can move around the map. The goal is that players collect the maximum amount of gold for a given number of moves (each player makes 300 moves per game, so the whole game consists of 1200 moves). Players must take control of gold mines to produce gold; However, the mines are protected by goblins. When a player defeats the goblin, he becomes the owner of the mine and receives one gold per turn. In addition, the goblin now protects the mine from other players.

Heroes can fight each other. Survivor in battle gets control over all the gold mines of his opponent. The killed hero is immediately reborn with all of his gold, but all the mines pass into the hands of the killer.

While visiting the tavern, heroes can buy beer for 2 gold units, thus restoring their health points.

Is to create a computer program (bot) that plays the game Vindinium as reasonably as possible. It is recommended to use one of the starting sets for a large number of programming languages ​​as a starting point.

Map

Maps are created randomly. Each game object on the card is encoded using two symbols. Example of a map:

  + ------------------------------------- --- +
| ###### $ - $ - ############ $ - $ - ###### |
| ###### ## ## ###### |
| #### [] #### #### [] #### |
| ## #### ## ## #### ## |
| #### $ - $ - #### |
| ########## @ 1 @ 4 ########## |
| ############ #### #### ############ |
| $ - ## $ - ############ $ - ## $ - |
| | $ - $ - ################ $ - $ - |
| | ######################## |
| | ######################## |
| | $ - $ - ################ $ - $ - |
| $ - ## $ - ############ $ - ## $ - |
| ############ #### #### ############ |
| ########## @ 2 @ 3 ########## |
| #### $ - $ - #### |
| ## #### ## ## #### ## |
| #### [] #### #### [] #### |
| ###### ## ## ###### |
| ###### $ - $ - ############ $ - $ - ###### |
+ ---------------------------------------- +  

The legend

## – The irresistible forest
@ 1 – The first hero
[] – Taverns
$ - – Gold mine (no man's land)
$ 1 – Gold mine (belonging to the first hero)

The generated maps are symmetrical and always contain 4 taverns and 4 hero.

Heroes

Heroes can move one square for each move and have the following indicators:

  • Health points (HP) : Each "fresh" player starts with max If the HP falls to zero, the hero dies (see "Death of the Hero").
  • Gold: starting from scratch, this is an indicator of the success of the hero. At the end of the game, the characters will be judged on the basis of their amount of gold.
  • The number of gold mines.

Direction of movement

The bot should give one order for the move. Possible orders: Standing on the spot ( Stay ), To the north ( North ), To the south ( South ), East ( East ) or West ( West ). Once the order is executed, the hero remains in place or moves one square in the given direction.

Moving the hero

If the hero:

  • Trying to go beyond the boundaries of the map or go through the trees, nothing happens.
  • He enters the gold mine, he stays in place and:
    • If the mine already belongs to the hero, nothing happens.
    • If the mine is drawn or belongs to another hero, a battle takes place with the goblin guard who guard the mine. The hero loses 20 life points. If he survives, mine it.
  • Attacks another hero, he stays in place and nothing happens. Fights of the heroes are decided at the end of the course.
  • He enters the tavern, he stays in place and orders himself to eat. The hero pays 2 gold and restores 50 units of health. Please note that the amount of health can not exceed 100 units.
  • He does not send an order for the time allotted for him to make a decision (1 second), he remains in place until the end of the game, it is impossible to send new orders. Note that he can still win if he has more gold at the end of the game than other players.

End of turn

After the hero has moved (or decided to stay in place), the following things will happen:

Battles

] Heroes are a little nervous and never miss the opportunity to hit each other with big swords. At the end of the hero's move, if there is an enemy at a distance of one square in any direction, the hero attacks him. For example, in this situation, at the end of the first hero's move ( @ 1 ):

  ########
## @ 1 @ 2 ##
## @ 3 ##
Player 1 attacks the second player, but does not touch the third player, because the third player is two cells away from him 
.

The attacker does not lose the units of health, the defender loses 20 units.
If the defender dies (see: Death of the hero), the attacker takes control of all the gold mines of the loser.

Gold mining

After his move and battles with other heroes (if any) , The player receives one unit of gold for each controlled mine.

Thirst

Then the hero loses one unit of health, for any action causes him thirst.
Note that heroes can not die of thirst. In the worst case, the value of their health drops to 1.

Death of the hero

When the hero's health drops to zero, he dies. The hero immediately appears on the map at his point of rebirth, with a full health reserve (100 units). The hero loses control over all his gold mines, but retains all of his accumulated gold. Be careful when the hero returns to the point of rebirth, any enemy who is in this cage, automatically dies. Thus, you should avoid staying on the cage of the revival of one of the heroes ...

A hero can not die of thirst. Thirst can leave a hero with one health unit, but not kill him.

End game

The game ends when the maximum number of moves is reached (usually 300). The winner is the hero with the most gold. If two players have the same amount of gold, there is no winner.

Ranking

The system for assessing the relative strength of players uses the Elo Rating. The idea is this: it's better to be first than second, it's better to be second than third, and so on. I hope the principle is clear.

Using multiple bots at once

You can run multiple instances of your bots at the same time and, in general, use any measures that you think are suitable for achieving dominant leadership. Fight!