Ok, so I've heard that stargates and wormholes are too complicated for AI, so let me ask a question and show how little I know.
If the AI is checking to see the shortest path between two points, and assuming that each pair of wormholes lead to one another, couldn't the AI compare the time travelled to destination to the time travelled after going through any one single wormhole?
That would mean, for wormhole pairs discovered, given n total wormholes, it would take n+1 checks: It checks once for the direct path, and then compares that to each path that includes entering one end of a wormhole pair. Before performing the checks, wormholes could be subtracted from the list if getting to the wormholes takes longer than getting directly to the destination.
This game seems to run FAST, so I think this improvement won't hurt computers under 1Ghz as much as they would help make the game more fun.