Intelligent automation now means that a dairy herd can be fed, cared for and milked by just one or two people.

Robert Veitch has a dairy farm near Glasgow that uses one of the most advanced robotic milking systems in the world. It is a £1.8 million facility where 10 machines take care of 250 cattle.

The cows are kept inside a shed that has a high roof and is open to the outdoors at the sides, allowing in daylight and fresh air.

Rather than shovels and tractors being used, an automated claw drops in to a heap of feed, runs along a track and deposits it in to the receptacle of a feeding robot.

This large wheeled cylindrical machine moves off by itself and trundles around the shed depositing the feed in long rows.

The cows eat when they want and the machine even helps them to eat it by pushing it under their noses, so there is little waste.

Gated entry

There is no set milking time. When the cows want to be milked, they queue up outside the milking parlour. One by one they push through a gate.

They step on a metal plate and this activates the most intelligent machine of all. Twenty years of research has gone in to a robotic arm that learns about each and every cow.

As well as guiding cups on to her teats and milking her, it maps her by laser and updates the intricate data picture that it already has.

It knows her weight, temperature and how much milk she has produced. But also how much she has eaten and even how much she has moved around.

Media playback is unsupported on your device Media caption The Arla super dairy uses wi-fi controlled robots in their plant, working alongside people

But the cows aren't out in the fields eating grass, they are kept in the shed. This is intensive farming with one objective - to produce as much milk as possible.

Mr Veitch says it works. He believes that the cows are kept so comfortable that, "They wouldn't want to go out even on a good day."

He says that yields have risen as a result: "Cows respond to comfort. It has gone from 28 litres to 36 litres average a day, without a significant increase in feed cost."

It's the freedom to be able to be milked when they like - they can be milked three, four times a day. A calf would normally suckle its mother many times in a day, so this is actually more natural than a twice a day milking system."

Clear-up job

There is even a robot the size of a large dog that that trundles around between the hooves cleaning up the mess. All this saves six or seven hours of labour costs per day. But these jobs used to be done by humans. What is the impact?

Dr Paul Brassley studies the history of technical change in agriculture. He says that in sixty years the number of people in total working on farms has just about halved.

"The really big change has been in the number of full-time workers: from 700,000 in 1951 to around 63,000 in 2013. This is about a tenth of what it was.

One of the reasons for this is technical change. At the beginning of the 20th century it was reckoned it was half of all field labour was used in weeding. Now this is done by pesticides. Farm workers are employed for their brains rather than their muscle."

According to Mr Veitch: "It has allowed my family to run the herd without having to milk twice a day. It is a lot more flexible. It allows us to focus on the management of the herd, as opposed to focusing on the milking of the herd."

Many farmers and policy makers now take the view that intelligent machines are more precise, efficient, and ultimately cheaper than humans: that they are the only way to help feed a growing population.

Follow Claire on Twitter.