They're quite viable in SP as part of the right overall strategy,
Actually, in terms of strict gameplay, the player is better off not building khevsurs, berserkers, in favor of just building more swordsmen. You become militarily
weaker if you do this. It is a "noob trap." (Even in the best case, khevsurs on hills trade evenly with knights. Which cost the same and outrun them and are on an upgrade path. Sigh.) Samurai are okay, just a bit pricey.
See
this comment in the Buff Georgia thread a month back. You actually get about 70 cents on the production dollar if you build Khevs and berserkers and use them in combat. Samurai fair a little better and roughly wash with swordsmen. It's not really that these units are too weak; samurai are actually good on strength, khevs and berserkers are too low- it's that they cost too much. WAY too much.
Pikemen do not counter knights. Not in the way unit counters actually work. You are paying 200 production to deal +4 vs knights, about 1.17x on offense or defense. Knights cost 180, and they have more mobility. But guess what? Pikeman are also countered by swordsman, a unit which costs
less than half what they do. Swords also brutally slaughter spearman, which they are also contemporary with, which means there is no reason to field the one unit that upgrades into pikeman against someone with iron (who will field knights against you later,) because those units are at a
21 strength disadvantage to swordsmen. There is no reason to build pikes when you can make xbows, as others have noted.
Swords are incredibly powerful units because they have to be the melee line answer to late middle ages units like xbows. This makes them way too strong in the classical and obsoletes early anticav (spears) leading to a dearth of units to upgrade into pikes. IMO, even if you fix the production cost of military tactics units, these ironclad lads are the real problem.
What would need to be done, IMO:
Anti-cav:
Boost spears to 30 strength to make them worth building. Horseman are stronger than spears 1v1, which is depressing. And as mentioned, murdered by swords.
Make pikes a true "no resource; levied peasants" unit. (reduce build cost to about 130-140ish.)
Melee line:
Split swords into an early classical unit (swords as we know them) which are weaker+a little cheaper (80), and a mid-medieval unit which is stronger than current unit and costs about 140.
something like 30->45ish. The "longswords" can come at military tactics and be the base unit for these civs UU. 45 is for round numbers, true balance is more like 43.
Heavy cav: we'd need to up heavy chariots to 30 as well to compensate for spears buff.
Barbarians: this would upset how spears guarding camps interact with starting warriors. Maybe barbs need a unique unit to fill this role.
Tech: general pass to make techs unlocking units somehow require the tech that unlocks the predecessor.
i would much rather see a true overhaul of how our two infantry lines interact with each other, but that's the quick and dirty.