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: