I sometimes like to join bot challenges to improve my programming skills and logic reasoning.
The Fruitbots world is a board with different kind of fruits lying around. The goal is to collect more fruits than the opponent bot, of many types as possible.
- If on a useful fruit, eat it!
- Else, go to the best direction, looking at:
- nearer and rarer fruits
- bonus for disputed fruits, if nearer than the opponent
- avoid previous position, out of the border moves and to PASS
The bot seems good enough to get into the Top 50. If you’re curious the code is here, but if you like programming I invite you first to join the challenge and find your preferred bot rules!