Swordsmen are the frontline tanks of humans, they scale well compared to most units. This makes them great in the late game but I find them to be a poor frontline in the early game and they do a decent job in the mid game but until you get gold swordsmen they have a large weakness which is low morale. Once they start taking damage many of them will just run away and the line breaks your backline gets exposed. For this reason, Spearmen out preform them in almost every aspect until you pair Gold Swordsmen with Virion crusader resurrection skill. Swordsmen do gain a 35% damage reduction from ranged attacks when they get to silver tier but this does not include spell damage (mage units, like wizards or lich casters)

Swordsmen do well against: other normal sized units like dwarf miners and any physical damage ranged unit like archers.
Counters to Swordsmen: Dwarf Mech suits, Hero skills, Calvary, Spiders, Scorpions
Swordsmen don’t really counter anything but do well against any ranged unit that don’t do AoE damage.

Research upgrades for the swordsmen unlock at academy level 2
Tier 1: Fitness Training – Increases the health of swordsmen units by a flat amount. This research leads into unlocking Silver Swordsmen
Tier 2: Combat Training – Increases the damage of swordsmen units by a flat amount. This research leads into Reinforced shields which increases Silver and Gold swordsmen’s damage reduction from ranged attacks, this research is critical you should get it.
Tier 3: Advanced Survival Training – this research gives swordsmen a +% flat damage reduction. This research is amazing you should max it as best you can, it also leads into the Fast Reflexes research which gives Swordsmen a 10% bonus to dodging attacks.
Tier 4: Basic Fitness Training – this like the first research provides more health, except this time it provides a bonus +% health instead a flat amount. This research leads into unlock Gold Swordsmen.
Tier 5: Convalescence – This research reduces swordsmen time spent healing in the hospital by a %. This research is very important for the late game but for the early game and mid game you could maybe get away with skipping it and focusing on something else to provide you with a larger advantage in battle. This research also leads into the Garrison Recovery research which greatly reduces healing time for garrisoned swordsmen by 40%!
Tier 6: Advanced Fitness Training – second verse same as the first, more +% health, can’t complain about that. Strangely this research leads to Bloodlust, which increases swordsmen damage by 30% during morale boosts. Very powerful if you know how to start a good chain of morale.
Tier 7: Garrison Training – Increases health and attack by a +% when swordsman are on garrison duty. This research leads to Field Training: Grassland, which provides a huge 20% attack and health bonus to swordsmen when they are fielded on grassland battlefields.
Tier 8: Training Discipline – This research reduces the cost of producing swordsmen by a % this is very important mid and late game to have I would suggest you invest into this. This research leads to “Brutal Efficiency” which reduces the mithril cost of swordsmen by 20%, this is amazing considering mithril is very rare this research is very good.
Tier 9: Elite Combat Training – More +% damage can’t go wrong with that. This research leads to Weapons Research, which increases swordsmen attack by another 20%!! That is a huge increase.
Tier 10: Advanced Convalescence – same as the previous research by this name more reduced healing time very good for the late game. This research leads to Advanced Garrison Recovery which reduces heal time for garrison swordsmen by another 60% for a total of 100% reduced healing time.
Tier 11: Elite Survival Training – More damage % reduction, very powerful. Leads to lightning reflexes which gives swordsmen another 20% dodge for a total of 30%.
Tier 12: Elite Fitness Training – More +% health. Leads into the research “Regroup” which increases the troop size of swordsmen from 24 to 27. This research is nice and also terrible as it would mean your gold troop supply is now 27 instead of 24 which can create issues when trying to squeeze everything out of your very limited gold supply, that said it is a straight up buff to silvers.