I try to create a "AI" that can move independently on a map structure where the individual maps are only connected by one directional teleport squares (links).
There are some map areas you can only traverse if you fulfill some requirements.
(for example you could be too heavy to swim.)
Movement is limited to 4 directions.
So far I use A* to navigate on a single map.
For the shortest path across multiple maps I came up with a pre-generated graph.
I use the links as nodes and search with Dijkstra because I wasn't able to come up with a working heuristic for that (no spatial arrangement of the links).
I generate the graph by calculating the cost for every link target square to all other links on that map. (tons of A* searches per map, takes 8-10 minutes to complete).
Then, for an actual search, I temporarily inject the start and end-point as links into the multi-map-graph (and do the cost calcing using A* without persistently saving it) so I can find the fastest way to the goal.
I get a list of goals, one goal per map out of that and just need to do an A* search for each goal on the corresponding map.
The tricky part in my approach is that the costly pre-calculated data isn't able to reflect the dynamic conditions for example swimming. (sometimes there is a completely different route necessary.)
Now on to my question(s).
Is there a known solution to this combination of problems that I'm just unable to find?
Has anyone already faced something similar?
There are some conditions that I want to meet. I'm already almost at the memory(ram) limit (that I'm willing to sacrifice) and I want to keep the disk IO as small as possible (multiple ai would be kill).
I thought about just pre-calculating path for every possible condition and at the moment that could actually work but I'm 99% sure that this wouldn't work in the future (because the size grows exponentially).