The Swordsman has excellent melee combat strength but lacks the armor and high hit points of the Pikeman. These high powered offensive melee units are most useful at clearing Pikeman formations and drilling the keep when archer support isn’t a given.
To gain access to Swordsmen you need to be rank 13 or higher, have available swords, armor, peasants, gold, and have completed required research (see table below).
There are few exceptions where Swordsman play a defensive role, Pikemen are better in just about every situation due to the swordsman’s low hit points and default aggressive stance. The only exception would be if you cannot station very many archers in your castle for some unusual reason. Whenever moderate archer support is present, Pikemen make the better defender.
Swordsman are a fair match for knights and will take one down much faster then Pikemen could.
Due to their high melee combat strength, the swordsman truly shines when clearing the keep of defenders. Fast keep clearing allows your attack to succeed in short order, giving the defending archers less time to kill off your assault force.
Swordsmen are also superb moat diggers and will breach a moat faster than any other unit. However, there has been much debating as to which unit is best for digging up moats, I have concluded that both Pikemen and swordsmen have their merits and each can work well given the correct situation.
The rule of thumb I employ is largely based on the number of catapults I used in the attack. If I’m using 100 or so catapults, I tend to favor Pikemen to dig the moat. This is because, although fast, once the swordsmen are through the moat, all they can do is stand in the catapult volley getting hit while the catapults take down the towers. Pikes on the other hand dig moats considerably slower. So by the time they get through the moat, chances are that the towers have already been destroyed, allowing the Pikemen to bring the fight to the keep.
So here is my rule, if there are 25 or fewer catapults in my attack, I will use swordsmen to clear the moat. If there are over 25 catapults in my attack, then I use Pikemen. Of course this is not by any means the be-all end-all approach and I encourage you to experiment and figure out the army composition formula which works best for you.
Tip: Using the Captain’s Battle Cry tactic in conjunction with swordsmen will allow you to cut through Moats like warm butter.