I have seen each of the horses come within a hair's breadth of the electric wire. They know exactly where it is. Very good judge of distances. They can also tell the difference in body language between a relaxed presence and a very tense one. Tense muscles go with predatory stalking.
Horses are prey animals.
If horses could administer such an IQ test to humans, most of us would appear quite stupid and unadapted to life on the planet. He is now asserting himself by chasing after the goats. It's quite a game to him but the goats don't like it much. The big ones chase him in turn. Then the dogs chase the goats and Arthur.