In RTS games a basic technique required to get the game working is pathfinding. Everyone knows what A star is. However when we talk about realistic AI the process of getting a task achieved could be labeled “pathfinding” as well. For example if you are using a computer if you need a certain task achieved while working on it you have to mentally find your way through all the menus. like you need to imagine all the windows and dialogs that need to be opened (in the correct succession), all the buttons that need to be clicked until the task is achieved. Only after you have found the path you may actually start clicking the mouse and get the thing done. The same principle applies in the case of a realistic Starcraft AI. When you/AI is attempting to defeat the enemy what takes place is a process of pathfinding through the obstacles found in a particular scenario towards victory.
With normal pathfinding you`re looking for a path between two locations, in the case of the realistic AI pathfinding you`re looking for a path between two situations.
Anything which can be represented as a graph, like multiple potential actions leading to certain events, including eventually different sequences of actions leading to the same events, can be processed by graph algorithms.
The actions are the edges, the events are the vertices in the graph. The edges can have a cost, e.g. ammo needed, and health do be lost. From such graph, Dijkstra could find a sequence of actions with minimized cost to cause a certain, final and desired event. A Spanning Tree could help if multiple events must be passed.
Notice, the grid based path finding in games is not the 'normal case' as you say. The normal case is to use graphs, which means we have vertices and nodes, likely with adjacency lists, so a vertex knows all it's edges. But unlike a mesh, there is no need for a spatial representation of this. There is not even a need to say we are in 2D or 3D. So yes, you can and should use those algorithms for many things, as you have just discovered.
What makes the game grid so special is: The adjacency of a vertex (in this case a grid cell), is implicitly given by the grid structure. We do not need to store an adjacency list to find neighboring cells - we can just use simple increment and decrement on the current grid coordinates to find all neighbors.
So this is how you put your ideas to practice: Make a graph data structure, write a new Dijkstra which works on that. Represent your potential moves in a game as such graph, and it should give you some smart decisions.
Well, i don't. How does it work?