Let K be a king at the end of dark ages. Let his realm be mainly a big castle and vast cultivable lands, surrounded by other realms and access to ocean. Beyond some of its councilors and subordinates, the inhabitants are illiterate and not educated.
K thinks in human power, and want to maximize it, on long-term (beyond its own lifetime). Each human H can provide power to the realm/humanity, but, depending on its place in society, H will yield more or less power. H may be more efficient as farmer, or merchant, or manager,…
K is philanthropic : his ultimate goal is a global society fully employed to improve technology, science, and art. This goal should be reached by improve gradually the whole society, not by exploiting next generations through slavery to built the canvas for an hypothetical future generation.
K have full ability to change drastically the way his realm works, but is limited by understanding of the inhabitants of its realm, available knowledge & technology, and the neighboring realms (not necessarily prone to war, but not friendly either).
How could K transform the medieval society into a more developed society, where technology and science improvement is the norm ? What errors K could make during the process ?