Dynamics for network formation games