Social learning with dependent agents