Defend yourself.
Build up your Military Rating (MR). You want your MR to always be ahead of the computers if you never want to be troubled by them.
The best way to build up MR is Corvettes and AMM (Anti-Matter Missiles). The reason is that they are maintenence 1 with great "strength". Now, AMMs are great for ship killing, but they are very poor world defenders (they will be the first thing attacked when in orbit because their "strength" is superior to all other ships) due to their big 1 Hit Point (HP). So, you'll need to toss in a few "real" ships to give your paper tiger army some real claws.
The way to do that immediately is: Buy the best ships you can from your friends.
Downside: This is *very* pricy, even with good Diplo.
The second way is to: trade for ship techs.
Downside: The Majors really dislike trading ship techs. So they either won't do it most of the time, or charge outrageously for it. You are better off looking to the Minor Races for doing these sorts of techs.
The third way is to: trade for the techs just under your ship tech you desire, then go madly forward to get that ship tech.
To get AMM, you got to get Dreadnaught tech. That's some researching (plenty of places online to find all the techs you need to get it). But your friendly Majors will often trade you Dred for some simple, insignificant tech you have... if you are close enough buds.
The best way to stay out of trouble, is to play the game and watch that Military Rating. If it's too low, concentrate as soon as you can to raise it so you are #1, and in the meantime, swap over to the F5 screen, and make sure to "bribe" the big boys that your are on worse then neutral terms with. Keep an eye on that until you are #1.
As for right now for you... build ships. If you don't already have Battleship or Dreadnaughts, you should be able to get Battle Hammers pretty easy (I think it's Defensive Phasers as the Tech to get BH's). They make a decent ship to help out the defense of the homeland with. Expect to lose all trade routes until you can gain control of the local area. If you have BS tech, look at seeing what the difference is between Death Knights and BS are in production. I find that DKs generally aren't worth it when you just want to maintain your MR with a bit of a bite, but when every ship counts, a couple of DKs, in range of easy repairs at a friendly star, can keep your sectors free of everything near tech.
To defend your sector, don't bother with any of these ships unless it's the best you have:
* Battle Cruisers (BC)
* Defenders (DEF)
* Star Fighters (SF)
* Battle Axes (BA)
Defenders are only good for keeping transports out of your stars. And you can do that with a colony ship (free maintenence) or a scout (same maintence, faster to build). Any attack ship other then a star fighter will wipe it out, so that's why it isn't worth bothering with.
Battle Cruisers are too pricey for what they get you. You don't get a serious advantage over anything but corvettes and star fighters by building these. If you are only being plagued by CV or SF, then go ahead... but your own CVs should kick the crap out of the aggressor then. The only good thing about BCs is that they are on the tech chain to get Battle Hammers.
Star Fighters are very cheap, and only good for chasing down freighters, constructors and mini-freighters. If you get caught early on needing MR, they'll help push you up, but just 2 techs away from them are CV, and you are better off just building a few more colony ships (they raise your MR as well... by their 1 defense point each), and going full research for the CV tech.
Battle Axes: I like Battle Axes. During times of peace, I like to kick one or two out for each of my stars. But they are completely passe in AP due to the AI trades for BS and Dred Tech too much and quickly between itself (2 more races make it faster then in GC). That means the window where they are good defending ships is too narrow in AP. Back before BH's got their teeth pulled, the BA was your first real star defender until you could build BHs. Now, the reason you want to skip BAs in GC is that they aren't good at clearing out other ships. They do a good job standing up to SF and CVs, and if attacked do a good job of killing of BCs and other BAs. But you cannot count on the AI attacking them... unless they are defending your star and the AI wants to clear it for an invasion. So you are better off building something a few turns pricier, if you can afford the wait. If not, you might want to consider rush buying, but I've found if you have to rush buy, the game is over.
Don't dispare if all you have are CVs getting turned out every turn or 2. Just get the techs to get better ships... and with enough CVs attacking at once, you can kill anything. Battleship, Dreadnaught, etc. And Corvettes have better movement and/or sensors then most combat ships, so they can help your bigger ships (when you get them) find where those AI ships are that aren't in immediate sight.
Once you are keeping your stars safe, and your MR has shot up to #1, I find it's very easy to get peace whenever I want it.
Good luck!
[Message Edited]