It's really the same problem, with the same solution. The last time I did this, was for a closed environment (a dungeon), so I just picked an adjacent room as the target, preferring rooms away from the player's direction. In an open environment, I'd just pick a spot away from the player and path to that, possibly checking every so often for a new target.