How were pre-modern battle formations determined?

How exactly was it determined which soldiers would be at the front line of a square of pikemen, who would be behind them, who behind the last, and so forth until the rear?

How were the infantrymen who would be at the front line, i.e. the first to be shot, determined during the 18th century wars? In Barry Lyndon, for instance, a formation of British redcoats is shown marching straight towards the enemy. The first volley of musket fire takes out six or seven men from the front line, who fall dead or wounded, then the soldiers keep marching; the second round of musket fire takes out a few men out of the next row; and so on.

How was it determined which men would be right in the first row? Was this assigned randomly? Obviously the men in the very rear row would be the least vulnerable; did guys try to get in that position, by bribing officers or something, or was it a completely random deal?

If I’m not mistaken, in Roman legions, soldiers were organized by age . The youngest on the front, more experienced soldiers behind them (and one of their job was to make sure that the greens on the front wouldn’t break and flee), and the veterans on the rear as a kind of reserve.

This is true of the early roman armies, however they where organized into larger formations by age, I have never read anything to indicate that age played a significant role in how individuals where placed within the formations.

I believe it was mostly random, soldiers were trained to hold any position in a formation (I.e., in an about turn manouevre those who had been in front would end up in the back row, and so forth.) and NCO’s generally carried a half-pike to line up soldiers straight during battles and would pull up those from the middle rows to fill out any gaps, and it was also used to stab any enlisted soldier who broke line, as a general reminder of their expendability.

I’m not sure, but I’m guessing random order.

The depth of phalanxes (more than 5 men deep) was to give the entire formation momentum, not giving the front line anywhere to move but forward (and slightly to the right, for other reasons).

As mentioned, prior to the Marian Reform, Roman Maniples were organized by rank and experience. Past that, veteran troops would be promoted to NCOs, auxiliaries or elite units. Among the rank and file though, every legionnaire was equally gladius fodder.

Armies have always enforced the harshest sentences for cowardice, from the Roman decimation to the British floggings to the Prussian gauntlet. NCOs ruled their units with discipline and fear, and would incur pain on any soldier who showed reluctance in taking his place in the line. Worst was probably the tsar’s army, where conscripts could have their teeth knocked out on the parade ground, and where NCOs were given the same punishment as their soldiers.

Religion also played a role up until quite late, as well as national fervor and loyalty to whatever royalty being served (depending on country and conflict).

You can also count in the fact that many soldiers sought to make a career in the military, and showing anything other than valor in battle was a sure way to cut a career short, by a short, sharp, shock.

A point about the Roman formation was that in battle, the front man in each file only fought for a little while before the guy behind him moved up to take his place. The first guy then went to the back of the file. Then he made his way back to the fighting as the process repeated. This made sure that the guys in front never got too worn out and that the front edge was always relatively fresh. So one’s place in the rear rank at best delayed fighting rather than prevented it.

One thing that affects whare a man is positioned is his height. Short guys like me are put at the edges of the formation so that our view is not blocked by the big guys (Actually, it’s so that we can’t hide in the middle where the NCO can’t see us).

From what I’ve read, practices varied widely, sometimes being culturally determined and sometimes according to the prevailing theories of specific charismatic commanders.

Some commanders would put the best troops in front, others would put them to the rear to deter the less reliable troops from running away. Some armies probably did do it “randomly” (which really means letting the noncoms decide, since someone has to put the guys into order) but I think that most cases were either determined by a cultural rule or it was one of those things where “everyone has an opinion” and the New Guy In Charge reorganizes the formation according to his favorite ideas.