Hacker News new | ask | show | jobs
by scotty79 5284 days ago
> Otherwise if the ant was just spawned sitting on my hill, the target border tile is determined using some complex calculation considering the ratio of own/enemy ants near that border position, the possible distance to enemy hills, how many ants are already on a mission to a near border tile and how long they do need to reach their desitnation... Oh, I'm kidding, it was random. Completely random. Like in target = area.border.get(turnRandom.nextInt(area.border.size()));

Nice pun targeted at over-thinking of things. If you try to take many things into account without any concrete knowledge of how they influence outcome you'll get random result. So you may just start with random and see if it's good enough.