Decision engine

May be we are not very good at strategic decision so we try to let the robot choose itself its own strategy! This has the side benefit to make the robot able to change its strategy when things go wrong (and they often go wrong when there is another robot on the table).

The basic idea of our strategy decision code is to present the robot with a panel of possible actions, and the robot will choose the best action to be executed. To make this choice, the program will assign a score to each action, then it will choose the action with the best score.

The score is affected by several factors:

  • the distance of the path to the action,
  • the number of time the action was chosen, but it failed,
  • the robot load,
  • the remaining time until the end of match,
  • some static bonus entered by the programmer (for example, we give a large bonus to the bottle actions),
  • etc.

You can find the scoring code in strat_place_score function, in strat.c.

One important thing is that the score should be dynamic enough so that the robot does not always choose the same action in case of problem.

The following video shows the evolution of scores (numbers in black) during a round:

https://www.youtube.com/watch?v=mQoTP9ZrO04