Try staggered lines.
A center line of swordmen. And behind that on the flanks have spearmen. As cav want to outflank and hit the rear, start off with you spearmen in those positions. Then between the spearmen place your archers. To the rear of these two lines place cav. Cav are there to outflank the enemy and hit the enemy archers and then to attack the enemy infantry from the rear. I only commit them once all enemy infantry are engaged in combat, this prevents them moving around to attack my Cav.
I typically have infantry : archers : cav ratio of 4 : 1 : 1
With a horse archer civ it would be a 1 : 1 ratio of infantry to HA.
For instance in my RTW:BI Saxon campaigns I create mini armies on and off the battlefield that consist of 4 Levy Spearmen : 1 Hunter : 1 Sea Raider. These 6 units form a battalion. And then I will form up armies by having 1 to 3 battalions. Each of the battalions fights independently on the battlefield with the exception of the Cav which form the reserve.
My selection criteria is based not only on effectiveness on the battlefield but the maintenance cost to field the army and the easy of replacing troops. Lower level troops are easier to replace and cost less.
I have another army which is made up of the higher level troops this is my reserve force and is to deal with any threats that wipe out my battalions.
Bookmarks