Lemme clear up some things here. I'm a huge fan of the RC books and I try to learn as much as possible about the Star Wars universe as a whole.
1 A) Any stupidity in game by AI, is just that... dumb AI, and shouldn't exactly be counted so much as a reflection on how well they would actually perform if we could write the perfect AI scripts to act accordingly.
1 B) An alternative is you're seeing a well executed trap laid down by the trandosians (I can't bother to look up the real spelling right now). Hell they caught an RC for that matter. The troopers are weary and really stressed out right now. Everyone has a breaking point.
2) As for being smart enough to take down Jedi, that's a huge misconception that that was the plan all along. It wasn't. There are hundreds of odd little emergency scenarios that were drilled into them and they had to know all the orders. For example:
Order 65: In the event of either (i) a majority in the Senate declaring the Supreme Commander (Chancellor) to be unfit to issue orders, or (ii) the Security Council declaring him to be unfit to issue orders, and an authenticated order being received by the GAR, commanders shall be authorized to detain the Supreme Commander, with lethal force if necessary, and command of the GAR shall fall to the acting Chancellor until a successor is appointed or alternative authority identified as outlined in Section 6 (iv).
The fact of the matter is that Order 66, was triggered by absolute evidence that the Jedi were acting against the Republic. Not that it was needed, but when Mace Windu tried to take out he Chancellor, that was enough for him to declare Order 66 when he survived. Enough that the order would go unquestioned throughout.
When the order was given out, no trooper was thinking about Order 66 until they got it and just assumed "Hey take out the Jedi because they are revolting". No planning, no contemplation, just spur-of-the-moment.
3) The original GAR troopers are excellent specimens. They are intelligent and effective. They were weeded out and any "defects" were dealt with. - RC book series.
The latter troopers, starting with the second wave of clones to be exact, was the clear indication that Kamino was no longer providing clones, at least not this second batch. These troopers were not as well trained (Kamino clones were trained by Mandalorians, the second batch was not) and it's indicated in a few other books / games that the rest of the clones afterwards were the "value" model and kind of retarted.