Dr Stanley Curtis of Penn State University conducted a study  in which he attempted to teach pigs to play a simple video game. The pigs had to move a joystick with their snouts in order to accomplish tasks with varying complexity such as moving a white dot into a blue area on the screen in front of them in order to receive a treat. The shape of the blue area became increasingly complex from experiment to experiment, but the pigs performed surprisingly well. They outperformed dogs by far and even performed better than chimpanzees.
See also: “5 surprisingly smart animals”