AI is very important in game programming. In platform games, the critters and bosses need to have some sort of AI that can make them target the player and attack him/her. The bosses need to be able to detect the player's location so as to put on a good fight. More complex AI can be found in fighting games like Mortal Kombat, Street Fighter, Virtua Fighter or Tekken. And even more complex AI is the one found in strategy games where the computer can make decisions regarding attack, defense, and commanding their armies.
How is AI done? You may wonder. I have done my share of AI programming and I tell you it isn't child's play. It is a long story but it all boils down to numbers, data and randomization.
What about AI in real robots? Check out Asimo: