Yoda didn't specifically know how this would go down, or to what degree Anakin would cause it to happen, but he was playing a much longer game by Revenge of the Sith, and that's at least, in part, explained by Yoda's Force connection with Qui-Gon's spirit.
Master Yoda knew that Darth Vader was once Anakin Skywalker- the boy he sensed too much fear in to train way back in Star Wars: The Phantom Menace. For many years it's been assumed Master Yoda was aware from the day Vader gained his cybernetic enhancements and signature wheeze.
Return of the Jedi establishes that Yoda was aware that Anakin Skywalker had fallen to the dark side and become Darth Vader. When questioned by Luke Skywalker, he confided that Anakin was Darth Vader. Later, Obi-Wan Kenobi's Force ghost confirmed that Anakin had indeed fallen to the dark side and become Darth Vader.
Qui-Gon didn't fail to notice the Dark Side boiling up inside of Anakin Skywalker: he believed that darkness was exactly what was needed to bring balance to The Force.
It's quite clear that Obi-Wan Kenobi and Yoda lost hope in Anakin, they saw no chance of redemption, as Obi-Wan said to Luke in Return of the Jedi ”He's more machine now than man.” Obi-Wan and Yoda saw no hope of Anakin being redeemed; this is further proved by both of them constantly urging Luke to confront and kill ...
Yes, when Darth Vader turned back to Anakin Skywalker and sacrifice himself to save his son, he dies and Obi-Wan uses the force to connect with Anakin's spirit. In that time Anakin apologizes to Obi-Wan, desperately asking him to forgive him for everything he has done to him and everybody over the years.
Yoda was reluctant to train Anakin in Episode II because he said Anakin was too old to start training (even though Anakin was still a boy). However, in Episode V, Yoda didn't seem very reluctant to train Luke despite the fact that Luke was a full grown man by that time.
Star Wars: Darth Vader #5 confirms why Anakin Skywalker truly hated Obi-Wan Kenobi, and it was far more than professional jealousy. During their Star Wars rivalry, there were many contentious moments between Obi-Wan Kenobi and Anakin Skywalker that led to the fracture of their relationship.
Padmé was well aware that Anakin had committed dark crimes that would've started his fall to the dark side. He even confessed to her that he had massacred an entire Tusken Raider village to avenge his mother, leaving no one alive.
Palpatine may still have eventually traded Dooku in for a newer apprentice, but nothing would have hindered his rise to power. Had Qui-Gon trained Anakin and kept him far from Palpatine, Anakin might have eventually died in the Clone Wars and been completely unable to fulfill any Chosen One prophecies.
Ultimately, Yoda gained a new understanding of true selflessness and of the Force, came to realize his hubris and the mistake the Jedi Order committed by becoming warriors, and unlocked the secret of Force immortality. As the Clone Wars raged on, Anakin and Obi-Wan had become heroes of the Republic.
In the material around the film from the Legends timeline, it's established that by the end of Star Wars: Episode III - Revenge of the Sith, Kenobi was one of the characters who knew Anakin's Sith name was Darth Vader. However, what he didn't know was that he was still alive after Mustafar.
R2-D2 was present when Padmé gave birth to Leia and Luke, so he knew Luke was Anakin's son – but what he didn't know was that Anakin became Darth Vader. In addition to that, Anakin's fall was surely a painful event in R2-D2's life, one that he definitely wouldn't like to remember or even talk about.
The canonical comic Star Wars: Darth Vader #7 confirms the younglings' deaths caused Anakin grief, self-loathing, hatred and pain, fueling his descent even further into the dark side. Those negative emotions also power the dark side, meaning Anakin likely felt stronger as he killed the younglings.
We go for the more simple answer, further considering the details of the question itself. If Anakin didn't go into that chamber as the Jedi confronted Palpatine, then Mace Windu would have defeated Palpatine, killing him. If you remember, Mace had him. He was ready to kill him.
He regretted it the moment he did it. He asked himself what he just did, dropped his lightsaber, and was visibly ashamed of himself when Palpatine anointed him a Sith Lord and began his speech about wiping out the Jedi.
Yes, his entire character since then was a self loathing tragic monster who has little reason to care about anything. Betraying Mace Windu instantly made him regret his act of impulse, Padme's death and rejection of his actions later on made it stick.
Sadly the Clone Wars would have still happened, but Padmé would have also survived, giving birth to Luke and Leia who would have probably been inducted into the Jedi Order. As for what would have happened between the two, with their marriage and all, that's a bit tricky.
Padme's death is the moment that solidifies Darth Vader's fall to the Dark Side, and expanded Star Wars media has often shown him mourning her when not serving The Empire.
In Star Wars Legends and Canon, Galen Marek (Starkiller) is the only Jedi (other than Obi-Wan Kenobi) to put a beat down on Darth Vader/Anakin Skywalker. Galen was secretly trained as a Sith Lord apprentice to Vader, but returned to the light side and the Jedi.
ANAKIN: I won't let this one become real, Padmé. This marks the beginning of Anakin's obsessive fear about losing Padmé. He's not being entirely unreasonable, though; the last time he had these terrible dreams was when his mother was being tortured by the Sand People, and he got there too late to rescue her.
Unfortunately, Anakin's injuries also greatly lessened his connection to the Force. In a Vanity Fair interview from 2005, George Lucas went deeper into why Anakin became much weaker as Vader.
He wasn't even eligible. In order to be granted the rank of master, a Jedi Knight must first train their own. Padawan to knighthood. When their Padawan became a Knight, they would then be able to attain the rank.
They were afraid of him. Simply put they saw in Anakin a power so strong they were afraid they could not control him.
At one point, he certainly regretted training Anakin, not saving Qui-Gon's, not training Anakin right, Padmé's death, killing Anakin, not killing Anakin, etc. And what makes all this suffering and regret worse is the fact he never realized the truth.