The eight-legged essay () was a style of essay in imperial examinations during the Ming and Qing dynasties in China. The eight-legged essay was needed for those candidates in these civil service tests to show their merits for government service, often focusing on Confucian thought and knowledge of the Four Books and Five Classics, in relation to governmental ideals. Test takers could not write in innovative or creative ways, but needed to conform to the standards of the eight-legged essay. Various skills were examined, including the ability to write coherently and to display basic logic. In certain times, the candidates were expected to spontaneously compose poetry upon a set theme, whose value was also sometimes questioned, or eliminated as part of the test material. This was a major argument in favor of the eight-legged essay, arguing that it were better to eliminate creative art in favor of prosaic literacy. In the history of Chinese literature, the eight-legged essay is often accused by later Chinese critics to have caused China's "cultural stagnation and economic backwardness" in the 19th century. The eight "legs" refer to the eight sections (literally "bones") of the essay that form its basic structure. These sections are "breaking open the topic (破题 pò tí)", "receiving the topic (承题 chéng tí)", "beginning discussion (起讲 qǐ jiǎng)", "initial leg (起股 qǐ gǔ)", "middle leg (中股 zhōng gǔ)“, "later leg (后股 (hòu gǔ)", "final leg (束股 shù gǔ)", "conclusion (大结 dà jié)." The eight-legged essay format was invented in the Song dynasty, by reformer and poet Wang Anshi (1021–1086), in the eleventh century. During the Song dynasty, due to the invention of the printing press and the emperors' wish to recruit more men of talent, there was a huge boost in education and a consequent increase in the number of people taking the civil service examination. Additionally, there was a shift from a pluralistic ideology characteristic of the Tang dynasty to a neo-Confucian ideology based on Cheng Yi and Zhu Xi's philosophy.