A teat position determining arrangement for a milking system comprising a milking stall for housing a milking animal during milking, a movable robot arm for automatically attaching teat cups to the teats of the milking animal in the milking stall, and a control device for controlling the movement of said robot arm based on determined positions of the teats of the milking animal, the arrangement comprising a three-dimensional camera directable towards the udder of the milking animal in the milking stall and provided to repeatedly record three-dimensional images of the udder of the milking animal prior to milking; and processing means provided to repeatedly detect the teats of the milking animal and determine their positions based on said repeatedly recorded three-dimensional images, characterized in that - the teat position determining arrangement is a combined teat position and breeding rating determining arrangement, wherein - the processing means is arranged to automatically determine the shapes of the teats of the milking animal based on said repeatedly recorded three-dimensional images and to calculate a breeding rating based on the determined shapes of the teats of the milking animal, wherein the processing means is arranged to automatically determine one or more of: - the lengths of the teats of the milking animal; the circumferences or thicknesses of the teats of the milking animal; conicities of the teats of the milking animal; the distances between the teats of the milking animal; the orientations of the teats of the milking animal; the orientations of the front teats as compared to the rear teats of the milking animal; the distance between the udder and the floor, on which the milking animal stands; the distance between the udder and the floor for a front portion of the udder as compared to a rear portion of the udder of the milking animal; and the distance between the udder and the floor for a left portion of the udder as compared to a right portion of the udder of the milking animal based on said repeatedly recorded three-dimensional images and to calculate said breeding rating based on said one or more of: - the lengths of the teats of the milking animal; the circumferences or thicknesses of the teats of the milking animal; the conicities of the teats of the milking animal; the distances between the teats of the milking animal; the orientations of the teats of the milking animal; the orientations of the front teats as compared to the rear teats of the milking animal; the distance between the udder and the floor, on which the milking animal stands; the distance between the udder and the floor for the front portion of the udder as compared to the rear portion of the udder of the milking animal; and the distance between the udder and the floor for the left portion of the udder as compared to the right portion of the udder of the milking animal. - the teat position determining arrangement is a combined teat position and breeding rating determining arrangement, wherein - the processing means is arranged to automatically determine the shapes of the teats of the milking animal based on said repeatedly recorded three-dimensional images and to calculate a breeding rating based on the determined shapes of the teats of the milking animal, wherein the processing means is arranged to automatically determine one or more of: - the lengths of the teats of the milking animal; the circumferences or thicknesses of the teats of the milking animal; conicities of the teats of the milking animal; the distances between the teats of the milking animal; the orientations of the teats of the milking animal; the orientations of the front teats as compared to the rear teats of the milking animal; the distance between the udder and the floor, on which the milking animal stands; the distance between the udder and the floor for a front portion of the udder as compared to a rear portion of the udder of the milking animal; and the distance between the udder and the floor for a left portion of the udder as compared to a right portion of the udder of the milking animal based on said repeatedly recorded three-dimensional images and to calculate said breeding rating based on said one or more of: - the lengths of the teats of the milking animal; the circumferences or thicknesses of the teats of the milking animal; the conicities of the teats of the milking animal; the distances between the teats of the milking animal; the orientations of the teats of the milking animal; the orientations of the front teats as compared to the rear teats of the milking animal; the distance between the udder and the floor, on which the milking animal stands; the distance between the udder and the floor for the front portion of the udder as compared to the rear portion of the udder of the milking animal; and the distance between the udder and the floor for the left portion of the udder as compared to the right portion of the udder of the milking animal.