# Complete Path Planning for a Tetris-Inspired Self-Reconfigurable Robot by the Genetic Algorithm of the Traveling Salesman Problem

^{1}

^{2}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Tiling-Based Complete Path Planing Framework for hTetro

## 3. The GA for the TSP-Based Local Motion Planner

#### 3.1. hTetro in a Workspace

**w**. Each block of hTetro is provided with DC motors for its stable and balanced locomotion. Three high-torque servo motors ${h}_{m}(m=\{1,2,3\})$ present at the hinge position are responsible for shapeshifting. Each DC motor and servomotor (at hinge positions) operate at 7.4 V and 14.8 V, respectively. The hTetro robot consists of navigational components in each block, which benefit smooth locomotion. Since the robot base is reconfigurable, achieving differential movement is very challenging. Hence, we developed linear locomotive gaits and made the robot traverse forward, backward, leftward, and rightward directions. In order to achieve the mentioned motion capability, we established omnidirectional wheels in each block of the hTetro robot.

Algorithm 1: Assigning block locations for each tiling pattern |

1 Function BLOCK LOCATIONS{workspace, tileset}: |

2 workspace{$ws({w}_{row},{w}_{column})$} |

3x ←0, j ←0, y ←0, p ←0 |

4 for all x, x ←0, to do |

5 for all y, y ←0, to do |

6 if $ws(x,y)$ is the location of tiling pattern p then |

7 if tiling pattern p is asymmetrical morphology then |

8 Assign: $Wi$ blocks locations: $Wi\{({i}_{x}^{a},{i}_{y}^{a}),({i}_{x}^{b},{i}_{y}^{b}),({i}_{x}^{c},{i}_{y}^{c}),({i}_{x}^{d},{i}_{y}^{d})\}$ according to Figure 7 |

9 elseif tiling pattern p is symmetrical morphology then |

10 Search: for tiling pattern as in Figure 8 having blocks yield the nearest distance with blocks of pattern with ${W}_{i-1}$ |

11 Assign: $Wi$ block locations: $Wi\{({i}_{x}^{a},{i}_{y}^{a}),({i}_{x}^{b},{i}_{y}^{b}),({i}_{x}^{c},{i}_{y}^{c}),({i}_{x}^{d},{i}_{y}^{d})\}$ according to Figure 8 |

12 end |

13 end |

14 end |

End Function |

## 4. Trajectory Generation

Algorithm 2: Genetic Algorithm |

1 Function GENETIC ALGORITHM {tileset, tiling waypoints locations}: |

2Define the location of the reference block |

3Define the cost function between two waypoints. |

4Initialize the random waypoints of the population. |

5 While (Stop condition is not satisfied) DO |

6 Select parents: possible trajectories to connect all waypoints from the population. |

7 Produce children: from the parent trajectories which are selected. |

8 Mutate: perform swap mutation between two random waypoints |

9 Extend: the population size by adding the best children to the population. |

10 Reduce: the population extension. |

11 end |

12Output the optimal order of each waypoint. |

End Function |

## 5. Experimental Results

## 6. Discussion and Future Works

## 7. Conclusions

## Author Contributions

## Funding

## Conflicts of Interest

## References

