Automatic importance estimation in forward Monte Carlo calculations