Good rulers support invention of useful things. But this question has two sides.
- Support of invention
- Prevention of fake inventing
Many inventions arise as side-effects of searching for something else. The base of modern chemistry is from alchemy and its attempts to find the philosopher's stone and so on. Also, there is some research that doesn't have direct effects but still it is needed.
Fantasy without the philosopher's stone (or something similar) may sound like nonsense. But let's say that ruler does not believe in the existence of the philosopher's stone (or invisibility, etc) and wants to invent something really useful (for example, how to improve public health and cure illnesses). Instead, the ruler resolves to pay such research very well.
And where there is money, there are also cheaters. So the ruler wants to check that all research s/he pays for are really related to the main goal.
This question is inspired by one old Czech movie and one concrete scene from it:
The alchemist is supposed to prepare a rejuvenation potion of but he creates anything else instead of it (for example, floor polish).
In one invention stage, (in that mentioned scene) he was supposed to find mandragora and prepare it but he cooks sausages with horseradish in a great pot instead.