Here's mine : https://github.com/djgandy/halite2
The basic idea is that it ranks each planet based on its available resource and how many planets are nearby and who owns them.
- A friendly planet within 28 adds its total docking spots to the score.
- An enemy planet within 28 subtracts 2 from the score.
- A friendly planet within 70 adds 1 to the score.
- An enemy planet within 70 subtracts 1 from the score.
There is also some decision making to prefer planets further from the center when there are 4 players alive and prefer planets nearer the center when 2 players are alive.
There is a basic defence that pushes the mid point between the threat and the defendee but also has a bias towards the target to prevent overcrowding and over-defensiveness. The intention was also to use the planet scoring to decide which planets were most valuable production resources and keep more ships nearby them in case of sudden attack.
Attack is generally a part of seeking resource and is still very naive, it basically just sends ships to die! I wish I'd picked this back up sooner to fix that as it was probably worth quite a few ranking points!
There is also a post processing phase that I started but never got around to finishing where the idea was to look at what decisions each ship had made then coordinate any common actions in order to have optimal outcome. This was intended to look at whether to flee and re-group or take on a group of targets.