A cleaner, denoted by $P$, aims to sweep $n\ge 1$ leaves that appear one by one in a courtyard modeled by a compact set $D\subset \mathbb R^2$. Denote by $x_0$ the initial position of $P$ and by $v>0$ his moving speed. Let $\mu$ be a probability measure on $D$ and $d$ be some distance function on $D$. Assume that the leaves appear independently with their position distributed according to $\mu$.
More precisely, for each $1\le i\le n$, suppose $P$ has just swept the $(i-1)^\text{th}$ leaf and his position is denoted by $X_{i-1}$. Let $t>0$ be the waiting time for the $i^\text{th}$ leaf since the $(i-1)^\text{st}$ leaf has been swept. $P$ may move to any position $y\in B(X_{i-1}, vt)\mathrel{:=}\{y\in D: d(X_{i-1},y)\le vt\}$. Let $y_i \in B(X_{i-1}, vt)$ be the position to which $P$ moves from $X_{i-1}$ during the waiting time. As the $i^\text{th}$ leaf appears at $X_i$, $P$ moves further to $X_i$. Set $X_0\mathrel{:=}x_0$. How to minimize the average time $$\rlap{ \mathbb E\left[\sum_{i=1}^n \left(t+\frac{d(y_i, X_{i})}{v}\right)\right]} \hphantom{\mathbb E\left[\sum_{i=1}^n \left(d(X_{i-1},y_i)+d(y_i, X_{i})\right)\right]?}$$ over all $y_1,\ldots, y_n$ s.t. $y_i\in B(X_{i-1}, vt)$ for $1\le i\le n$? Similarly, how to minimize the average distance $$\mathbb E\left[\sum_{i=1}^n \left(d(X_{i-1},y_i)+d(y_i, X_{i})\right)\right]?$$
Personal thought : Define $f:D\to\mathbb R_+$ by
$$f(x):=\min_{y\in B(x,vt)}\mathbb E\left[t+\frac{d(y,X)}{v}\right],$$
where $X\sim \mu$ is a random variable. Introduce recursively $f_n:=f$ and for $0\le k\le n-1$ :
$$f_{k}(x):=\min_{y\in B(x,vt)} \mathbb E\left[t+\frac{d(y,X)}{v}+f_{k+1}(X)\right] = f(x) + \mathbb E[f_{k+1}(X)].$$
Hence, the minimization problem is identified by $f_0(x_0)$. Then my question can be reformulated : How to solve efficiently this optimization problem?