That might not be what you'd like to hear, but: If you just started using Godot today, there are very likely more fundamental things you need to understand first! AI is far from simple and what you describe is definitely too complex to describe it in a concise manner here. Especially without knowing anything about your prior knowledge.
That being said, check out this tutorial. It teaches all of what you requested.