The AI's stupidity lies in the fact that 1) it attacks neutral monsters but doesn't touch what they are guarding, 2) it never retreats in battle even when losing, even against the strongest heroes, making it easy to finish it off even with a strong army, and a level 1 hero cannot stand against a level 20 hero, no matter how strong their army is.
2) It does retreat sometimes, especially when playing on the highest difficulty. I actually prefer it not to retreat; it's just annoying to chase it all over the map, especially since it quickly replenishes its army after a defeat.