Hi.
Ai learning setup will be a lot more complex to setup and can have unexpected behaviors.
its probably best to do this step by step.
first make a system for the Ai movement (moving toward the player / rotating toward player)
Then for example defense system (when player attack, do block / roll)
Then for example attack system (detect player every x millisecond, when far, have a chance to do a ranged attack. when close do close attack. when player is doing a certain attack, do counter attack, and so on.