Back
Close

Tutorial for Bot Programming on CodinGame

[CG]Thibaud
19.7K views

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.

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