Network formation with myopic and farsighted players