Large size magic square generation using multi-stage evolutionary strategy
In this study, we propose a multistage evolutionary strategy that hierarchically divides the constraints of a magic sum into three stages: rows, columns, and diagonals. Individuals satisfying the constraints of each stage, referred to as “satisfying individuals for magic sum”, are cascaded forward as initial solutions for the subsequent stage. Magic squares have been studied and developed by mathematicians and mathematical enthusiasts since ancient times. However, Most current approaches rely on rule-based systems, which, due to the complexity of combinatorial optimization involved, can only produce a restricted set of specific magic squares. In this study, we generated magic squares that cannot be created using rule-based methods. We added a lower layer that generates individuals satisfying only row constraints and split the semi-magic square into two layers, thereby eliminating the need to search in the row-wise direction and substantially reducing the number of search operations. Experiments were conducted to compare the proposed and existing methods in terms of runtime and number of generations, with the proposed method exhibiting substantial reductions in both measures. Specifically, our method generated 90x90 magic squares approximately 232 times faster than the existing methods, with successful generation occurring within 6 min and 57 s on average (based on 10 trials). The proposed method was also able to generate large 300x300 magic squares in real time.
Authors
- Shōhei Kato (ORCID: https://orcid.org/0000-0003-4130-2729)
- Kazuki Takemi
- Takuto Sakuma
Institutions
- Nagoya Institute of Technology (JP)
Publication Details
- Published
- 2024-12-04
- DOI
- https://doi.org/10.1109/ica63002.2024.00032
- Primary Topic
- Artificial Intelligence in Games
- Type
- article
- Field-Weighted Citation Impact
- 0.00