Simple AI Needed!

This is a discussion on Simple AI Needed! within the Game Programming forums, part of the General Programming Boards category; The last 'missing peice' in my project is AI, as in 'CPU' Players in a Simple Mortal-Combat type game.
Can ...

Fighters' AI

What you need to do is declare a variable that represents your "CPU" fighter's possible states; ie: punch, kick, block, seek, flee, stand-still - and assign a number (percentage) that represents each of these. Then at each iteration where you check your actions you would generate a random number and check it against the action's number.
Here's some psuedo code to show you what I mean: