## 3 Workspace Analysis
### Feasibility Check  
Now, we have two databases for the index finger and the thumb, and each of them has many point clouds to indicate the workspace of the finger's tip according to the angle of the wrist. The feasibility of the motion command can be determined by computing the nearest distance between the target point and the point in the workspace. This distance is defined as  
\[\kappa(S,p)=\underset{x_{i}\in S}{min}\|p-x_{i}\|, \tag{3}\]  
where \(S\) is the point cloud of the finger's tip which is stored in the database, and \(p\) is the target point. This function can be achieved by many algorithms such as the k-nearest neighbor algorithm which returns the nearest point and the distance. Because the point cloud is not concentrated enough, a threshold value is needed as the basis for proximity to the workspace. Using Equation (3) and the database of reachable area, the coupling phenomenon can be solved by the following equation:  
\[Dist\,\,=\,\,min\Big{[}\kappa\Big{(}T\Big{(}\overset{\rightarrow}{q_{w}} \Big{)},\,\,p_{1}\Big{)}+\kappa\Big{(}I\Big{(}\overset{\rightarrow}{q_{w}} \Big{)},\,\,p_{2}\Big{)}\Big{]}, \tag{4}\]  
where \(\kappa(a,b)\) denotes the operation with the k-nearest neighbor algorithm for entities \(a\) and \(b\), and \(p_{1}\) and \(p_{2}\) are the target points for the thumb and the index finger, respectively. Please note that the angle set of the wrist \(\overset{\rightarrow}{q_{w}}\) is intentionally set to be the same in the database of the thumb and the index finger so that the inconsistency between the wrist angles of two fingers can be avoided. The result of Equation (4) is used as a basis for performing the IGA to prevent unnecessary computations. Moreover, the database is sorted in the order of the angle of the wrist for quick search and access to the corresponding optimized angles of the wrist. This optimized angle set of the wrist \(\overset{\rightarrow}{q_{w}}^{*}\) is further provided to the IGA through the estimation function below as the initial guess to accelerate the computation and to offer better convergence. Equation (5) defines the estimation function.  
\[\theta_{w1}{}^{*},\theta_{w2}{}^{*}=\underset{\overset{\rightarrow}{q_{w}}}{ min}\Big{[}\kappa\Big{(}T\Big{(}\overset{\rightarrow}{q_{w}}\Big{)},p_{1} \Big{)}+\kappa\Big{(}I\Big{(}\overset{\rightarrow}{q_{w}}\Big{)},p_{2}\Big{)} \Big{]}. \tag{5}\]  
**4. Algorithm**  
The proposed hybrid genetic algorithm mainly includes two steps:1. Examining the feasibility of the motion command on the basis of the workspace and providing the angle set of the wrist if it is reachable.
2. Using IGA to solve the inverse kinematics and finding joint values of two fingers.  
A schematic illustration of the proposed algorithm is depicted in Figure 3, and a flowchart of the proposed hybrid GA is shown in Figure 4. A detailed explanation of each step is addressed in the sections below.  
Figure 4: Flowchart of the proposed algorithm.  
Figure 3: Process of the proposed algorithm: (**a**) assign inverse kinematics (IK) request; (**b**) feasibility check and generate wrist angle range; (**c**) perform immigration genetic algorithm (IGA) to obtain precise solution.