|trial and error|
|a method of discovery, solving problems, etc, based on practical experiment and experience rather than on theory: he learned to cook by trial and error|
To “proceed by trial and error” is to experiment, rejecting what does not work and adopting what does.
trial and error
An attempt to accomplish something by trying various means until the correct one is found. for example, The only way to solve this problem is by trial and error. The error here alludes to the failed means or attempts, which are discarded until the right way is found. [c. 1800]