According to the traditional narrative, Siddharta Gautama started his life as an ascetic by being a mendicant. That is, he begged for his food, which was common for religious ascetics both then and now. Obviously, this meant he had to live around other people, and not in the woods.
During Buddha's sojourn into the wilderness, he supposedly attempted to sustain himself on leaves and nuts. After nearly starving to death, he decided that such extreme asceticism was not the path to enlightenment and decided on the Middle Way.