It comes as a surprise to many that in ancient "spiritual" India, atheistic materialism was a major force to reckon with. Predating even the Buddhists, the Carvaka is one of the earliest materialistic schools of Indian philosophy, named after one Carvaka, a great teacher of the school. Its other name, Lokayata, variously meant “the views of the common people,” “the system which has its base in the common, profane world,” “the art of sophistry,” and also “the philosophy that denies that there is any world other than this one.” The founder of this school was probably Brhaspati.
The Carvakas sought to establish their materialism on an epistemological basis and their thought resembles that of British empiricist and skeptic David Hume, as well as of logical positivists. The Carvakas believed sense perception alone as a means of valid knowledge. The validity of inferential knowledge was challenged on the ground that all inference requires a universal major premise (such as “All that possesses smoke possesses fire”) whereas there is no way to reach certainty about such a premise. The supposed “invariable connection” may be vitiated by some unknown “condition,” and there is no means of knowing that such a vitiating condition does not exist. Since inference is not a means of valid knowledge, all supersensible things like "destiny," "soul," or "afterlife," do not exist. To say that such entities exist is regarded as absurd, for no unverifiable assertion of existence is meaningful.
The Carvaka denied the authority of all scriptures. First, knowledge based on verbal testimony is inferential and so vitiated by all the defects of inference. They saw the scriptures as characterized by three faults: falsity, self-contradiction, and tautology. On the basis of such a theory of knowledge, the Carvakas defended a complete reductive materialism according to which the four elements of earth, water, fire, and air are the only original components of being; all other forms are products of their composition. Consciousness is a product of the material structure of the body and characterizes the body itself—rather than a soul—and perishes with the body. In their ethics, the Carvakas upheld a hedonistic theory: enjoyment of the maximum amount of sensual pleasure here in this life and avoidance of pain that is likely to accompany such enjoyment are the only two goals that people ought to pursue.
The Carvakas mocked religious ceremonies, saying that they were invented by the Brahmans (the priestly caste) to ensure their own livelihood. When the Brahmans defended animal sacrifices by claiming that the sacrificed beast goes straight to Swarga Loka (a temporary heaven), the members of the Carvaka asked why the Brahmans did not kill their aged parents to hasten their arrival in Swarga Loka.
According to the Carvaka, the soul is only the body qualified by intelligence. It has no existence apart from the body, only this world exists, there is no beyond—the Vedas are a cheat; they serve to make men submissive through fear and rituals. Nature is indifferent to good and evil; history does not bear witness to Divine Providence. Pleasure and pain are the central facts of life. Virtue and vice are not absolute but mere social conventions. The Carvaka suggested,
While life is yours, live joyously;
None can escape Death's searching eye:
When once this frame of ours they burn,
How shall it e'er again return?
Although Carvaka doctrine had disappeared by the end of the medieval period, its onetime importance is confirmed by the lengthy attempts to refute it found in both Buddhist and orthodox Hindu philosophical texts (some written as late as the 14th century), which also constitute the main sources for knowledge of the doctrine.*
Amartya Sen has noted that in the Ramayana, Rama isn't a god but an epic-hero, "with many good qualities and some weaknesses, including a tendency to harbor suspicions about his wife Sita's faithfulness." In the epic, a pundit named Javali "not only does not treat Rama as God, he calls his actions 'foolish' ('especially for', as Javali puts it, 'an intelligent and wise man')". Echoing Carvaka doctrine, Javali even asserts that "there is no after-world, nor any religious practice for attaining that ... the injunctions about the worship of gods, sacrifice, gifts and penance have been laid down in the [scriptures] by clever people, just to rule over [other] people."
Just as the Stoics of Greece and Rome resembled the Buddhists, the Epicureans were like the Carvakas. Carvaka doctrine disavowed irresponsible sensualism and upheld ethical ideals very reminiscent of the Epicureans (of whom there survives a voluble record). This may be why the Buddhists spent long hours trying to refute the Carvakas—they were likely threatened by the Carvaka emphasis on pleasure, not on suffering. Epicurus' words below could well have been spoken by a Carvaka:
When we say that pleasure is the goal, we mean ... being neither pained in the body nor troubled in the soul ... it is not possible to live pleasurably without living sensibly and nobly and justly. A just man is least troubled but an unjust man is loaded with troubles ... the pleasant life is produced not by a string of drinking-bouts and revelries, nor by the enjoyment of boys and women, nor by fish and other items on an expensive menu, but by sober reasoning.
* Such as Mādhava's Sarva-darśana-samgraha (“Compendium of All Philosophies,” 14th century CE). Haribhadra in his Sadharśanasamuccaya (“Compendium of the Six Philosophies,” 5th century CE) attributes to the Carvakas the view that this world extends only to the limits of possible sense experience. Source: Encyclopedia Britannica 2004