- Marketsandmarkets. Cleaning Robot Market by Type, Product (Floor-Cleaning Robot, Lawn-Cleaning Robot, Pool-Cleaning Robot, Window-Cleaning Robot), Application (Residential, Commercial, Industrial, Healthcare), and Geography—Global Forecast to 2023. 2018. Available online: https://www.marketsandmarkets.com/Market-Reports/cleaning-robot-market-22726569.html (accessed on 5 October 2018).
- Gao, X.; Li, K.; Wang, Y.; Men, G.; Zhou, D.; Kikuchi, K. A floor cleaning robot using Swedish wheels. In Proceedings of the IEEE International Conference on Robotics and Biomimetics (ROBIO 2007), Sanya, China, 15–18 December 2007; pp. 2069–2073. [Google Scholar]
- Yang, S.X.; Luo, C. A neural network approach to complete coverage path planning. IEEE Trans. Syst. Man Cybern. Part B
**2004**, 34, 718–724. [Google Scholar] [CrossRef] - Fink, J.; Bauwens, V.; Kaplan, F.; Dillenbourg, P. Living with a vacuum cleaning robot. Int. J. Soc. Robot.
**2013**, 5, 389–408. [Google Scholar] [CrossRef] - Luo, C.; Yang, S.X. A real-time cooperative sweeping strategy for multiple cleaning robots. In Proceedings of the 2002 IEEE International Symposium on Intelligent Control, Vancouver, BC, Canada, 30 October 2002; pp. 660–665. [Google Scholar]
- Zelinsky, A.; Jarvis, R.A.; Byrne, J.; Yuta, S. Planning paths of complete coverage of an unstructured environment by a mobile robot. In Proceedings of the International Conference on Advanced Robotics, Tokyo, Japan, 8–9 November 1993; Volume 13, pp. 533–538. [Google Scholar]
- Gabriely, Y.; Rimon, E. Spanning-tree based coverage of continuous areas by a mobile robot. Ann. Math. Artif. Intell.
**2001**, 31, 77–98. [Google Scholar] [CrossRef] - Xu, L. Graph Planning for Environmental Coverage. Ph.D. Thesis, Carnegie Mellon University, Pittsburgh, PA, USA, 2011. [Google Scholar]
- Jin, J.; Tang, L. Coverage path planning on three-dimensional terrain for arable farming. J. Field Robot.
**2011**, 28, 424–440. [Google Scholar] [CrossRef] - Cheng, P.; Keller, J.; Kumar, V. Time-optimal UAV trajectory planning for 3D urban structure coverage. In Proceedings of the IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS 2008), Nice, France, 22–26 September 2008; pp. 2750–2757. [Google Scholar]
- Galceran, E.; Carreras, M. Planning coverage paths on bathymetric maps for in-detail inspection of the ocean floor. In Proceedings of the 2013 IEEE International Conference on Robotics and Automation (ICRA), Karlsruhe, Germany, 6–10 May 2013; pp. 4159–4164. [Google Scholar]
- Choset, H.; Pignon, P. Coverage path planning: The boustrophedon cellular decomposition. In Field and Service Robotics; Springer: Berlin, Germany, 1998; pp. 203–209. [Google Scholar]
- Acar, E.U.; Choset, H.; Rizzi, A.A.; Atkar, P.N.; Hull, D. Morse decompositions for coverage tasks. Int. J. Robot. Res.
**2002**, 21, 331–344. [Google Scholar] [CrossRef] - Lumelsky, V.J.; Mukhopadhyay, S.; Sun, K. Dynamic path planning in sensor-based terrain acquisition. IEEE Trans. Robot. Autom.
**1990**, 6, 462–472. [Google Scholar] [CrossRef] - Oksanen, T.; Visala, A. Coverage path planning algorithms for agricultural field machines. J. Field Robot.
**2009**, 26, 651–668. [Google Scholar] [CrossRef] - Choset, H.; Burdick, J. Sensor-based exploration: The hierarchical generalized voronoi graph. Int. J. Robot. Res.
**2000**, 19, 96–125. [Google Scholar] [CrossRef] - Acar, E.U.; Choset, H. Robust sensor-based coverage of unstructured environments. In Proceedings of the 2001 IEEE/RSJ International Conference on Intelligent Robots and Systems, Maui, HI, USA, 29 October–3 November 2001; Volume 1, pp. 61–68. [Google Scholar]
- Acar, E.U.; Choset, H. Sensor-based coverage of unknown environments: Incremental construction of morse decompositions. Int. J. Robot. Res.
**2002**, 21, 345–366. [Google Scholar] [CrossRef] - Wong, S.C.; MacDonald, B.A. A topological coverage algorithm for mobile robots. In Proceedings of the 2003 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS 2003), Las Vegas, NV, USA, 27–31 October 2003; Volume 2, pp. 1685–1690. [Google Scholar]
- Butler, Z.J.; Rizzi, A.A.; Hollis, R.L. Contact sensor-based coverage of rectilinear environments. In Proceedings of the 1999 IEEE International Symposium on Intelligent Control/Intelligent Systems and Semiotics, Cambridge, MA, USA, 17 September 1999; pp. 266–271. [Google Scholar]
- Hameed, I.; Bochtis, D.; Sorensen, C. Driving angle and track sequence optimization for operational path planning using genetic algorithms. Appl. Eng. Agric.
**2011**, 27, 1077–1086. [Google Scholar] [CrossRef] - Gabriely, Y.; Rimon, E. Spiral-stc: An on-line coverage algorithm of grid environments by a mobile robot. In Proceedings of the IEEE International Conference on Robotics and Automation (ICRA’02), Washington, DC, USA, 11–15 May 2002; Volume 1, pp. 954–960. [Google Scholar]
- Hsu, P.M.; Lin, C.L.; Yang, M.Y. On the complete coverage path planning for mobile robots. J. Intell. Robot. Syst.
**2014**, 74, 945–963. [Google Scholar] [CrossRef] - Gonzalez, E.; Alarcon, M.; Aristizabal, P.; Parra, C. BSA: A coverage algorithm. In Proceedings of the IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS 2003), Las Vegas, NV, USA, 27–31 October 2003; Volume 2, pp. 1679–1684. [Google Scholar]
- Gonzalez, E.; Alvarez, O.; Diaz, Y.; Parra, C.; Bustacara, C. BSA: A complete coverage algorithm. In Proceedings of the 2005 IEEE International Conference on Robotics and Automation (ICRA 2005), Barcelona, Spain, 18–22 April 2005; pp. 2040–2044. [Google Scholar]
- Lee, H.Y.; Shin, H.; Chae, J. Path Planning for Mobile Agents Using a Genetic Algorithm with a Direction Guided Factor. Electronics
**2018**, 7, 212. [Google Scholar] [CrossRef] - Tan, N.; Mohan, R.E.; Elangovan, K. Scorpio: A biomimetic reconfigurable rolling–crawling robot. Int. J. Adv. Robot. Syst.
**2016**, 13, 1729881416658180. [Google Scholar] [CrossRef] - Nansai, S.; Rojas, N.; Elara, M.R.; Sosa, R. Exploration of adaptive gait patterns with a reconfigurable linkage mechanism. In Proceedings of the 2013 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), Tokyo, Japan, 3–7 November 2013; pp. 4661–4668. [Google Scholar]
- Veerajagadheswar, P.; Elara, M.R.; Pathmakumar, T.; Ayyalusami, V. A Tiling-Theoretic Approach to Efficient Area Coverage in a Tetris-Inspired Floor Cleaning Robot. IEEE Access
**2018**, 6, 35260–35271. [Google Scholar] [CrossRef] - Kee, V.; Rojas, N.; Elara, M.R.; Sosa, R. Hinged-Tetro: A self-reconfigurable module for nested reconfiguration. In Proceedings of the 2014 IEEE/ASME International Conference on Advanced Intelligent Mechatronics (AIM), Besacon, France, 8–11 July 2014; pp. 1539–1546. [Google Scholar]
- Le, A.; Prabakaran, V.; Sivanantham, V.; Mohan, R. Modified A-Star Algorithm for Efficient Coverage Path Planning in Tetris Inspired Self-Reconfigurable Robot with Integrated Laser Sensor. Sensors
**2018**, 18, 2585. [Google Scholar] [CrossRef] [PubMed] - Conway, J.H.; Lagarias, J.C. Tiling with polyominoes and combinatorial group theory. J. Comb. Theory Ser. A
**1990**, 53, 183–208. [Google Scholar] [CrossRef] - Jho, C.W.; Lee, W.H. Video Puzzle Game Application of Polyomino Re-tiling. In Embedded and Multimedia Computing Technology and Service; Springer: Berlin, Germany, 2012; pp. 363–369. [Google Scholar]
- Lo, K.Y.; Fu, C.W.; Li, H. 3D polyomino puzzle. ACM Trans. Graph.
**2009**, 28, 157. [Google Scholar] [CrossRef] - Lin, S.; Kernighan, B.W. An effective heuristic algorithm for the traveling-salesman problem. Oper. Res.
**1973**, 21, 498–516. [Google Scholar] [CrossRef] - Larranaga, P.; Kuijpers, C.M.H.; Murga, R.H.; Inza, I.; Dizdarevic, S. Genetic algorithms for the travelling salesman problem: A review of representations and operators. Artif. Intell. Rev.
**1999**, 13, 129–170. [Google Scholar] [CrossRef] - Geng, X.; Chen, Z.; Yang, W.; Shi, D.; Zhao, K. Solving the traveling salesman problem based on an adaptive simulated annealing algorithm with greedy search. Appl. Soft Comput.
**2011**, 11, 3680–3689. [Google Scholar] [CrossRef] - Backtracking. A Polyomino Tiling Algorithm. 2018. Available online: https://gfredericks.com/gfrlog/99 (accessed on 28 October 2018).

