basically everything Benjamin Franklin did was trial and error because no-one understood what electricity was in the slightest
almost everything Edison did was trial and error too, he had his lab try thousands of materials for his long lasting lightbulb filament
even the most advanced "AI" today is just machine-learning going through everything already known trying to piece together previously discovered facts, admittedly at levels and detail impossible by human hands
but that means there are limits and it's not really "AI"
I have seen it produce tentative genetics for experiments, just like a scientist does. Then the data comes in and it can evaluate the data from the experiment just as well. One just had to give it a lab budget.