Early on, I've found that Kerghit recruits are always the best bet. They are almost always on horseback even as recruits, and that gives them a big advantage against almost any evenly numbered bandit fighters. The only thing Kerghits early on don't go good against is the higher leveled deserters and the armies of the different factions. Even then they can still prove a match to most unhorsed ground troops of even number, especially if you get in there and help them out.
Later on, I've found that Swadian Knights will beat anything, tactics used or not.
Even later on, I've learned that a good combination of powerful melee troops and ranged troops are the best when assaulting any castle or town. With emphasis on the melee troops while not forgetting the need for the ranged troops to hold position at just the right range so as to hit most ranged units standing on the walls. I've also found that a good combination of powerful horse troops and a mix of ranged and melee foot troops work very well against foot troop attackers, but then many times, you only need horse troops to fight them, unless your in hill/mountain country, then a good number of archers helps alot. To add to this strategy, I find that telling my archers to charge after my melee troops have broken into and onto the walls of the casle very helpful because they help to take out the archers standing away from the wall. I will usually carefully get up on the wall behind my melee troops and then find a good place and tell my archers to hold that position. It's rather difficult to get the archers to do what you want on the walls of the castles, but sometimes it helps.
About the same time I also learned that when confronting horse troops that like to pummel through foot troops, it helps a lot to have a lot of foot troops, mostly ranged, but with some that are melee as well all huddled together because it is so fun to see as a brave horseman comes charging into my crowd of archers only to be halted and almost just as quickly and helplessly dispatched. However, even in that situation you need those horse troops to chase down and take out the enemy horses that refuse to charge and only ride around shooting arrows or throwing things.
I find that when I'm outnumbered, the best strategy is to pick the highest hill that allows the most view around me, put my foot troops on top of it, huddle them together, in most cases, and have my calvary standing nearby and waiting for the enemy to get just close enough to keep them well in range of my view and my archers. Although archers calm down when the horse troops are attacking, I'll usually call my calvary back behind my archers after they are nearly done dispatching the first wave. I will usually then ride around taking out the remaining straggelers that haven't been killed yet. Then we wait for the second wave. I have found this calling of my horsemen to come back after every wave to be very helpful, especially in getting some enemy horsemen to run into my huddled crowd of archers that then quickly dispatch them.
One thing I like to do with my calvary is to have them follow me as I pummel right through enemy ranks and then tell them to charge because I find that when I tell them to charge, they don't always keep straight, they start turning diagonally halting other cavary from pummeling through the enemy foot soldiers. Usually this problem is easily rectified by spreading them out as far as possible causing calvary to attack the enemy from all sides, but that only works correctly, usually, if the enemy is close, otherwise they start running diagonally across eachother's path.
I have a frequent problem that I don't know how to rectify. The melee troops that attack a castle usually have a specific path that they take in fighting the enemy troops, which is fine, but sometimes I see a real good openning that if I could take just few melee troops, I could have them follow me to a location behind the defending enemy fighters and flank them. But I have yet to find an order that willl allow me to take just a small group of melee fighters away from the rest to flank the enemy troops. But maybe it's for the best, it would be quite annoying to successfully flank the enemy just to have my little group destroyed because suddenly enemy reinforcements appear out of the air right next to them. However, it would also help a lot when I need only a few melee troops to help me take out a group of troublesome archers on the far wall while allowing the rest to continue to advance against the enemy.