The demands on the accuracy of force fields for classical molecular dynamics simulations are steadily growing as larger and more complex systems are studied over longer times. One way to meet these growing demands is to hand over the learning of force fields and their parameters to machines in a systematic (semi-)automatic man- ner. Doing so, we can take full advantage of exascale computing, the increasing availability of experimental data, and advances in quantum-mechanial computations and the calculation of experimental observables from molecular ensembles. Here, we discuss and illustrate the challenges we face in this endeavor and explore a way forward by adapting the Bayesian inference of ensembles (BioEn) method [Hummer and K ̈ofinger, J. Chem. Phys. (2015)] for force field parameterization. In the Bayesian inference of force fields (BioFF) method developed here, the optimization problem is regularized by a simplified prior on the force field parameters and an entropic prior act- ing on the ensemble. The latter compensates for the unavoidable over-simplifications in the parameter prior. We determine optimal force field parameters using an iterative predictor-corrector approach, in which we run simula- tions, determine the reference ensemble using the weighted histogram analysis method (WHAM), and optimize the BioFF posterior. We illustrate this approach for a simple polymer model, using the distance between two labeled sites as the experimental observable. By systematically resolving force field issues, the BioFF corrections extend to observables not included in ensemble reweighting. We envision future force field optimization as a formalized, systematic, and (semi-)automatic machine learning effort that incorporates a wide range of data from experiment and high-level quantum chemical calculations and takes advantage of exascale computing resources.