We study the formation of social networks that are based on local interaction and simple rule following. Agents evaluate the profitability of link formation on the basis of the Myerson–Shapley principle that payoffs come from the marginal contribution they make to coalitions. The NP-hard problem associated with the Myerson–Shapley value is replaced by a boundedly rational ‘spatially’ myopic process. Agents consider payoffs from direct links with their neighbours (level 1), which can include indirect payoffs from neighbours’ neighbours (level 2) and up to M-levels that are far from global. Agents dynamically break away from the neighbour to whom they make the least marginal contribution. Computational experiments show that when this self-interested process of link formation operates at level 2 neighbourhoods, agents self-organize into stable and efficient network structures that manifest reciprocity, equity and segregation, reminiscent of hunter gather groups. A large literature alleges that this is incompatible with self-interested behaviour and market oriented marginality principle in the allocation of value. We conclude that it is not this valuation principle that needs to be altered to obtain segregated social networks as opposed to global components, but whether it operates at level 1 or 2 of social neighbourhoods. Remarkably, all M>2 neighbourhood calculations for payoffs leave the efficient network structures identical to the case when M=2.