Ever taken an intelligent system class? Yes or no, I suggest you to (re)read chapters about searching. AI in games is just state space searching. The best one I know for general case is A*, but for certain games best-first might perform better. Both requires you to write good heuristic/evaluation function to determine which state is the best to take from current one, which certainly varies from one game to another.