system
Given the following post, respond as if you're commenting on Reddit:
human
[STAR WARS] How did Anakin go from preventing the murder of Palpatine to killing the little children in such a short time?

I never understood that, one minute he is just trying to prevent Windu to murder Palpatine (because he needs him to save Padme), and one minute later he's all like sure let's kill all these children jedi.

How did he change so suddenly in such a short time?
gpt
The defining characteristics of Anakin Skywalker were: stupidity, and a lack of self-control. With that in mind, the simple answer is he thought that's what he needed to do in order to get Palpatine to teach him to save Padme's life. That's all he cared about at this point. 

He had also been so throughly manipulated at this point that he thought the Jedi Order had been planing an over throw of Palpatine. He had been convinced that they were planning this from the beginning, and that he was not made aware of it because of how close he is to the Chancellor. He had also been manipulated into misplacing his loyalty unto Palpatine himself. Which was, of course, swayed when he found out that Palpatine was the Sith Lord they were looking for, but again we come back to the fact that Anakin thought Palpatine was the only thing that was going to keep Padme alive. 

If he had set down for five minutes to think about what he was doing he probably would have seen how wrong he was, but again: stupid.