Inspiration
I like competitive puzzle-like programming challenges like this one, so when I saw the challenge I knew that was where I wanted to spend my hours!
What it does
My bot works with a fairly basic code structure, with more in-depth heuristics. Each worker evaluates its surroundings, assigns a score to each possible destination and makes a legal move to get closer to the best destination.
The heuristics include limiting the scanned area to a realistic size (not trying to take over the whole map), detecting collisions and destroying other player's clusters.
How I built it
The challenge forced us to work with Rhai, a rust-based scripting language. All the code is contained in the same file, without the possibility of creating functions.
Challenges I ran into
The language was new for me, so that was a big challenge. The infrastructure was also a little bit crumbly, which represented challenges for the debugging of the code, but in the end the bugs were sorted out :^)
I also iterated through many many versions, more than 20 submitted ones and probably more than 100 unsubmitted!.
Accomplishments that I'm proud of
I'm proud of the win-rate of my bot and learning a new language. At the point of this submission, my bot is finishing 1st nearly all games, but there's still hours to go!
What we learned
I learned the language Rhai and some insight in heuristic codes.
Built With
- rhai
Log in or sign up for Devpost to join the conversation.