How brain cells pick which connections to keep