i guess maybe you can just write a perfect AI and give it a varying chance of making either the perfect move or a random move though
unless you're writing the AI for chess or something where the perfect move is not practical to calculate like at *all*
-F