Fighting Game AI

I’m sorry if this was already answered in another thread but I couldn’t find one.

I am working on a project and part of it involves a fighting game. I have all the script for player 1 (moving, punching etc…) but I do not know how to do the AI for the enemy.

Please could someone help me with this because I do not know where to begin.

Thanks.