Simple Flying A.I. How should I start?

Hi, I need to create a Flying A.I., moves randomly in a given area (patrols) and when an enemy comes with in range, starts to engage. It doesn’t need to be super good at avoiding obstacles. My game is about space. I know this isn’t a simple thing but where and how I should start what do I need to learn ?

Hey, there is a good plugin for that, depending on if you don’t want to code it yourself.

This guy has a decent beginner tutorial on flying AI - hope this helps