Mine are REALLY simple, so I don't recommend using it without some improvements

I put waypoints on the map, and then created an array with all their names, ordered by their position from left to right across the map. The AI checks if the player is to the left or right of them, and then follows the waypoints in that direction. If the AI has a line of sight with the player, then they just charge.
For following waypoints, the AI has a "lastNode" property, and then they move towards the next one in the array. (Or, if the player is to the left, the previous one in the array)
This only works with a relatively linear map since they only check for the player being left or right (for now). I'll add more parameters when my map becomes more complicated.