This is part how-to, part discussion and theorycrafting on AI.
The built-in pathfinding AI is excellent for finding a path towards a point, but I would like to delve a bit further into AI behaviors that can be created from this. In particular, I am aiming to construct an enemy that rotates towards the player, fires a bullet, then rotates to some other direction and moves, and repeats this behavior. This is more advanced than simply having pathfinding move the enemy towards the player.
The main issue to deal with is dynamically generating a 'move point' for the enemy that is not in the current path of the player. Not being in the current path is important, otherwise the enemy will be moving to be shot by the player (dumb AI). One implementation of this I can think of is drawing an invisible line in the direction of the current player angle and seeing if the proposed 'move point' intersects with it, but this could be costly in terms of performance.
For the other aspects of this behavior, pathfinding takes care of finding a path to the desired 'move point', and instance variables can handle the timings of the rotate-fire actions.