## 2 Materials and Methods
### Optimization Framework  
The first part of the optimization process deals with finding the optimal position of the RCM point by using a genetic algorithm integrated with fuzzy logic for fitness evaluations. Optimization represents a critical step in designing a medical robot, especially when dealing with complex, multidimensional systems that require balancing numerous objectives, constraints, and uncertainties. Traditional optimization methods often have to handle incomplete and not-accurate-enough information that characterize real-world scenarios, a challenge that motivates researchers to integrate evolutionary algorithms with heuristic evaluation techniques. One promising strategy is the optimization framework that combines genetic algorithms with fuzzy logic for fitness evaluation. In this framework, genetic algorithms serve as the primary search mechanism, while fuzzy logic refines the evaluation process by incorporating expert knowledge and heuristic rules to assess candidate solutions in a nuanced manner. In the case of genetic algorithms, a population of solutions evolved over successive generations. Each member of the population (individual) is represented by a chromosome, a string of values encoding a potential solution to the optimization problem. The algorithm is initiated with a random population and then employs selection, crossover, and mutation operators to generate new solutions. The selection process selects individuals based on their fitness values, and the evolutionary operations encourage diversity while guiding the search toward regions of the solution space that exhibits high performance. This approach is particularly effective when the search space is large and complex. Genetic algorithms do not require gradient information or continuity in the design space, making them suitable for problems with discontinuities, non-linearities, and multiple local optima [23]. By iteratively exploring and exploiting the design space, genetic algorithms can converge on near-optimal solutions that traditional gradient-based methods might miss. However, the performance of a GA heavily depends on its fitness evaluation, which is the process of quantifying how good each candidate solution is. Fuzzy logic has emerged as a powerful tool for optimizing mechanical systems [24], providing a flexible and intelligent approach to decision-making in uncertain and complex environments. Traditional binary logic operates on crisp values (true/false) while fuzzy logic allows partial thrust and enables more flexibility and adaptive control over the optimization process. This method is useful for mechanism optimization, where multiple variables, constraints, and uncertainties must be analyzed and balanced to achieve optimal performance. Traditional optimization techniques rely on precise mathematical models [25], but real-world scenarios often include imprecise and incomplete information, making deterministic methods less effective. With the help of fuzzy logic, these challenges can be addressed by incorporating expert knowledge and heuristic methods to evaluate and optimize mechanical parameters [26]. For mechanism optimization, fuzzy logic is often used in areas such as kinematic [27] and dynamic analysis [28; 29]. A key advantage of fuzzy logic in mechanism optimization is its ability to handle multiple-objective problems often required by engineering applications, especially in the case of engineering solutions for surgery. Fuzzy logic provides a systematic way to assign weight to different performance criteria and derive optimal design based on real-world constraints. Figure 2 provides a general view on the genetic algorithm using fuzzy logic for fitness evaluation. Problem formulation and variable identification deals with defining the objectives of the optimization (identify the performance goals); determine the physical, geometrical, and operational constraints of the design; identify the decision variables like key mechanical parameters that influence the performance of the design.