2 Averaged over $y$-coordinate.
The expected length is infinite (when $\epsilon \lt 1/2$)1/2$. The reason is that when the slope$\alpha$is near a rational$p/q$such that there are infinite trajectories of slope$p/q$which don't get closer than$\epsilon$to any lattice point, the length of the trajectory is often long. Specifically, suppose$\alpha$is very close to$0$. Then the expected length of the trajectory is not roughly$1/\epsilon$, it is proportional to$(1-2\epsilon)/\alpha$. By rotating the lattice, we can assume that the direction of the ray is between$-\pi/4$and$\pi/4$, and a uniform distribution on these directions has a bounded distortion$c_1$from the uniform distribution on slopes between$-1$and$1$. The expected value of a nonnegative quantity over slopes is a factor of at most$c_1$off of the expected value over directions. Suppose the slope is between$1/n$and$2/n.$For simplicity, assume the initial point has$x$-coordinate$0$. This adds less than$2$to the length. For simplicity, in the following I'll assume$\epsilon \lt 1/2\sqrt2$but that isn't necessary. In order to get within$\epsilon$of a lattice point, the height of the ray has to be within$c \epsilon$(with$c_2 \lt \sqrt 2, c_2 \lt 1+2/n$) of an integer when the$x$-coordinate is an integer. For an initial$y$-coordinate$y_0$between$c \epsilon$and$1-c \epsilon$, a lower bound for when this can occur is$(1-c_2\epsilon)/(2/n) (1-c_2\epsilon)/(2/n)$. So, as we average over the initial$y$-coordinates, the average length is at least$\frac{(1-2c_2 \epsilon)(1/2 - c_2 \epsilon)}{(2/n)} -2 \gt c_3 n$- 2. The Since the intervals$(1/2^m, 2/2^m)$are disjoint, the expected length is at least$c_1 \sum_{n=2^m} (1/n) (c_3 n - 2) = -2 + c_1 \sum_m c_3 = \infty.$1 The expected length is infinite (when$\epsilon \lt 1/2$). The reason is that when the slope$\alpha$is near a rational$p/q$such that there are infinite trajectories of slope$p/q$which don't get closer than$\epsilon$to any lattice point, the length of the trajectory is often long. Specifically, suppose$\alpha$is very close to$0$. Then the expected length of the trajectory is not roughly$1/\epsilon$, it is proportional to$(1-2\epsilon)/\alpha$. By rotating the lattice, we can assume that the direction of the ray is between$-\pi/4$and$\pi/4$, and a uniform distribution on these directions has a bounded distortion$c_1$from the uniform distribution on slopes between$-1$and$1$. The expected value of a nonnegative quantity over slopes is a factor of at most$c_1$off of the expected value over directions. Suppose the slope is between$1/n$and$2/n.$For simplicity, assume the initial point has$x$-coordinate$0$. In order to get within$\epsilon$of a lattice point, the height of the ray has to be within$c \epsilon$(with$c_2 \lt \sqrt 2, c_2 \lt 1+2/n$) of an integer when the$x$-coordinate is an integer. For an initial$y$-coordinate$y_0$between$c \epsilon$and$1-c \epsilon$, a lower bound for when this can occur is$(1-c_2\epsilon)/(2/n) \gt c_3 n$. The expected length is at least$c_1 \sum_{n=2^m} (1/n) c_3 n = c_1 \sum_m c_3 = \infty.\$