Tutorial for Bot Programming on CodinGame


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.

Advanced resources

Create your playground on
This playground was created on, our hands-on, knowledge-sharing platform for developers.
Go to
codingame x discord
Join the CodinGame community on Discord to chat about puzzle contributions, challenges, streams, blog articles - all that good stuff!
Online Participants