Show HN: Competition to write the most efficient bot to be King Of The Grid
kingofthegrid.comOut of boredom I've created a competition where the goal is to write the most efficient both to be King Of The Grid.
Code: https://github.com/kingofthegrid/king-of-the-grid
Rules:
* World size: 32x32 cells
* Two bots (or programs) spawn in top-left and bottom-right corners
* Each bot has a set of energy. See rules.cpp for exact values.
* Bots run on Z80 CPU. See CPUs section.
* Walls (obstacles) are generated before each game starts, such as it is guaranteed there is a path between two bots.
* Food (static) and prey (moves) are spawned periodically.
* Food and Walls are not spawned evenly: random noise is applied using FastNoiseLite on rules described on seasons.cpp
* Both can move around, eat, scan environment and clone themselves. See bot_api.h
* Bot that survives the longest, wins.
* If both bots survive for too long, it's a draw.
It includes includes an online in-browser IDE: https://kingofthegrid.com/ide/ that way you don't even have to download anything to spitball ideas. After compiling, you can test your code in browser as well.
Bots can move around, eat prey, and clone themselves, all written in C code with a provided API. Everything is on github, so after a bot is submitted and merged, the main page leaderboard is automatically re-calculated.
No comments yet.