Firstly you should learn what is AI?
example i will give an example for you:
enemy.position.x += 50
this is an example ai command. Now i will write a way which way came to my mind. Let's mix a bit:
if enemy.corridor == myPlayer.corridor:
#then probably enemy will see our character
enemy.attackMode = true # i opened attack mode, so it will attack.
Let's look to enemy process:
if attackMode:
if myPlayer.position.x < enemy.position.x:
enemy.position.x - = SPEED * delta
elif myPlayer.position.x > enemy.position.x:
enemy.position.x += SPEED * delta
if myPlayer.position.y < enemy.position.y:
enemy.position.y += SPEED * delta
elif myPlayer.position.y > enemy.position.y:
enemy.position.x -= SPEED * delta
so enemy will come to our position. Look I am not saying do these, i am just giving to you any idea, you are new in godot so you should improve yourself firstly. Good luck :)