I've come up with this behavior algorithm for my robots in my talkie-project, GUNFIST: GAIDEN.
Each robot will have an Intelligence, or 'AI' score of 0-6. It's one of the 4 ability scores each robot has along with speed, shields and guns.
Every (7-AI) seconds, or when the enemy encounters a wall, they'll decide what to do. So the top AI decides every 1 second, the stupidest every 7 seconds.
Decision: Roll 1d6 + AI. You'll get a result of 1-12.
1..3 = Halt. "Scanning. Scanning."
4..6 = Walk. Random direction, up, down, left, right. "Searching for humanoids."
7+ = Chase. Turn in the direction of the player, if you can see him. "Terminate."
Shooting occurs whenever a player is in view along an orthogonal line, so no diagonals for now.
Later, when I place lava and pits, the AI score will control whether or not the robot goes crashing to his death.
This behavior algorithm should result in the robots acting like enemies in Zelda (NES), Berzerk (2600) and Night Stalker (Intellivision).
At least I hope it will. :-)