Brain
Housed in the skull behind the eyes, under the horn cores. In one study 9 of 12 trained goats learned a two-step puzzle to reach food in about 12 tries.
The goats that learned the puzzle solved it again within two minutes after gaps of up to 10 months, and goats beat sheep at a reversed-reward test of self-control.