#MissilesPlusScore
Some strange idea I came up with that takes that the absolute value of difference of the scores and uses a list of moves in a random based of the game way. It works well against bots with a strategy but fails against storms of missiles. Also my first king-of-the-hill.
function MissilesPlusScore__setup(team) {
var botVars = {};
botVars["color"] = team;
return botVars;
}
function MissilesPlusScore_getActions(gameInfo, botVars) {
var actions = [];
var moves=["fire missile","turn right","turn left","fire engine","fire missile","turn right","turn left",fire missile","turn right","turn left","fire engine","fire missile","turn right","turn left",fire missile","turn right","turn left","fire engine","fire missile","turn right","turn left"];
if(gameInfo[botVars["color"]+"_alive"]){
var num=gameInfo["redScore"]-gameInfo["blueScore"];
if(num<0){num=num*-1;}
if(num===0){actions.push(moves[Math.round(Math.random()*3))];}
else{
actions.push(moves[num+gameInfo["numMissiles"]])
}
}
return actions;
}