Rewritten generator to use round-robin distribution of power to neighbours.