Guinea pigs can learn complex paths to food, and can accurately remember a learned path for months. Their strongest problem-solving strategy is motion. While guinea pigs can jump small obstacles, they are poor climbers, and are not particularly agile. They startle extremely easily, and either freeze in place for long periods or run for cover with rapid, darting motions when they sense danger. Larger groups of startled guinea pigs “stampede”, running in haphazard directions as a means of confusing predators. When excited, guinea pigs may repeatedly perform little hops in the air (known as “popcorning”), a movement analogous to the ferret’s war dance. They are also exceedingly good swimmers
In the wild
C. porcellus is not found naturally in the wild; it is likely descended from some closely related species of cavies, such as C. aperea, C. fulgida, and C. tschudii, which are still commonly found in various regions of South America. Some species of cavy identified in the 20th century, such as C. anolaimae and C. guianae, may be domestic guinea pigs that have become feral by reintroduction into the wild. Wild cavies are found on grassy plains and occupy an ecological niche similar to that of cattle. They are social, living in the wild in small groups which consist of several females (sows), a male (boar), and the young (which in a break with the preceding porcine nomenclature are called pups). They move together in groups (herds) eating grass or other vegetation, and do not store food. While they do notburrow or build nests, they frequently seek shelter in the burrows of other animals, as well as in crevices and tunnels formed by vegetation. They tend to be most active during dawn and dusk, when it is harder for predators to spot them.
Grass is the guinea pig’s natural diet. Their molarsare particularly suited for grinding plant matter, and grow continuously throughout the animal’s life. Most grass-eating mammals are quite large and have a long digestive tract; while guinea pigs have much longer colons than most rodents, they must also supplement their diet by coprophagy, the eating of their own feces. However, they do not consume all their feces indiscriminately, but produce special soft pellets, called cecotropes, which recycle B vitamins, fiber, and bacteria required for proper digestion. The cecotropes (or caecal pellets) are eaten directly from the anus, unless the guinea pig is pregnant or obese. They share this behaviour with rabbits. In geriatric boars or sows (the condition is rarer in young ones), the muscles which allow the softer pellets to be expelled from the anus for consumption can become weak. This creates a condition known as anal impaction, which prevents the boar from redigesting cecotropes, though harder pellets may pass through the impacted mass