Probably the units should have been given at leat a short memory.
Say, if archers see they brought down a good portion of a friendly unit they should stop firing in that direction for a while. Or the AI general sees huge loses somewhere then he shall change tactics there (even a random change to something ridiculous would get better results sometimes).
So my point is, give AI units the ability to assess what they have been actually doing, and behave accordingly.