# An Agent-Specific Stochastic Model of Generalized Reaching Task Difficulty
## 2 Stochastic Index of Difficulty for a Generalized Reaching Task  
The Index of Difficulty of a general trajectory realized within given spatial constraints has been defined by [25] as follows:  
\[ID_{t}=\int_{t}\frac{ds}{W(s)} \tag{4}\]  
where, the spatial trajectory (i.e., path) \(t\) is constrained within a given width \(W(s)\) along the curvilinear abscissa \(s\) (Figure 1). This result is derived from the Mackenzie formulation of the Index of Difficulty for simple reaching tasks with straight hand path [17], by considering a generic curved path to be an infinite sequence of simple reaching tasks with targets (constraints) of variable width \(W(s)\). The above Index of Difficulty (\(ID_{t}\)) is a purely geometric measure derived from information theory and is uniquely dependent on the prescribed spatial trajectory and relative constraints. It can be applied to any nominal trajectory that travels within a tunnel of variable width, \(W(s)\), during a generic motor task. A narrow tunnel width leads to increased trajectory difficulty. However, this geometric model does not include specific information on the agent (e.g., human, robot) and its end-effector (e.g., hand, finger, foot) employed in the motor task. Therefore, Equation (4) does not capture important differences in agents' dynamics and motor control ability that may affect the perceived difficulty (hence affordance) of a certain constrained motor task. In this study, the geometrical \(ID_{t}\) (Equation (4)) is adopted to formulate a novel information-based stochastic model of generalized reaching task difficulty for a specific agent. A generalized reaching task is defined herein as the movement of a given end-effector of a specific agent, with desired initial and final end-effector positions. When a given agent performs multiple trials of a generalized reaching motor task, the observed trajectories of the end-effector will vary stochastically, due to motor noise [28; 29]. In particular, the observed trajectories at given speed and environmental conditions will be enclosed within spatial limits \(W(s)\) that are governed by a combination of factors: in the case of a human agent, for example, the subject's internal model of motor control (including its dynamics features, such as mass distribution, geometry, joint and actuation limits), the given task requirements, and the constrained environment will synergistically affect the spatial limits \(W(s)\) observed during the actual trials. As opposed to Equation (4), the spatial limits \(W(s)\) in the stochastic model are not assigned a priori; they will be the result of both internal and external constraints to the motor task and are indicated in this study as \"affordance limits\" of the combined agent-environment system. Let us consider a series of spatial trajectories \(t_{k}\), \(k=1,\ldots,n\), with average \(\overline{t}\), observed for a given agent in \(n\) trials of a generalized reaching motor task under the same average speed and environmental conditions (Figure 2). Without loss of generality, a two-dimensional task is considered, with the end-effector moving in the \((x,y)\) plane. Let \(p(s)=p(x(s),y(s))\) be the point of \(\overline{t}\) at the curvilinear abscissa \(s\). The segment orthogonal to the tangent line at \(p(s)\) intersects the \(k\)-th trajectory at \(q_{k}(s)=(x_{k}(s),y_{k}(s))\) and identifies the distance \(d_{k}(s)\) between the two points (Figure 2). For a given \(p(s)\), the stochastic variable \(d_{k}(s)\), representing the local distance between the observed and average trajectory, is distributed according to a probability density function. The local affordance limits observed at point \(p(s)\) due to the variability of the agent's behavior are modeled by \(W(s,\varphi)\), which is the variability range of \(d_{k}(s)\) at a probability \(\varphi\) (Figure 3). Within the limits of \(W(s,\varphi)\), the generalized reaching movement is considered affordable for the agent, at the given probability level.