**Figure 5.**Tilesets by tiling theory and hTetro morphologies fitting inside the tilesets. (

**a**) 8 × 8 workspace; (

**b**) tileset; (

**c**) hTetro morphologies fit in platform; (

**d**) partially overlapped sub-workspaces of 6 × 7 workspace; (

**e**) tileset for sub-workspace; (

**f**) tileset for 6 × 7 workspace with overlapped cells.

**Figure 6.**Block diagram of proposed local motion planing strategy for tiling-based complete path planning. TSP: traveling salesman problem.

**Figure 7.**The tiling pattern and corresponding other blocks’ locations considering block b as a reference point for hTetro asymmetric mythologies. (

**a**) T shape; (

**b**) J shape; (

**c**) L shape.

**Figure 8.**The tiling pattern and corresponding other blocks’ locations considering block b as a reference point for hTetro symmetrical morphologies. (

**a**) I shape; (

**b**) O shape; (

**c**) Z shape; (

**d**) S shape.

**Figure 11.**The distance between each block of two sample shapes of hTetro.(

**a**) option 1; (

**b**) option 2; (

**c**) option 3; (

**d**) option 4.

**Figure 12.**Generated tileset for tested workspaces. (

**a**) 6 × 6 workspace; (

**b**) 8 × 7 workspace; (

**c**) 10 × 10 workspace; (

**d**) 11 × 11 workspace with obstacles.

