According to communist theory, the history of all society has been the history of class struggle and with each phase of this struggle comes a new set of social relationships that dictate the direction of society's development and, fundamentally, the system of producing and distributing goods and services. Arising from the creation of surplus during the neolithic revolution, the unequal distribution of this surplus has been reinforced by the state which represents the interests of the ruling class of the time. While all societies and civilizations have had their own unique history of development, they each pass through six distinctive stages of economic relationships sharing common characteristics, these being: primitive communism (hunter-gatherer societies), slavery, feudalism, capitalism, socialism, and finally a return to communism in a highly advanced form which is considered to be the epoch of humanity having become fully civilized.