Facing the 2-on-1
If you play long enough, sooner or later you will run into a situation where you're fighting a two-on-one war. This might happen because you just got stuck in the middle of a bad map, because your ally left or was nuked, or any number of reasons. Unless you really want to test yourself and actually fight this war, your best bet is diplomacy. Most players recognize the unfairness of a 2-on-1 battle and, if the situation was caused by the map anyway, will be willing to work out an alternative solution. If this is not possible, then you will have to rise above your normal level of play if you expect to stay alive.
The first thing you have to do when faced with doubleteam is to quickly evaluate your position — are you in between your two opponents or are they both on the same side of your map? This simple question will determine how you should react. In either case, though, you must move swiftly and decisively or you are lost. You cannot sit back and simply wait for an opportune moment to pick off a planet or two; you have to be viciously aggressive.
Once you have determined where your enemies are, you should next determine *who* they are — which empire is the stronger/more experienced and which is the weaker/less experienced. This is of crucial importance when you are in a two front situation, with enemies on either side. In this case you should launch a massive attack on the one which can be most quickly and easily nuked (whether that be because they are weaker, less experienced, have a Home World closer to your builders, or whatever.) You must be sure that you're able to nuke that emp on your first wave because the other one will be sending a fleet at your opposite border while you are busy. Once you nuke the one player, you can either dismantle your fleet and rebuild to meet the new threat, or move your surviving ships back to defend. Be willing to sacrifice a planet or two if that will slow down the new attacker — remember that if you can just stall him out you can colonize all the planets of the empire you just nuked. You will likely be at an econ and tech level disadvantage, but once you get it to a 1-on 1-fight you can return to a style of play you are more comfortable with.
The situation where both enemy emps are in the same direction offers different challenges, which must be met with a different response. Here you do not have the opportunity to fight the two emps independently, you have to fight their combined strength (probably economically as well as militarily since they will have met and probably gone to trade/alliance.) You must do everything you can to prevent them from combining their fleets. Even inexperienced players are nearly impossible to defeat if they can get their fleets together and coordinate their movements. Again, you have to take the war to them before they're ready. Hit the closest empire with everything you have. Hopefully his partner will not have a builder close enough to the front to reinforce him and you can get a quick nuke. This will often shake the other player's confidence, since he fully expected to win the game without much trouble. Once you get the first nuke, just as in the two front situation, you should solidify your defense, try to catch up in tech level, and fight out an uphill 1-on-1 battle.