- Generate bot if #bots < #positive cells*0.618
- Create a priority queue containing all the positions of positive cells, sorted by the energium at this location, break tie by the distance to the base.
- Using the greedy strategy, if a bot doesn't have a 'goal', set it to the best possible location according to the priority queue.
- Dodging: If an enemy is adjacent and can kill it, set its 'goal' to base and re-dispatch.
- Avoiding dead-end: The nearest path might lead the bot to a 'dead-end', which might end up with going back and forth infinitely. So this additional check is added.
hage1005 / ucsd_energium_ai_competition Goto Github PK
View Code? Open in Web Editor NEWsource code for my bot