<P> Various reforms or attempts to reform the examination system were made during the Song dynasty, including by Fan Zhongyan and those by Wang Anshi . Fan's memorial to the throne actually initiated a process which lead to major educational reform through the establishment of a comprehensive public school system . </P> <P> Governmental examinations ended with the defeat of the Song in 1279 by a disintegrating Mongol empire . After a period of turmoil, the part of the Mongol empire that was led by Kublai Khan established itself in China as the Yuan dynasty . Kublai ended the imperial examination system, as he believed that Confucian learning was not needed for government jobs . </P> <P> The examination system was revived in 1315, with significant changes, during the reign of Emperor Renzong . The new examination system was one of regionalism with Mongol characteristics . The northern areas of Mongolia and its vicinity were favored, and a quota system (both for number of candidates and number of degrees awarded) which was based on the classification of the imperial population into four racially - based groups (or castes and / or ethnicities) was instituted, the groups being Mongols, their non-Han allies (Semu - ren), Northern Chinese, and Southern Chinese, with further restrictions by province . Under the revived and revised system the yearly averages for examination degrees awarded was about 21 . As the degrees were arithmetically divided between the four "races" (although with further modification), rather than being proportionally based on either population or number of qualified candidates, this tended to favor the Mongols, Semu - ren, and North Chinese: the South Chinese were by far the greatest part of the population, the 1290 census figures recording some 12,000,000 households (about 48% of the total Yuan population), versus 2,000,000 North Chinese households, and the populations of Mongols and Semu - ren were both less . The restrictions on candidates by the new quota system allowed only 300 candidates for each testing session of the three year examination cycle . The provincial restrictions resulted in a greater effect; for example, only 28 Han Chinese from South China were included among the 300 candidates, the rest of the South China slots (47) being occupied by resident Mongols or Semu - ren, although 47 "racial South Chinese" who were not residents of South China were approved as candidates . </P> <P> The Ming dynasty (1368 - 1644) retained and expanded the system it inherited . Shortly after the inauguration of the dynasty, the Hongwu Emperor in 1370 declared that the exams should cover the Four Books, discourses, and political analysis, accepting the Neo-Confucian canon put forth by Zhuxi in the Song dynasty . But he firmly insisted on including the martial arts . The curriculum at the National Academy emphasized law, mathematics, calligraphy, horse riding, and archery in addition to Confucian classics required in the exams . The emperor especially emphasized archery . </P>

What is the civil service system in ancient china