What is AL?
Offline
For simple AI in a program just use if statements and check if certain conditions are met then the enemy responds by doing something. Or you can even have multiple things the enemy may do depending on a random number.
Like if Monster hits a wall and player is between certain values of x then turn towards the player else change direction 180 and move away or something similar.
Offline
It depends entirely upon what you want to do. Pong could be done simply by pointing up if the ball is higher than the paddle and down if it is below the paddle, and moving _ number of steps. A Supersmash Bros AI would be much more difficult. I can only tell you one thing: if you want a good AI, you'll be using LOTS of if-statements and if-else-statements.
Offline
Well, it's really hard. I've found that in turn-based games, things like 'set var to (random (1, 10)); forever if var < 6: attack; forever if var > 5 and < 9: cast spell; forever if var > 8: block;'. I used that sort of thing in a few games (in Python, not on Scratch). While not practical for all uses, I believe the concept is clear. Each semicolon ( marks the end of a group of blocks, in case you didn't know.
Offline