**Figure 13.**Path generated for the different workspaces with different shapes. (

**a**) Optimal path for 6 × 6; (

**b**) Optimal path for 8 × 7; (

**c**) Optimal path for 10 × 10; (

**d**) Optimal path for 11 × 11.

**Figure 14.**Comparison results between methods for an 11 × 11 workspace. (

**a**) Zigzag scanning 1 row order; (

**b**) Zigzag scanning 2 row order; (

**c**) Spiral scanning 1 row order; (

**d**) Spiral scanning 2 row order; (

**e**) Greedy search; (

**f**) Proposed method.

**Figure 15.**Paths generation for hTetro. (

**a**) Path considering only block b; (

**b**) Path considering all four blocks.

**Figure 16.**Paths generation for different tilesets with the same 6 × 6 workspace. (

**a**) Optimal path consisting of L, S, J, O, Z; (

**b**) Optimal path consisting of O, I J, L; (

**c**) Optimal path consisting of only O.

**Figure 17.**Simulation workspace environment. (

**a**) Robot at first waypoint; (

**b**) Robot transformation on workspace; (

**c**) Robot navigate to clear the next waypoint.

**Figure 18.**Heat map output of each considered algorithm for 11 × 11 workspace. (

**a**) Zigzag scanning 1 row order; (

**b**) Zigzag scanning 2 row order; (

**c**) Spiral scanning 1 row order; (

**d**) Spiral scanning 2 row order; (

**e**) Greedy search; (

**f**) Proposed method.

Cost Weight | Path Generating Time (s) | |
---|---|---|

Zigag 1 row order | 71.642 | 0.012 |

Zigag 2 row order | 70.124 | 0.155 |

Spiral 1 row order | 68.175 | 0.158 |

