The recorded military history of China extends from about 2200 BC to the present day. Chinese pioneered the use of crossbows, advanced metallurgical standardization for arms and armor, early gunpowder weapons, and other advanced weapons, but also adopted nomadic cavalry and Western military technology. China's armies also benefited from an advanced logistics system as well as a rich strategic tradition, beginning with Sun Tzu's The Art of War, that deeply influenced military thought. History of military organization The military history of China stretches from roughly 2500 BC to the present day. Chinese armies were advanced and powerful, especially after the Warring States period. These armies were tasked with the twofold goal of defending China and her subject peoples from foreign intruders, and with expanding China's territory and influence across Asia Pre-Warring State Early Chinese armies were relatively small affairs. Composed of peasant levies, usually serfs dependent upon the king or the feudal lord of their home state, these armies were relatively ill-equipped. While organized military forces had existed along with the state, few records remain of these early armies. These armies were centered around the chariot-riding nobility, who played a role akin to the European knight as they were the main fighting force of the army. Bronze weapons such as spears and swords were the main equipment of both the infantry and charioteers. These armies were ill-trained and haphazardly supplied, meaning that they could not campaign for more than a few months and often had to give up their gains due to lack of supplies. The shi knights had a strict code of chivalry. During the Shang and Western Zhou eras, warfare was seen as an aristocratic affair, complete with protocols that may be compared to the chivalry of the European knight. States would not attack other states while mourning its ruler. Ruling houses would not be completely exterminated so descendants would be left to honor their ancestors. Examples of this code include the battle of Zheqiu, 420 BC, in which the shi Hua Bao shot at and missed another shi Gongzi Cheng, and just as he was about to shoot again, Gongzi Cheng said that it was unchivalrous to shoot twice without allowing him to return a shot. Hua Bao lowered his bow and was subsequently shot dead, or in 624 B.C. when a disgraced shi from the State of Jin led a suicidal charge of chariots to redeem