WAVE FUNCTION COLLAPSE. APPLICATION OF COLLAPSE METHOD IN GAME SPACE GENERATION
DOI: 10.31673/2412-4338.2023.034150
Abstract
The article explores a method for creating game content using procedural generation based on the wave function collapse. It has been determined that using this method with the basic approach yields relatively acceptable results. In some cases, anomalies are encountered, or spaces with a low level of diversity are generated. At the initial stages of generation, zones where generation is impossible using the basic method have been identified. One way to address this issue is through repeated generation, which requires additional resources. A modification of the method has been proposed using repeated passes. In some cases, this method has proven to be quite effective. To improve the method's efficiency, the space has been divided into zones to verify the correctness of the generated area. The most effective application of the basic method has been determined – traversing the space with another algorithm and post-processing after generation. One such algorithm allows for the preparation of samples to be substituted into closed zones that appear. Preparing generation materials significantly speeds up the operation of the wave function collapse. Preliminary traversal of space to identify probable problem areas occurs separately from the main generation. The algorithm has been modified for the automatic recognition of compatible samples, significantly reducing the time for generation preparation and the number of problem areas created. Enclosed spaces that restrict access to parts of the map have been identified. Depending on the size of the restricted area, several solutions have been proposed. For small areas, replacement with decorative content, for large areas – regeneration with samples designed to create internal content, or replacement of certain blocks with passable ones. Based on the research results, it is concluded that the generation of game space using the wave function collapse method is more efficient when auxiliary algorithms and constraints are applied at the initial and final stages of generation. Also, the idea of dividing generation into visible and invisible parts is proposed: the visible part is created during scene preparation, and the invisible part is generated during level traversal.
Keywords: procedural generation, wave function collapse, algorithm, artificial intelligence, optimization, samples, constraints, efficiency, game space.
References
1. Approval of the Concept of Artificial Intelligence Development in Ukraine. Order of the Cabinet of Ministers of Ukraine dated December 2, 2020, No. 1556-r. //URL: https://zakon.rada.gov.ua/laws/show/1556-2020-%D1. – 2002. – Vol. 80.
2. K. Zaspa. Hydrodynamic-Wave Calibration of Potentials in Maxwell's Equations: Nonlinear Dynamics and Coherence, Collapse, Expansion, and Exchange Interaction of Inertial Dissipative Collector Perturbations in Non-equilibrium Media in Complex Space. Spiral Turbulence and Coherent Structures of Three-Dimensional Time. – 2022 // Bulletin of Khmelnytsky National University, No. 6, Volume 1, 2022 (315) – P. 89-92.
3. Theoretical Physics. Quantum Mechanics [Electronic resource]: a textbook for bachelor's degree students in the specialty 104 "Physics and Astronomy" / O. M. Brodin; Igor Sikorsky Kyiv Polytechnic Institute. – Electronic text data (1 file: 2.6 MB). – Kyiv: Igor Sikorsky Kyiv Polytechnic Institute, 2022. – P. 58-60.
4. Morris Q. E. Modifying Wave Function Collapse for more Complex Use in Game Generation and Design. – 2021.
5. Summerville A. et al. Procedural content generation via machine learning (PCGML) // IEEE Transactions on Games. – 2018. – Vol. 10. – No. 3. – P. 257-270.
6. Short T., Adams T. (ed.). Procedural generation in game design. – CRC Press, 2017.
7. Smith, Gillian (2015). An Analog History of Procedural Content Generation (PDF). Foundations of Digital Games 2015. Pacific Grove, California. Retrieved October 7, 2019.
8. Sandhu A., Chen Z., McCoy J. Enhancing wave function collapse with design-level constraints // Proceedings of the 14th International Conference on the Foundations of Digital Games. – 2019. – P. 1-9.