I tried an enemy AI once, purely through trial and error, aside from some annoying but small bugs with them colliding together lol, it worked pretty well (but still very basic).