AI patrolling stupidly? Or wormhole pathfinding bug?

I was looking at a replay of my most recent game, and noticed one of the AIs doing something...odd.

It had a wormhole in the middle of its territory, and had sent a fleet through it to the other side of the solar system, fairly near the planets of the two other players it considered foes. The ships went from the far end of the wormhole to an adjacent (unoccupied, unoccupiable) system...then turned around and came back to the far end of the wormhole...then back to the unoccupied system...and so forth, a constant stream of ships moving back and forth.

I have a hard time thinking it was any sort of patrolling pattern; there wasn't really anything there for it to protect, and going back and forth like that would keep the antimatter reserves of its capital ship low. Plus, during this time, I was attacking it elsewhere, so presumably it would be trying to use those ships to defend itself.

It could, however, be a pathfinding issue - looking at the AI's tech tree, it seemed that it had gotten knocked down to 4 Civics labs, which presumably meant that while it had the jump-tech, that it couldn't use it (assuming it works like that; I know it does for, eg, Kodiak production) - and I could well imagine the distinction between "do I have this tech?" and "can I access this tech right now?" being the sort of thing which would cause strange behavior like this.

Or maybe it's just doing something infernally clever that I'm utterly missing. :)

Anyone have any ideas?

--Eric

[Playing the demo version on a Random Medium map with Normal AIs, if that's relevant.]

5,021 views 5 replies
Reply #1 Top
I've noticed the same thing with wormholes. AI tries sending units wherever he may be trying to go and passes through a wormhole, goes a space over and thinks "whoops! we weren't suppose to be here." and head back through. And then keeps doing it.

Many times I see a fleet jump in at a wormhole by one of my planets and then see them heading for it only to pass through to get to an empty space behind it (never attacks) and then turn around to go back through the wormhole.

I can't imagine why it would do this because I don't see this being a pathfinding problem, otherwise the ships wouldn't jump through it at all. Much in the same way if you tell your fleet to go to a space past a wormhole it'll just pass by it instead of utilizing it. Unless there's some screwy coding involved where the AI is forced to take wormholes <.<
Reply #2 Top
Depends how close the AI ships get to it. It might be that the AI actually gets confused and deliberately uses the wormhole, but the way the thing works is that any unit flying close enough to the center jumps through. Your own ships would do it too, if you showed them to fly a path that takes them right around the center. So it could be that happening to the AI since they try to fly in a line and get too close, or it might be an AI fluke, it's hard to tell.

I would say that when you see this happen, just save the game and email it to [email protected] with a description so they can figure out what the AI is doing and why ;)
Reply #3 Top
A timely thread, as I have a question about wormholes. First time I saw one yesterday, and I experienced the AI-jumps-into-it-and-out behavior...with my huge fleet parked there no less. It wound up getting picked off ship by ship. I *tried* following the AI through but my fleet would not jump.

I tried moving my fleet onto it...right and left clicking on it...nada. How does one chase the enemy to his doom? :)
Reply #4 Top
By researching wormhole travel tech in the Civvie tree somewhere ;) Where in the tree it is varies by race.
Reply #5 Top
I don't know how Ironclad did their pathing algorithm, but maybe they didn't code this correctly: http://en.wikipedia.org/wiki/Dijkstra%27s_algorithm.

Maybe it gets confused sometimes when it enters another "tree."

Or maybe I'm just thinking too hard and haven't had enough of my daily coffee quota.