I recently finished a campaign against Carthage and I found them to be a tough fight. This is what usually worked for me.
First, an image of one of my Roman armies advancing against a stack of Carthaginians:
My legion consists of:
2 Generals
5 Hastati
5 Principes
4 Velites
2 Equites
2 Triarii
The first row of my deployment are all five units of Hastati, set to fire at will. They supported at intervals by four units of Principes. One unit of Principes are held in reserve, usually in the center. The two units on my far flanks are Triarii. They are supported by Equites. How far back I place the Equites depends on the enemy strength in spearmen. Behind the principes is a line of four units of Velites. These are also set to fire at well.
Two basic principles:
(1) Extend you line as far as you can. If you’re playing a campaign, the AI will usually (not always, but usually) gather their units into a single group at your center (as the Carthaginians have done here). Your goal is wrap your ends around the enemy line to attack their flanks.
(2) You want to reduce your enemies kill factor as soon as possible. Since I am fighting the Carthaginians, they can kill me with their phalanxes, they can kill me with their javelins (light infantry), and they can kill me with their missile troops. I need to effectively respond to each of these attacks.
Here’s how the formation works:
First, I advance my formation to within missile range of the Carthaginians. My Hastati and Velites open fire on the Carthaginian lines. If there is a particular tough unit, I may open fire with my Principes, but I usually save their missiles as a reserve. This fire will usually cause the Carthaginians to attack. If not, my Hastati will attack the front of the Carthaginian line at spaced intervals.
Once the Carthaginian units commit to fighting my Hastati, I then engage my Principes. Because the Hastati are fighting at intervals, the Carthaginians usually have wrapped around my Hastati units. Sometimes they achieve this by using two or more units on my Hastati. Yes, I’ll be losing some Hastati. I now commit my Principes by attacking these units on their flanks or sides, or simply reinforce the thinning Hastati.
On my flanks, any unit that is not engaged, which is usually the Triarii and one of the Hastati units, will now advance in a forward curve to circle around and strike the end units on the Carthaginian flank. This is known as the hammer and anvil tactic: the anvil are the Hastati and Principes that fighting from the front; the hammer are the units that are circling the flanks to strike from the rear.
By now Carthage commits all its phalanx and light infantry units to the fight. I now bring out my equites and sweep around the sides to rout the missile troops in the rear. This eliminates their kill power. If I haven’t already, I will engage any units of Carthaginian cavalry. If I have a general unit with any amount of cavalry bodyguard (even if it’s just a dozen or so), I’ll use them to run down light missile troops and routing units.
By now, the Carthaginian flanks are broken and are routing. Rather than give chase, I simply fold my Triarii, Hastati, and Principes into the center of the line, building both the effect of the rout and power of my rear and flank attack. Usually within a few minutes the entire Carthaginian line has routed.
I hope this was useful.