A solution for the X turns=invention system:
You have a chance, depending on population, education system and "misc" (specific activities such as battles, mining facilities etc.) to discover a new tech. If you share borders with a kingdom with a tech you don't have, you have a higher chance to get it per turn. Specific, "hard to get" techs might open up "easier to get" techs, which might lead to finding a lot of techs in a small period of time.
Please note that the techs you discover are chosen from a "hidden" tree, and you don't have any say in the matter besides which facilities you create for your citizens.
The system I described is based on our own world: In very few cases the real inventions and discoveries over the history were made by a ruler that told it's people something like "I need a new weapon. Make me a bow that can shoot fire." Instead, the discoveries were made by either simple man that noticed their surroundings better than others, or places that research a wide arrey of phenomonas in hope to discover new things.