My personal AI developed for the game "Screeps".
I'm not at all used to coding JavaScript, therefore take every piece of code you'll find here with a grain of salt. It's extremely likely that in many cases there would be a more clean or more pretty way of achieving what I'm doing. JavaScript has a lot of syntactic sugar that I do not know about and also I'm not familiar with general coding styleguides for JavaScript.