This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Brian McKenna's Bot - based on Scalatron Reference Bot - from Scalatron hack night at ScalaSyd May 9, 2012 | |
import util.Random | |
object ControlFunction | |
{ | |
def forMaster(bot: Bot) { | |
val (directionValue, nearestEnemyMaster, nearestEnemySlave, nearestGoodBeast, nearestGoodPlant) = analyzeViewAsMaster(bot.view) | |
val dontFireMissileUntil = bot.inputAsIntOrElse("dontFireMissileUntil", -1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Keynan Pratt's Bot - based on Scalatron Reference Bot - from Scalatron hack night at ScalaSyd May 9, 2012 | |
object ControlFunction | |
{ | |
var mbCount = 0 | |
var step = 0 | |
var energyLast = 0 | |
def forMaster(bot: Bot) { | |
if(bot.generation == 0 && bot.time < 4500 && bot.energy > 100 && ((step % 3) == 0 || step < 1000)){ | |
bot.spawn(XY(0,1)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Example Bot #2: The Tag Team | |
/** This bot spawns a collection of companion mini-bots which strive to remain at a configurable | |
* offset relative to their master bot. The master bot runs in large circles. | |
* | |
* The master bot uses the following state parameters: | |
* - heading = direction it is currently traveling | |
* - lastRotationTime = simulation the time when the bot last rotated its heading | |
* - lastSpawnTime = simulation time when the last mini-bot was spawned | |
* The mini-bots use the following state parameters: |