In Eberron, the warforged are a race of sentient constructs, originally built for war but now capable of deciding and pursuing their own purposes in life. Many, however, continue to serve in the role for which they were first devised.
Warforged soldiers have very high Strength and Constitution, high Wisdom and above-average Dexterity, an ability contour that combines brute melee ability with excellent strategic judgment. Proficiency in Perception makes them good at spotting enemies who are trying to be sneaky, but they’re not ambush attackers—they have no particular aptitude for stealth themselves. They are, however, capable trackers, thanks to proficiency in Survival.
Their Multiattack comprises only melee attacks—specifically, Armblade—so warforged soldiers want to close with their opponents quickly in order to make use of this weapon. Until they get within melee reach, they use their javelins as throwing weapons. However, beyond 30 feet, they have disadvantage on these attacks, and there isn’t much they can do to change that. Consequently, if their movement isn’t enough to get them within 30 feet of their foes, they either Dash—if they’re in close formation with other warforged soldiers, allowing each one to use the Protection reaction on another’s behalf—or Dodge as they advance. Between 10 and 30 feet away, they hurl a javelin.
Their Intelligence isn’t out of the ordinary, but they quickly recognize when a particular opponent is causing them greater than average trouble, and they do what they can to take that opponent out. If they can’t easily get at this foe, one tactic they employ is to divide themselves up between a front line that handles melee engagement and a line of javelineers who stand behind the front line and launch ranged attacks. The target may be beyond their normal javelin range, but they can’t help that; it’s either long range or nothing, so they assign as many of half their entire number to this duty.
Warforged make highly disciplined troops, and like hobgoblins, when attacking in large numbers, they divide up into multiple units that can move independently, so that some can hold a front line while others outflank and, if they’re numerous enough, encircle.
They also combine a healthy, prudent sense of self-preservation with the will to press toward their objective even at risk to themselves. Individually, they don’t retreat, but a cohesive unit of warforged soldiers falls back when all of its number are moderately wounded (reduced to 21 hp or fewer) or half or more are seriously wounded (reduced to 12 hp or fewer), unless they’re clearly putting more hurt on their enemies than their enemies are putting on them. While more injured individuals Dash back, the less injured ones act as their rearguard, Disengaging as they withdraw; they maintain a tight enough line that they can impose disadvantage on pursuers’ attacks using the Protection reaction.
Warforged soldiers fighting alongside allies who aren’t warforged soldiers act as their rearguard, more or less following Asimov’s Three Laws of Robotics: first, striving to keep their allies from coming to harm; second, following orders; and third, defending themselves. They don’t have to follow these rules—they have free will—but their training is such that they come naturally. When warforged soldiers deviate from them, it’s usually because they perceive themselves to outrank their allies and therefore consider themselves to be the ones whose commands others ought to follow.