Teaching lasers to control molecules in the presence of laboratory field uncertainty and measurement imprecision