Pathfinding to unknown location

Is it possible to have a different goal than to reach certain point? For example, reach any point that matches some given criteria? For example, I might want my agent to find the nearest and most suitable resource point, nearest water etc

You could hold a list of positions to each of the desired objects. Then if you command your agent to find for example the nearest resource point, you sort the resorce point array by distance to your agent and pick the first element.