Yeah, AI is hard to do! Random AI is easy, but checking for certain patterns, calculating what to do and checking for all the possibilities is hard.
That's why harder opponents have higher stats, because they all use the same AI but the stats are higher. So just stick with a basic AI and make the stats go higher.