Tutorial for Bot Programming on CodinGame


Open Source Your Knowledge, Become a Contributor

Technology knowledge has to be shared and made accessible for free. Join the movement.

Create Content

Classic Mistakes

  1. Not reading all input (as provided in the default code) will most likely break your code. Even if you don't use the input, read it. Always.
  2. Make sure to send only one output per turn. In this game, the output can be made of multiple MOVE commands, but they need to be on the same line, separated by ;.
  3. Some clever but difficult to implement ideas can be counter-productive. You'll spend time implementing them without being sure of the return on investment. Focus on the simplest ideas with the most probable effects.
  4. Don't worry about the performance of your code until you reach the Gold league. And even then, if you don't simulate possible moves, you probably don't need to worry.
  5. Don't modify your code to counter specific strategies unless a lot of bots used them. If you beat the boss 80% of the time but lose 80% of the time versus all other bots, you'll never get promoted.

Reading suggestions

I also suggest reading the CodinGame integrated chat and the discussions in the Discord community. During challenges, they're full of good advice.

Open Source Your Knowledge: become a Contributor and help others learn. Create New Content