Note: The survey for community favorite will be released soon
In this KoTH, the aim is to be the last bot alive. Coins will be placed in random areas, and your bot must get the coins first. If a bot runs into another bot, the bot with more coins wins, and the other bot dies. More details below.
There will be 2 types of coins: gold and silver. Gold adds 5 coins to the bot's strength, and silver adds 2. Once a coin is collected, another coin is placed at another spot on the board. At any given time, there is one gold coin and four silver coins in the arena.
In the event of two bots trying to occupy the same space, the one with more coins will stay, and the one with less will...not. The winning bot will gain 85% of opponents coins (Rounded up). If they are tied, both die. If three or more try to occupy the same space, the most powerful wins, and gets 85% of all the other bot's coins. In the event that the most powerful bot is a tie, all of the bots die who tried to enter the space.
The arena's side length is calculated with
4 + botCount. When placing bots in the beginning of the game, random places are chosen. The system ensures that no bots start in the same space, or next to each other. Coins generate randomly, excluding a 3 by 3 square centered on each bot. If a bot is found outside of the arena, it dies instantly. The arena starts at (0,0), or Northwest, in the upper left corner, and the location of a bot is always an integer.
botNotes.storeData(key, value) and
botNotes.getData(key, value). You may not store or access data any way, other than that which is provided through the parameters and
botNotes. You should create a function that, when called, returns a string
none. There will be 3 arguments for the function:
An object with four integers (
arenaLength), your current location, your coins, and the length of the arena
A multidimensional array with the X and Y coordinates of other bots, and their coin count, ex-
An array with the coin locations listed (Gold is always first)
This is a king of the hill challenge, Standard Loopholes prohibited. Your function will be run several thousand times, each time allowed one "Move". Note that if the game exceeds 20,000 moves, the bot with the most coins wins. This will be done 8,000 times, to remove randomness.
First Place: 100-point bounty
Community Favorite: 15-point accepted answer
First Place: TBTPTGCBCBA
Second Place: Big King Little Hill
Third Place: Potentially Victorious
Fourth Place: Polite Near-Sighted Drunk Bot
Fifth Place: Safety Coin