Skip to content
Starter Bot for Codingame's Coders Strike Back AI Challenge (Simulation Engine + Random Search)
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Aim of this project is to serve as a starter code for search based AI solutions to the Coders Strike Back bot programming challenge.

It provides a fully working and tested simulation engine, simple mutation-based search algorithm, basic reflex AI and generic API with which the user can extend the bot. It is written with performance in mind and can achieve an average of 250k-300k simulations per turn.

Out of the box this bot performs rather poorly, but with a simple change it can get to top100 legend or top50 with a slightly better evaluation. A heavily modified version of it currently holds rank 6.


Code assumes input format provided in Gold or Legend league and will not work for lower leagues.
If you are in Gold or Legend league, all you need to to is copy/paste and submit.

Next steps

If you want to get further in the ranking, you'll need to start adding improvements to it. Here are some ideas in order of difficulty to implement:

  • Add more parameters (or change existing) in evaluation function
  • Add different coefficients to evaluation parameters
  • Add bots with alternative coefficients as opponents for your main bot
  • Replace solver with Genetic Algorithm based (most impact)
  • Replace computationally heavy math functions with cache or approximations
  • Rewrite reflex bot implementation

Additional resources

You can’t perform that action at this time.