system
Given the following post, respond as if you're commenting on Reddit:
human
[Star Wars] How long would Luke have to stay on Dagobah in training to defeat Vader and Palpatine in a fight without​having to rely on Vader being conflicted? Would Yoda even live that long?

What was the plan in Yoda's mind? Does Yoda have the necessary equipment such as training droids and lightsabers? Who is he going to spar with other than Yoda to get exposed to different fighting styles?
gpt
We have to remember, Luke is an absolute prodigy by all accounts. 

Within a few minutes of learning about the Force, Luke was able to deflect shots from a training remote, blindfolded. Padawans who had presumably been training for *years* are shown to be performing the same training as Luke in holorecordings during the final years of the Old Republic. 

With no more than a few days training with Obi-Wan, Luke was able to actively use the Force to line up a nearly impossible shot to fire a proton torpedo into the thermal exhaust port of the Death Star. Also, notably, Luke is so connected with the Force that he can hear Obi-Wan speaking to him from the Netherworld of the Force, something that both Yoda and Obi-Wan had to specifically train during their exile in order to do. 

Vader himself comments on how strong the Force is with him. 

Through a few years of, presumably self directed study, Luke is able to use telekinesis to wrench his lightsaber free from the ice on Hoth, and takes down a AT-AT walker through creativity and his lightsaber. Also indicative of his growing power, Luke is not only able to hear, but see Obi Wan's spirit on Hoth. 

He trains with Yoda on Dagobah for an unspecified time (probably no more than a few weeks). Even though he is a neophyte in the ways of the Force, Luke is able to generate enough power to move an entire X-Wing, although he cannot completely lift it from the swamp (look at Yoda's shocked expression as the ship begins to rise from the swamp). More evidence of his growing abilities are present here, as he can not only hear and see Obi-Wan's spirit, but actively converse with him. 

After a short time with Yoda on Dagobah, Luke is good enough with a lightsaber to not immediately be overwhelmed by Vader (although Vader is clearly holding back), and acquits himself relatively well for someone who has had maybe a month of formal training under his belt. 

We next see Luke on Tattooine, where he has been using Obi-Wan's journals to help complete his training. During this time, he has built a new lightsaber, and has acquired enough knowledge and control over the Force to Force Choke two Gamorrean guards with a simple gesture. He also demonstrates the use of the Jedi Mind Trick, although he is unaware that Hutts cannot be influenced. 

On the barge above the Pit of Karkoon, Luke demonstrates the ability to hold off several blaster wielding foes at extreme close range, and succeeds in his efforts to rescue Han and Leia. 

Upon returning to Dagobah, Yoda himself states that he does not require any more training, and that he will be a Jedi once he confronts Vader and the Emperor (presumably his final test of will and resisting the Dark Side). 

Above Endor, Luke is able to use his limited, self directed training to duel on even footing with Vader (although, admittedly, a conflicted Vader), and eventually overwhelms his father in a fit of rage after Vader threatens his sister. Shocked at what the Dark Side almost made him do, Luke rejects the Dark Side completely (no small feat), and refuses to bend to the Emperor's will (another impressive feat). 

This obviously pisses Palpatine off, but Luke is able to resist the Emperor's Force Lightning (the same stuff that killed Jedi Master Mace Windu in about 3-4 seconds) long enough to sway his father away from the Dark Side, and fufill his destiny as the Chosen One by destroying Palpatine. 

That all being said, Luke's formal training appeared to be incredibly practical and served an ulterior motive. Yoda and Obi-Wan were training Luke, first and foremost, as a weapon to use against Vader and the Emperor. Yoda and Obi-Wan even admit to as much, stating that Vader was irredeemable, and needed to be stopped in order to bring peace to the galaxy. 

Realistically, Luke would have had to train for years before he would be able to stand against an all-out Vader, who was the 2nd most powerful Force Wielder in galactic history. But there are alternatives to fighting, as Luke demonstrates. Luke ultimately transcends his training and realizes that the real fight could not be won by martial prowess, but by trusting in the Force, and showing love and compassion to the one man in the galaxy that needed it the most. 

Yoda and Obi-Wan's plan would never have realistically worked, they simply did not have enough time. Love (and the refusal to let go) led Vader down the dark path, and love was the only thing that would ever have led him back to the Light.