Sprial 2 row order | 67.124 | 0.522 |

Greedy search | 65.216 | 30.240 |

Propsed method | 62.368 | 1.150 |

Coefficient Value Settings | Meaning | Cost Weight of Considered Blocks | Cost Weight of 4 Blocks |
---|---|---|---|

$\alpha =1,\beta =0,\lambda =0,\gamma =0$ | Only block a | 50.124 | 55.435 |

$\alpha =0,\beta =1,\lambda =0,\gamma =0$ | Only block b | 50.365 | 56.321 |

$\alpha =0,\beta =0,\lambda =1,\gamma =0$ | Only block c | 51.321 | 56.891 |

$\alpha =0,\beta =0,\lambda =0,\gamma =1$ | Only block d | 52.013 | 58.432 |

$\alpha =0.5,\beta =0.5,\lambda =0,\gamma =0$ | Only blocks a, b | 51.864 | 53.224 |

$\alpha =0,\beta =0,\lambda =0.5,\gamma =0.5$ | Only blocks c, d | 51.315 | 54.863 |

$\alpha =0.25,\beta =0.25,\lambda =0.25,\gamma =0.25$ | All four blocks | 51.417 | 51.417 |

Workspace Size | Tileset | Cost Weight |
---|---|---|

6 × 6 | Tileset 1 includes L, S, J, O, N | 10.901 |

Tileset 2 includes O, I, J, L | 10.152 | |

8 × 7 | Tileset 1 includes J, L, I | 30.761 |

Tileset 2 includes O, T, L, I | 31.434 | |

10 × 10 | Tileset 1 includes T, Z | 51.417 |

Tileset 2 includes Z, T, J, I | 52.325 | |

11 × 11 | Tileset 1 includes J, L, T, S | 63.122 |

Tileset 2 includes O, J, L, I | 61.1368 |

Method | Avg. Grid Time (s) | Distance Travelled (cm) |
---|---|---|

Zigzag 1 row order | 5.1439 | 2976 |

Zigzag 2 row order | 3.9856 | 2272 |

Spiral 1 row order | 5.3063 | 3050 |

Spiral 2 row order | 3.3869 | 1994 |

Greedy search | 3.2904 | 1922 |

Proposed method | 3.2290 | 1890 |

**Table 5.**Comparison results of percentage re-covered area from the heat-map, with different simulation environment thresholds.

Threshold of 150 | Threshold of 100 | |
---|---|---|

Zigzag 1 row order | 34.71% | 38.01% |

Zigzag 2 row order | 25.61% | 28.92% |

Spiral 1 row order | 30.57% | 32.23% |

Spiral 2 row order | 27.27% | 29.75% |

Greedy search | 20.66% | 23.96% |

Proposed method | 15.70% | 18.18% |

© 2018 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Le, A.V.; Arunmozhi, M.; Veerajagadheswar, P.; Ku, P.-C.; Minh, T.Q.; Sivanantham, V.; Mohan, R.E. Complete Path Planning for a Tetris-Inspired Self-Reconfigurable Robot by the Genetic Algorithm of the Traveling Salesman Problem. *Electronics* **2018**, *7*, 344.
https://doi.org/10.3390/electronics7120344

**AMA Style**

Le AV, Arunmozhi M, Veerajagadheswar P, Ku P-C, Minh TQ, Sivanantham V, Mohan RE. Complete Path Planning for a Tetris-Inspired Self-Reconfigurable Robot by the Genetic Algorithm of the Traveling Salesman Problem. *Electronics*. 2018; 7(12):344.
https://doi.org/10.3390/electronics7120344

**Chicago/Turabian Style**

Le, Anh Vu, Manimuthu Arunmozhi, Prabakaran Veerajagadheswar, Ping-Cheng Ku, Tran Hoang Quang Minh, Vinu Sivanantham, and Rajesh Elara Mohan. 2018. "Complete Path Planning for a Tetris-Inspired Self-Reconfigurable Robot by the Genetic Algorithm of the Traveling Salesman Problem" *Electronics* 7, no. 12: 344.
https://doi.org/10.3390/electronics7120344