The invention provides a method for preparing a compound or a product having one or more characteristics that meet or exceed a user specification, the process comprising the step of selecting a first combination of chemical inputs, optionally together with physical inputs, and supplying those inputs to a reaction space, thereby to generate a first product; analysing one or more characteristics of the product generated; comparing the one or more characteristics against a user specification; using a genetic algorithm selecting a second combination of chemical inputs, optionally together with physical inputs, wherein the second combination differs from the first combination, and supplying those inputs to the reaction space, thereby to generate a second product; analysing one or more characteristics of the second product generated; comparing the one or more characteristics generated against the user specification; repeating the selecting and analysing steps for further individual combinations of chemical and/or p