I would like to share my thoughts about defense algorithms with you:
The more complex an algorithm is the more weaknesses it has.
So lets keep it simple: (well, I hope it will be
)
The Situation: An enemy attack stack is in sight.
1. Based on strength of attack stack and closeness to cities, threat levels are assigned to every city.
2. Cities free up defenders based on threat level.
3. Freed up defenders move to city the attack stack is closest to. Counter attacking is considered.
( So there is no "downhill flow" but rather a direct movement towards the enemy )
4. Siege and flanking units should attack.
( I think a direct attack order for all (most) siege units is just fine. maybe add a little grouping here. )
5. Consider counter attacking.
Thats about it.
If the city cannot be defended maybe a retreat is a good choice?
Another thought is looking for good defense plots near a threatened city and station some defenders there. This is to split/avoid enemy siege attacks. The defenders outside the city could stay healthy and would therefore be a good choice for counterattacking the enemy.
Greetings and thanks for this great mod,
RiHatz
The more complex an algorithm is the more weaknesses it has.
So lets keep it simple: (well, I hope it will be

The Situation: An enemy attack stack is in sight.
1. Based on strength of attack stack and closeness to cities, threat levels are assigned to every city.
2. Cities free up defenders based on threat level.
3. Freed up defenders move to city the attack stack is closest to. Counter attacking is considered.
( So there is no "downhill flow" but rather a direct movement towards the enemy )
4. Siege and flanking units should attack.
( I think a direct attack order for all (most) siege units is just fine. maybe add a little grouping here. )
5. Consider counter attacking.
Thats about it.
If the city cannot be defended maybe a retreat is a good choice?
Another thought is looking for good defense plots near a threatened city and station some defenders there. This is to split/avoid enemy siege attacks. The defenders outside the city could stay healthy and would therefore be a good choice for counterattacking the enemy.
Greetings and thanks for this great mod,
RiHatz