Quote Originally Posted by player1
There is big difference in custom battles when AI faction is acting like attacker or defender.
If you don't set anything in custom battle they act as attacker, and are playing agressively.
If set to defender, if weaker they will camp on nearby hill, and wait your forces.

P.S.
Yes there is an option, just near team markings (I, II, etc...), the red thing.
Thanks player1. Yes it does say clicking the shield so it lights up red makes the team defender. I clicked the shield next to my faction in the last test, and that's why there was no difference in the AI behavior.

I made the AI archers the defender in another 3 archer vs 3 hastati test, and the archers didn't move. They stood with 2 in front side by side and the general centered behind. When I advanced the hastati, at a certain distance the 2 front archers moved forward to what looked like max range and started shooting. I stopped the hastati and the 2 archers fired all their arrows at which point they moved back to their original position. I moved the hastati forward somewhat and the AI general moved forward and fired all their arrows and then moved back to its original position. The hastati each had about 40 men left.

I advanced to about 50 meters away and the front 2 achers charged. This attack was repelled with the archers having 47 and 45 men left which rallied and returned to approximately their original positions. After that, the archers didn't want to attack and gradually shifted to the sides with the general moving back when I advanced. Eventually, the 47 man archer made a flank attack on my left hastati, and it was repulsed. I sent one hastati forward, and the AI general's unit ran around behind my hastati line near the 45 man archer. Using the hastati on the right, I moved toward the general, and the 45 man archer attacked and was repused. It rallied and came back and attacked the hastati again, and this time the AI general charged in support and routed the hastati. The AI general pursued and ran into my other hastai and lost after some fighting.

So, the AI's behavior is quite different in this testr when it is the defender. I've observed this in my campaign battles as well, but I have had campaign battles where I was the attacker and the AI defender acted aggressively and attacked me.