War isn’t actually total chaos. War most of the time is just movements, manœuvring and logistics, and can even be pretty boring from a soldier’s perspective. Only the battles or skirmish can go full insanity.
Now, how did commanders know if they were winning or losing the war ? Well first they had to know their war objectives and their opponent’s : controlling a specific region/city, destroying the enemy’s force or its willingness to fight.
Now that you, as a commander, have established what your objectives are, and what the opponent’s are, you need to understand the means to achieve them : how to move your troops and supply them, where to cut off the enemy lines, how to concentrate powers at the right place and time to strike, what can you do to hinder the enemy’s morale (taking specific locations, turning their population weary, losing key allies, access to materials etc etc)
If you now know what you should do to win the war and how to achieve those goals, and have an idea of the same thing on the opposing side, you can know the state of the war, winning or losing, by studying at what point in those objective completion both sides are.
If you know you have them on the run, are on the verge of taking a key supply chain, that their population is growing weary of the war or whatever, you know you ate winning . If you realise you’re being cornered, that Your supplies are getting low etc, you know you are losing.
But war isn’t total chaos 100% of the time. It’s much more about strategy (and tactics on the field)
Latest Answers