The issue of this paper is about real-time or interactive 2D-2D resp. 3D-3D matching. Based on Viola's sample-based stochastic Mutual Information (MI) gradient matching we developed a technique that allows to optimally set all necessary parameters in a short preprocessing step using typical images. In this paper we concentrate on finding an optimal parameter set for Rprop, the underlying stochastic optimizer. The relevant parameters are the start and the minimum learning rate given a pair of aligned images. Rprop is modelled by a Markov chain whose transition kernel is estimated by a mean gradient. We introduce a truncated recursion to simulate Rprop and obtain an expectation for the number of iterations for each parameter combination. This way near optimal parameters are found within 20-50 seconds, depending on the data. Using automatically set parameters for Rprop and the sample size, matching requires 0.3-1.3 s for 2D-2D and 0.6-2.1 s for 3D-3D on our test data using an Athlon 800 MHz processor. Altogether we get a real-time registration algorithm that optimizes its control parameters for the given data within less than a minute.