It's the only think AI can do, in fact - it's called searching the tree of variations. It's how AI plays chess - because each position is a discrete node that can be evaluated with reasonable ease, chess AI with sufficiently strong CPU can nowadays beat the strongest humans.
The problem is the evaluation function, though - in a game like FE, where units can move with relative freedom, each position can lead to many different resulting positions, and the complexity increases exponentially. The computer is always weak in positional analysis though - games like Total War series show this. It does not realize things like "this archer unit is too exposed" or "these units are too vulnerable to cav charge, move them closer to forest". These observations require long-term, heuristic planning computers are usually incapable to do - and when their tree-searching algorithm starts to see the disasters, it's already too late.
If you try to "script" the correct behavior, like "move infantry no farther than x from archers" or "charge archers with cavs when they are closer than y, but withdraw if pikemen are closer than z", the resulting behavior will be inflexible and repetetive, and humans will soon learn to exploit it (Total war, again).
Writing AI is hard, because true AI must be adaptive. Sadly, that means having a memory of past successed/failures, pruning the bad behaviors and developing the good, simply having an AI capable of learning. No such thing in current computer games - bar some old quake bots I remember.