system
Given the following post, respond as if you're commenting on Reddit:
human
[Star Wars] What could the Empire have done to win the Galactic Civil War?
gpt
They were winning until the meeting of raggedy farmboy, one old man and one little green old man. Every single battle nearly went the Empire's way and each one lost was a brutal thing for the Rebellion. Let's go through a couple of them.

The Battle of Hoth: There are eight Star Destroyers (Executor, 6 smaller but still impressive Star Destroyers of two classes and one Victory class) involved. Executor closes with the planet and proceeds to blast the surface with their turbolaser batteries, ignoring the shield generator. Eventually the base with flood (with magma or ice).

The two Imperial-1 class destroyers fly interference for the Executor, keeping fighter wings in the air as well as intercepting anything attempting to escape. The four Imperial-II class destroyers blockade the planet: One at each pole, and one either side of the equator to watch for trickery. The Victory class destroyer is a mobile interception device for capital ships and corvettes launching from Hoth.

Now all they need to do is wait. They'll either pick the base off piecemeal, destroy it with Turbolaser Terraforming or the rebels will attempt to flee: In which case, the remaining destroyers will pick them off. The Ion Cannon doesn't act as a permenent 'disable', the base has a limited power generator and there are too many ships for the Ion Cannon to cover for. The planet will give way long before they starve the rebels out. Hell, the 501st had elements in the fleet sent, they could have just left everyone in orbit and stuffed Vader with them into a drop pod, unleashing on the base instead of the costly assault.

On Bespin: A heavier hand. The figurehead of the rebellion and five of its greater heroes were present.. and all of them got away. As soon as the trap was sprung, simply moving in with heavy interception cover would have been enough to decaptiate the Rebellion. They had, at the bare minimum, twelve fighters: Three ties, 8 tie-interdictors and at least one Tie Defender (Which was probably capable of destroying the Falcon alone). They'd surrender before dying, so Vader gets his apprent-er, 'the emperor's prize', the Rebellion gets executed in a suitable gory fashion on Galactic Holovision and the Rebellion ends. 

The Falcon, a known dangerous and rebel-owned craft, was sitting on its landing pad the whole time. You've got EIGHT Tie Interdictors (bombers) prowling Bespin. Maybe one could spare a second to drop some ordinance on the powered down craft? The one on a pad with no supports barring its umbilical, about 50-100m out from its parent building?

The Endor mission: Blow up the shuttle. Blow. Up. The. Shuttle. Don't let Vader know, just tell him whatever he wants to hear, blow up the shuttle that he expressed such interest in (or send a massive force after it) and run screaming to the Emperor about it BEFORE you get murdered by Vader. You're high enough in the chain of command that you'd get let off with a little light torture from the Big E and a pat on the back afterward, while you still screamed. 

Not even that: Endor generates a bit of a jamming field for comms when it comes to stormtroopers, put a few comm-relay stations throughout the moon, on patrol paths. That way, they don't need to return to base to report 'suspicious rebel commandos'.

Christ. They could have built the DS-2 around Coruscant: It's in the galactic core, there is plenty of space for a shield generator and it is HEAVILY defended. Or Byss, the Emperor's future throne world. Not only is it heavily defended, it's even further into the Core than Coruscant and Palpatine is even more powerful there. He can very literally puppet a good portion of the population.

Or even extermine the Ewoks: They're a warrior culture. You know it, they know it. Your first expedition to Endor was nearly foiled by the furry little bastards, who were surprised and outnumbered. You know, the one where they were looking for a site to set up the shield generator for the second Death Star? Or don't even bother! First, glass the area with turbolasers. A quick planetary firestorm and you've got a nice wasteland to build your facilities in. Suddenly, no ewoks. You can see the rebels coming a few kilometres away. Hey, presto, no exploding battlestation.

Maybe we could go back a ways? On Tattooine: Instead of orbiting the planet, they could have lurked in a geosynchronous orbit above Mos Eisely, the only major space port. Even one Star Destroyer, while the other prowls the orbit in case of unknown landing pads.

Aboard the first Death Star? Execute Leia. Well, execute her faster. Don't schedule her for execution, choke her to death. Record it as a very visible symbol of the death of the rebellion: She dies with her world. You already interrogated her, you failed. She lied when exposed to extreme duress. It's not going to work.