Modeling life histories of the Han and the medieval dynasties