Do NPC Trainers have the AI necessary to switch their Pokemon to a more effective one? I know regular Trainers don't, and even if they did, most of them specialise in 1 type, which wouldnt help them much.
But what about those in Battle Frontier/Tower/Sub-way? I've noticed these guys have a much higher AI than others. In fact, they have such a good AI, that when I played Battle Tower for the first time in Gold, I thought they were cheating (they had counters for anything I throwed at them). I've also seen some of them switching in the last count of Perish Song, but other than that, only with those moves that force the user to recall (ex: Volt Switch).