INTERNATIONAL JOURNAL OF COMPUTERS COMMUNICATIONS & CONTROL Online ISSN 1841-9844, ISSN-L 1841-9836, Volume: 18, Issue: 4, Month: August, Year: 2023 Article Number: 5475, https://doi.org/10.15837/ijccc.2023.4.5475 CCC Publications Gestalt Principles Governed Fitness Function for Genetic Pythagorean Neutrosophic WASPAS Game Scene Generation A. Petrovas, R. Bausys, E. K. Zavadskas Aurimas Petrovas Department of Graphical Systems Vilnius Gediminas Technical University, Lithuania Saulėtekio al. 11, Vilnius, 10223, Lithuania aurimas.petrovas@vilniustech.lt Romualdas Bausys Department of Graphical Systems Vilnius Gediminas Technical University, Lithuania Saulėtekio al. 11, Vilnius, 10223, Lithuania romualdas.bausys@vilniustech.lt Edmundas Kazimieras Zavadskas* Institute of Sustainable Construction Vilnius Gediminas Technical University, Lithuania Saulėtekio al. 11, Vilnius, 10223, Lithuania *Corresponding author: edmundas.zavadskas@vilniustech.lt Abstract The maintenance of visual appeal and coherence in the procedural game scene generation is still a difficult problem. Traditional procedural game scene generation algorithms produce samples that show a noticeable resemblance to each other. The proposed algorithm allows us to add diverse game object compositions and increase creativity value in that way. Result diversity is formed by the proposed genetic algorithm modification and MCDM method based on the fitness function. Video game immersion is reached by aesthetic game element pattern composition, and one of the solutions for this issue is to apply automated aesthetic modelling of the generated game levels. In this research, the construction of fitness function was extended by the modelling of aesthetic principles, which were reverse-engineered from Gestalt principles. All rules were implemented by construction of a focal function with a square zone for each matrix cell of the single game scene. Five types of Gestalt rules were modelled and combined into a Pythagorean neutrosophic WASPAS method and the final score calculation algorithm was proposed. The proposed approach to generating game scenes strikes a balance between functionality and aesthetics to provide players with an engaging and immersive gaming experience. Keywords: Gestalt principles, MCDM,Genetic algorithm, Procedural generation, Video game, Pythagorean Neutrosophic Set. https://doi.org/10.15837/ijccc.2023.4.5475 2 1 Introduction Novadays, creativity modelling popularity is increasing and is being used in different fields of applications. Even if creativity modelling is a popular direction, there is no common definition of creativity among different fields of applications. Creativity structure is also abstract and open for interpretation. Creativity, in general, includes a set of different creative intelligence abilities, which is why simulation presents a difficult technical challenge [9, 37]. It means that the abilities that humans usually use to create are not that easy to understand and model. Creativity modelling perspective explains how creativity traits can be understood or extracted from the existing knowledge, works, or its environment. There is a lot of information about creativity indirectly encoded in the surrounding world. It is important to understand how creativity is defined for modelling effective generation systems. One of the most popular creativity modelling perspective groups categorizes them into four categories. These groups are: person (creativity agent characteristics and model), process (actions undertaken during the creative process), product (generated creative artefacts), press (meta information, which is indirectly related to the work and surrounding culture of the result) [10, 34]. Science community usually works with reverse engineering systems to create a basis for creativity simulations, which are aligned with the product approach [31]. One of the current computational creativity problems is the generation of visually appealing and functional artefact results. In the proposed research, the focus is on the analysis and modelling of creative process. The definition of creativity usually involves new concept division and it is usually hard to learn new concepts only by data that are already created. Computational creativity is a field of artificial intelligence that studies the building of compu- tational systems that have creative behaviours. Part of the creativity process involves methods to combine goals of different nature. Modern applications of computational creativity mostly include generative art, and generative art is an algorithmically created artefact that resembles artistic mo- tivations [3]. It is used mainly to generate different forms of media. Generation examples include assets, such as sound, including music [6], image generation from text [25], specialised pixel art sheets [27], image inpainting [19] and text generation [7, 17]. Closely relevant context for generative art is the digital world or game-level generation, and for that, procedural generations are used quite often. The procedural generation is a data creation method that uses algorithms and automation to create results [28] and, as a practical concept in games, has existed for more than three decades with one of the first notable games called ‘Elite’ [4]. The idea of generating distinct and not repetitive visual results is still a novel concept today. The procedural generation techniques in games vary, some of the more common approaches include [18] search (usually genetic or fitness-based algorithms), solver, rule with a stricter control [21] or grammar-based (originating in linguistics) algorithms. Some examples include game-level generation using generative adversarial networks (GAN) [13, 33] to train and then use neural nets for the generation of new levels. Another example uses cellular automata [11], evalu- ation agents iterate over the element batches of game level. Some methods analyse gameplay videos to train their models [14]. There is also a more direct approach to game design pattern application for a search-based algorithm [1]. Those systems usually analyse hand-crafted or indexed creative arte- facts to learn and generalise pattern generation systems. Applications and methods for procedural generation vary, but most of them try to create indistinguishable results or assist the creation process compared to manually created artefacts. This process automates part of cognitive work and evolves the style in which media can be created [12]. Search-based procedural generation of assets or their composition in video games usually requires evaluation, which evaluates generated artefacts and rates them based on their fitness function perfor- mance. Construction of fitness function is usually a key aspect of the successful generator, because it decides the direction of the result generation. The advantage of the search algorithm is that existing solutions (based on a fitness function) are always found. There are two types of fitness criteria: aes- thetic and functional. The aesthetic criteria define the visual aspect (pleasing appearance of things) of the generated level, and the functional criteria define the application of the rules such as existence of key object elements or ability to use the artefact according to his purpose. One of the challenges is the seamless integration of both types of criteria into the final result [15], as one or the other quite often can contradict each other. Functional criteria are also easier to integrate than aesthetic criteria, https://doi.org/10.15837/ijccc.2023.4.5475 3 because aesthetic criteria follow more abstract rules and are more difficult to integrate seamlessly. There are different ways or rules to follow for aesthetic criteria result [10, 16] which can include rela- tions to such examples as Apollonian order, Dionysian chaos; Gestalt, individual and repetition shape; style, multiplicity or cohesion variations. These methods can be used to derive aesthetic criteria for procedural generation. One of the challenges which comes with this choice is to model their execution as, more often than not, they are defined in abstract terms, but for mathematical algorithm, we need exact definitions for algorithm elements, and this is the exact aim of this research. At the same time, for artefacts to have high creative value, we need to device methods, which could apply high-level aesthetic concepts. Multicriteria decision making (MCDM) is one of the solutions to effectively com- bine fitness function criteria. It models strategies on how to select alternatives in a finite pool of possible solutions [41]. These methods can be applied to the fitness function of the genetic algorithm to optimise the genetic operators. Some MCDM method variations can also increase non determinism, by using fuzzy sets instead of crisp numbers. The concept of fuzzy sets was first introduced by Lotfi A. Zadeh in 1965 [39]. Zadeh proposed a new kind of set that allowed for degrees of membership, where an element can have a degree of membership to a set that ranges from 0 to 1, depending on how closely it matches the set’s criteria. This concept is called a "fuzzy set". In 1973, he published a seminal paper [40], which outlined the potential applications of fuzzy sets to a wide range of fields, including control theory, decision making, and pattern recognition. Neutrosophic sets are a type of mathematical framework that allows for the representation of uncertain or indeterminate information and they were introduced by Florentin Smarandache as an extension of fuzzy logic in 1999 [29]. One of the neutrosophic set extension is called Pythagorean neutrosophic sets, which are a more flexible tool for representing uncertainty than regular neutrosophic sets [35]. The novelty point of this research is automatic application of abstract Gestalt principles in a procedural video game scene object layout generation. The following structure of the paper is as follows: Gestalt principles are explained in the second chapter and the modeling of these principles in the third chapter. Full model is explained in the fourth chapter and results in the fifth chapter. 2 Gestalt principles The aesthetic aspects of created products are usually realised by applying so-called visual principles. To utilise aesthetic criteria, we need to choose a set of aesthetic rules, and one of the high-level sets of rules for this purpose is called Gestalt principles [36]. Gestalt principles are rules of element organisation and perception, which explains how elements should be placed in relation with each other to achieve a specific aesthetic visual effect. In our context, the elements are game objects. Their core is based on optical perception. Looking at the world, the brains can see complex compositions of objects, which in turn are composed of smaller objects, and the hierarchy continues [32]. It subconsciously perceives the world in layers of abstraction, which means that we have a hierarchy of visual elements defined by their scope size. Layers of abstraction is usually also learnt by deep neural networks [26] and it is also common to see this behaviour with convolutional neural nets [30, 38]. The Gestalt principles aim to formulate regularities for visual input grouping. There is a set of abstract rules on which these principles are formed. There are usually between 5 and 10 Gestalt principles based on how they are grouped. Also, some sets of principles were not introduced with the initial definition of Gestalt principles. These rules use a high level of abstraction, and their application varies based on the selected objective. Originally, they were not devised for automated tasks, but they have the advantage of low-level building strategy for high value aesthetic results. Some examples of an application include visual data representation. [20] explores how network data can be visually grouped and animated for clarity purpose. Another common example is computer interfaces [8] This is the most popular practical application of Gestalt principles, because visual grouping can make processing of information for humans more efficient. It can also be used for edge detection in images [5]. Visual data might not be clear and have some continuation issues, so by its core, more abstract and error forgiving methods like Gestalt principles can be used as base of the algorithm. The Gestalt principles are (Table 1): Aesthetic criteria can be categorized by an abstraction level. High-level definition is abstract and https://doi.org/10.15837/ijccc.2023.4.5475 4 Table 1: Gestalt principles Name of the prin- ciple Explanation Similarity Similar looking objects are visually grouped regardless of their prox- imity to each other (Figure 1) Proximity When objects are close to each other, they are perceived as groups (Figure 2) Continuity Aligned and smoothest paths are integrated into perceptual wholes (Figure 3) Focal Point An object that is different compared to a whole will stand out (Figure 4) Common Region When objects are within a closed region, they are perceived as a group (Figure 5) Closure Incomplete object patterns are perceived as complete (Figure 6) Figure Ground Separation of objects between foreground and background based on their shape and associations (Figure 7) Common Fate Objects that point to the same direction are grouped together (Figure 8) Figure 1: Similarity Figure 2: Proximity Figure 3: Continuity https://doi.org/10.15837/ijccc.2023.4.5475 5 Figure 4: Focal Point Figure 5: Common Region Figure 6: Closure https://doi.org/10.15837/ijccc.2023.4.5475 6 low-level definition is concrete and can usually be expressed with a direct algorithm. The presented Gestalt principles forms high-level aesthetic criteria in game scene generation. Despite the fact that Gestalt principles are quite widely applied in areas of interface design, it is quite novel application in the procedural game level generation. High-level aesthetic criteria can expose advantages for mod- ern MCDM technologies, which handle the vague initial information, namely by the application of neutrosophic sets. Neutrosophic sets are used to define and process linguistic or abstract value in- determinism. In the next step, the basic ideas of an extension of the genetic algorithm by MCDM, namely Pythagorean neutrosophic WASPAS, are presented. 3 Modelling of Gestalt Principles for the Incorporation into the Fitness Function Computational creativity framework consists of two steps: developed mathematical model and applied numerical algorithm. The main ideas for the developing of mathematical model of Gestalt principles is outlined below. The goal of this model is to find a way to algorithmically implement abstract visual aesthetic evaluations for the automatic evolution of the functional game level. A set of gestalt principles is usually chosen in the context of the task. Too many rules applied for a small area can usually create a result, with numbed down individual rule exposition, so we can choose the ones that would have highest visibility with our tools environment context. Five gestalt principles were integrated into the model as fitness criteria functions: Similarity, Proximity, Continuity, Focal Points and Common Region. All of the selected principles can be applied in the rectangular matrix of symmetric game objects using focal functions. Some Gestalt principles were skipped because they require more complex object systems and assignable traits for individual objects. The Closure and Figure Ground criteria were skipped, because it requires generation of identifiable structures, which would be broken by other criteria intervention. The Closure criteria uses an unfinished identifiable structure, which cannot be identified if these structures do not exist. Figure Ground might not be Figure 7: Figure Ground Figure 8: Common Fate https://doi.org/10.15837/ijccc.2023.4.5475 7 identifiable visually as separate objects for foreground and background separation or a larger whole because the algorithm generated abstract patterns are not identifiable real-world multicell objects. Another skipped criterion is Common Fate, where objects must have direction vectors, and objects considered in this type of research are symmetrical. In total, 5 principles were implemented, which are compatible with the core generation algorithm and object structure. The mathematical model for each criterion consists of iteration over the whole grid, except for the bounding rows and columns. Each criterion is formulated as a global function in terms of raster algebra. For all five applied Gestalt principles, we apply this procedure: for every cell, we construct a focal function with a square zone (Figure 9). Matrix cell values will represent such situations: 0 – player (starting spot of the player agent), 1 – exit (spot, which should be reached for the player to finish the level), 2 – empty space, 3 – wall (space, which blocks the movement of the player), 4 – enemy (hazardous zone, which player wants to avoid), 5 – collectible (zone, which is favourable for the player to step in). Letter A marks the centre cell in the neighbourhood, and letter B marks the surrounding cells. Indexes i and j indicate the location of the cell in the scene matrix of the game. The general criteria normalisation formula is the same for all modelled Gestalt criteria and can be expressed as a formula (Equation 1). We seek that final value for each criterion would stay between 0 and 1 without getting close to the range edges. We multiply the value by 0.9 to stabilise the neutrosophic algebra. sm = 0.9 tm r ∗ nx ∗ ny (1) Where the members are as follows: s - single-criteria fitness score, r – relevant neighbours (r=8 on all criteria, except continuity criteria, where it is r=1 as it uses a special condition for the score to increase (exactly two identical neighboars)) nx and ny define the size of the matrix grid, t defines the total amount of relevance of the criteria before normalisation and m defines the index of criteria from the Gestalt criteria list. The mathematical models for each considered gestalt principle are presented below: If the object types are identical in the neighbourhood of the cell, the similarity score for each individual cell is increased. After the iteration over each cell is completed, the amount of similar object pairs is divided by the total amount of possible pairs (amount of total matrix cells multiplied by eight). This criterion searches for chunks of similar object areas (Figure 10, Equation 2). t2 = nx−1∑ i=2 ny −1∑ j=2 8∑ k=1 { 1, Bijk = Aij ∨ 2 0, otherwise (2) The proximity criterion has an algorithmic basis similar to the similarity criterion, but one of the pair members can also be identified as an empty space for the score value to increase (Figure 11, Equation 3). This criterion searches islands for similar objects in the area. Figure 9: Cell vision grid https://doi.org/10.15837/ijccc.2023.4.5475 8 Figure 10: Similarity evaluation for a single cell Figure 11: Proximity evaluation for a single cell (number 2 identifies empty space) https://doi.org/10.15837/ijccc.2023.4.5475 9 t2 = nx−1∑ i=2 ny −1∑ j=2 8∑ k=1 { 1, Bijk = Aij ∨ 2 0, otherwise (3) The continuity criterion has two score values for each level of the cycle. The total continuity score calculation works the same as the total score value in other criteria. Focal continuity increases only if the cell with its surrounding satisfies the continuity requirement. For each cell, it is compared to the horizontal and vertical touching cells. We avoid the corner cells because in the smaller grid matrix consisting of squares, it is more difficult to see diagonal continuity as they touch only by a single point, which might break the illusion of continuity (Figure 12). Each cell checks for exactly two touching similar object types. If there are more or less similar touching objects, the cell is not considered continuous (Figure 13, Equation 4). t3 = nx−1∑ i=2 ny −1∑ j=2 { 1, ( 4∑ k=1 { 1, Bij2k = Aij 0, otherwise ) = 2 (4) The Focal Point criterion calculates the total amount of focal point effect. It is achieved by checking how much each cell is surrounded by the continuity of a different object (B is not equal to A). It checks each object and then calculates the amount of its repetitions in the surrounding 8 cells. The highest number of repetitions is used as a cell score. This algorithm searches for identifiable points in the game-level pattern (Figure 14, Equation 5). Figure 12: Continuity evaluation for a single cell. Exactly two out of four neighbouring cells must satisfy the B=A criteria Figure 13: Possible Continuity connections. The lines in the centre cell show which B=A patterns increase continuity https://doi.org/10.15837/ijccc.2023.4.5475 10 t4 = nx−1∑ i=2 ny −1∑ j=2 max l∈[c] 8∑ k=1 { 1, (Bijlk ̸= Aij ) ∧ (Bijlk = Bijl) 0, otherwise (5) c defines the number of possible object types. The final implemented criterion is Common Region, which works in the same manner as Proximity algorithmically, but the searched boundaries are walls instead of empty space (Figure 15, Equation 6) It searches for bounded groups of similar objects in the area. t5 = nx−1∑ i=2 ny −1∑ j=2 8∑ k=1 { 1, Bijk = Aij ∨ 3 0, otherwise (6) Applying the proposed mathematical model of Gestalt principles, we can provide aesthetically ap- pealing game scene design. In the computational realization of creative genetic algorithm we combine these aesthetic criteria of Gestalt principles into fitness function by applying pyhagorian neutrosophic WASPAS extension application on game scene. Then the calculated scores can be used to evolve the game scenes using a genetic algorithm. 4 Game Scene Generation Game scene generation is performed by the proposed genetic Pythagorean neutrosophic WASPAS approach. The proposed mathematical model employs a multitude of different criteria. There are three types of criteria in our model. The first batch of criteria are aesthetic criteria, which include Figure 14: Focal point evaluation for a single cell. B is not equal to A Figure 15: Common region evaluation for a single cell (number 3 identifies walls) https://doi.org/10.15837/ijccc.2023.4.5475 11 Table 2: Full criteria list Criteria Type Value range Similarity (s1), max Aesthetic value (focal function) 0-1 Proximity (s2), max Aesthetic value (focal function) 0-1 Continuity (s3), max Aesthetic value (focal function) 0-1 Focal Point (s4), max Aesthetic value (focal function) 0-1 Common Region (s5), max Aesthetic value (focal function) 0-1 Symmetry (v1), max Aesthetic value (global function) 0-1 Empty space bal- ance (v2), max Aesthetic value (global function) 0-1 Player-exit dis- tance (f1), max More area of game scene is explored by the player 0-1 Safe space (f2), max Key areas do not have hazardous objects nearby 0-1 Player exists (c1), boolean The level is playable 0 or 1 Exit exists (c2), boolean The level is playable 0 or 1 Player-exit path exists (c3), boolean The level is playable 0 or 1 the high level criteria, governed by Gestalt rule derivatives s and low-level criteria v (symmetry and empty space balance). The second batch is the functional criteria f, which optimise the evaluations of the game design, such as the distance between key objects and the safe zones around them. The last batch is constraint criteria c, which always must be true to have non-zero fitness (existence and possible path between player and exit). Having more than one criterion, it is needed to have a strategy to combine multiple criteria into a single fitness value. Some key considerations are how we weight and what algebra we use while combining different criteria – this is a part of fitness function modelling. Most of the examples in literature do not focus on the impact of criteria combination but are centered around how to choose and define individual criterion. Fitness modelling has unexplored room for algorithm effectiveness improvements. The proposed modelling approach of Gestalt principles is incorporated into the genetic algorithm, where the fitness function incorporates all the criteria of mathematical model applying MCDM methods. These methods allow to effectively use many criteria for fitness evaluation. For the evaluation of the generated game level: the criteria and alternative matrix were assembled (Equation 7). X =   S11 S12 . . . S1n S21 S22 S2n ... . . . ... Sm1 Sm2 · · · Smn   (7) Each alternative column Sj is generated with a genetic algorithm and corresponds to a chromosome of the genetically generated population. The complete set of Si for each alternative includes 12 criteria (Table 2). Most evaluated criteria are normalised into the range 0 to 1 and constraint evaluations are binary, if it does not satisfy the required criteria the final result for the chromosome is multiplied by 0. Each criteria value is converted to a Pythagorean neutrosophic set, which has improved correlation compared to a single-valued neutrosophic set [24] A Pythagorean Neutrosophic Set is a mathematical concept that combines the ideas of Pythagorean fuzzy sets and neutrosophic sets. A Pythagorean fuzzy set is a generalisation of fuzzy sets, which assigns three values to each element: membership degree, nonmembership degree, and hesitancy degree. On the other hand, a neutrosophic set is a generalisation of fuzzy sets that deals with uncertain, indeterminate, and inconsistent information. https://doi.org/10.15837/ijccc.2023.4.5475 12 In a Pythagorean neutrosophic set, each element is assigned three values: truth-membership degree, indeterminacy degree, and falsity-membership degree. These values indicate the degree of truth, indeterminacy, and falsity of the element, respectively. The truth-membership degree and falsity- membership degree add up to one, while the indeterminacy degree can take any value between 0 and 1. Pythagorean neutrosophic sets have been used in decision making problems that involve uncertain and inconsistent information, and they have shown promising results in handling such situations [2]. Neutrosophic sets were added to the algorithm, as they increase nondeterminism of the criteria evaluation. They allow us to express information of neutrality and generalise fuzzy and intuitionistic fuzzy sets [29]. An object of the form A, which is a Neutrosophic Pythagorean set on the universe R, consists of dependent Neutrosophic Pythagorean components T and F, as well as an independent component U (Equation 8, Equation 9, Equation 10). A = {< x, TA, UA, FA >: r ∈ R} (8) (TA)2 + (FA)2 ≤ 1 (9) (TA)2 + (UA)2 + (FA)2 ≤ 2 (10) Here, TA(x) is the truth membership, UA(x) is indeterminancy membership and FA(x) is the false membership. Subsequently, the neutrosophic sets are combined with a multi-criteria weighted aggregated sum product assessment method (WASPAS) [22]. A joint generalised criterion is calculated (Equation 11). Qi =  0.5 · n∑ j=1 τij · wj   ⊕  0.5 · n∏ j=1 τij wj⊙ (11) Q is a combined neutrosophic number for one genetically generated alternative. n is the number of criteria; x is a single-criterion fitness score expressed in a neutrosophic number and w is a single- criterion weight. The Pythagorean neutrosophic number is converted to a crisp number by score function(Equation 12): S (Qi) = 3 + 3ξ2 − 2ϑ2 − η2 6 (12) The final WASPAS result is then used as an evaluation score. The algebraic operations are as follows (Equation 13, Equation 14, Equation 15, Equation 16): τ1 ⊕ τ2 = 〈( 1 − ( 1 − ξ21 )( 1 − ξ22 ))1 2 , ϑ1ϑ2, η1η2 〉 (13) τ1 ⊗ τ2 = 〈 ξ1ξ2, ( 1 − ( 1 − ϑ21 )( 1 − ϑ22 ))1 2 , ( 1 − ( 1 − η21 )( 1 − η22 ))1 2 〉 (14) λ · τ1 = 〈( 1 − ( 1 − ξ21 )λ)12 , ϑλ1 , η λ 1 〉 (15) λ ⊙ τ1 = 〈 ξλ1 , ( 1 − ( 1 − ϑ21 )λ)12 , ( 1 − ( 1 − η21 )λ)12 〉 (16) The triplet is called Pythagorean neutrosophic number and lamda is a real number. Each execution of this algorithm usually generates a differing pattern of game object composition as there are many possible fitness points to converge to and that in turn creates creativity through variety. The convergence points are also dependent on the initial values, as the answer is in many cases based on the relative object positions due to focal functions. The Initial layouts of the game scene are initialised with random values and then evolved with a genetic algorithm (Figure 16). The initial https://doi.org/10.15837/ijccc.2023.4.5475 13 population for the genetic algorithm consists of a group of randomly generated levels of the game scene. Genetic operators, such as selection or mutation, are used to remove low scoring levels and create new ones. The scoring for each population member is governed by the MCDM algorithm with game design criteria. In this research, Gestalt principle-based evaluation criteria for aesthetic pattern evolution were proposed, which, in turn, can create novel game object layout patterns. Genetical algorithm loop is repeated with a fixed number of iterations (500 is still safe to have visible results and it usually does not go past 2000 with 10x10 game scene resolution). The functional criteria and restrictions were reused from previous research. Figure 16: Game scene generation 5 Result The Gestalt principle based fitness function was integrated into the genetic WASPAS game scene generator [22] The experiments include a single Gestalt principle addition to the base fitness function and then a combination of all Gestalt principles. For reference and comparison, the generated level without Gestalt principles was provided (Figure 17). Figure 17: Base result without integration of the Gestalt principle Common region criteria enclose the game objects in walls and we can see a generated narrow rooms or corridors. Increasing the presence of this criterion can remove most of the empty space (Figure 18). Focal-point criteria grab a player’s attention to a point that stands out in the environment. We can see that the exit (blue flag) and a few flame assets stand out in relation to the environment (Figure 19). The continuity criterion attempts to generate continuous lines of objects. We can see generated patterns, where building blocks are mostly a combination of lines across the level (Figure 20). The proximity criteria generate isolated islands of objects. We can see two islands of walls and coins generated (Figure 21). Similarity criteria group similar objects together. The generated example splits the room into the 4 regions of different types of objects (Figure 22). https://doi.org/10.15837/ijccc.2023.4.5475 14 Figure 18: Common region result Figure 19: Focal point result Figure 20: Continuity result https://doi.org/10.15837/ijccc.2023.4.5475 15 Figure 21: Proximity criteria Figure 22: Similarity result https://doi.org/10.15837/ijccc.2023.4.5475 16 After inspecting how each criteria is combined into the full level generator, all criteria were com- bined into the fitness function. We can see the patterns of individual Gestalt rules in the result and the difference between three iterations of the same algorithm. The first example shows an area with balanced empty space not many walls and no hazardous objects (Figure 23). The second one has much more walls combined into an “8” pattern (Figure 24). And then the third one creates enclosed space with a coin cluster in the middle with a hidden exit (Figure 25) Figure 23: The result of the combined Gestalt principles 1 Figure 24: The result of the combined Gestalt principles 2 It was noticed that Gestalt principles can form distinguishable patterns in the default 10x10 matrix. A higher matrix with a resolution of 20x20 was tested, and we can still see the pattern formation, but it has a lower high-scale presence, than when resolution is lower and application is based on a small 3x3 matrix focal function (Figure 26). Initially, fitness moves up very quickly and then slows down until it fine-tunes itself. The initial jump takes around 0.5 seconds. The complete evolution takes around 10 seconds to become stagnant, and the fitness value with the proposed criteria goes up to around 0.7 (Figure 27) (it cannot reach 1, as the criteria conflict with each other). Due to more conflicting criteria, the final fitness is lower compared to previous research (0.85 > 0.7) ([22], [23]), but the Gestalt used result has a higher visual value due to the higher presence of visual patterns. The engine was tested with an Intel i9-9980HK 2.4 GHz CPU. 6 Conclusion The proposed Gestalt principle-based fitness function was applied and integrated into the Genetic Pythagorean neutrosophic WASPAS game scene generator. When inspecting the results, it can be seen that coherent and visually appealing patterns were integrated into the final generated game https://doi.org/10.15837/ijccc.2023.4.5475 17 Figure 25: The result of the combined Gestalt principles 3 Figure 26: The combined Gestalt principles result with a 20x20 matrix Figure 27: Example evolution curves with separate iterations of the algorithm https://doi.org/10.15837/ijccc.2023.4.5475 18 scenes. Compared to the originally generated levels, aesthetic evaluation improves in the final scene generations. Usually, modelling abstract criterion to a mathematical model presents a challenge if we want to keep all the information from the rules intact. The mathematical models of Gestalt principles are utilised by automated cell neighbourhood algorithms. Both functional and aesthetic criteria were combined into the final algorithm to keep the original game design rules intact and improve the original game scene generation idea. Following this example, other aesthetic modelling methods could be used to improve the results, but the ratio between rules and amount of generated matrix size can impact the pressesnce of each integrated rule. A large number of rules in a small scene matrix can create chaotic results. Funding This research received no funding. Author contributions The authors contributed equally to this work. Conflict of interest The authors declare no conflict of interest. References [1] Baldwin A.; Dahlskog S.; Font J.M.; Holmberg J. (2017). Mixed-initiative procedural generation of dungeons using game design patterns, IEEE Conference on Computational Intelligence and Games (CIG), 25–32, 2017. [2] Bausys R.; Zavadskas E.K.; Semenas R. (2022). Path selection for the inspection robot by m- generalized q-neutrosophic PROMETHEE approach, Energies, 15(1), 22, 2022. [3] Boden M.A.; Edmonds E.A. (2009). What is generative art?, Digital Creativity, 20(1–2), 21–46, 2009. [4] Braben D.; Bell I. (1984). Elite, Video game. [5] Cao F. (2004). Application of the Gestalt principles to the detection of good continuations and corners in image level lines, Computing and Visualization in Science, 7(1), 3–13, 2004. [6] Carnovalini F.; Rodà A. (2020). Computational creativity and music generation systems: An introduction to the state of the art, Frontiers in Artificial Intelligence, 3, 14, 2020. [7] Celikyilmaz A.; Clark E.; Gao J. (2020). Evaluation of text generation: A survey, arXiv:2006.14799 2020. [8] Chang D.; Nesbitt K.V. (2006). Identifying commonly-used gestalt principles as a design frame- work for multi-sensory displays, IEEE International Conference on Systems, Man and Cybernet- ics, 3, 2452–2457, 2006. [9] Colton, S.; Wiggins, G.A. (2012). Computational creativity: The final frontier?, 20th European Conference on Artificial Intelligence, 12, 21–26, 2012. [10] Cook, M.; Colton, S.; Pease, A.; Llano, M.T. (2019). Framing in computational creativity-a survey and taxonomy, International Conference on Computational Creativity, 156–163, 2019. [11] Earle S.; Snider J.; Fontaine M.C. ; Nikolaidis S. ; Togelius J. (2022). Illuminating diverse neural cellular automata for level generation, Proceedings of the Genetic and Evolutionary Computation Conference, 68-76, 2022. https://doi.org/10.15837/ijccc.2023.4.5475 19 [12] Filip F. G. (2021). Automation and computers and their contribution to human well-being and resilience, Studies in Informatics and Control, 30(4), 5-18, 2021. [13] Giacomello E.; Lanzi P.L.; Loiacono D. (2018). Doom level generation using generative adversarial networks, IEEE Games, Entertainment, Media Conference (GEM), 316-323, 2018. [14] Guzdial M.; Riedl M. (2016). Game level generation from gameplay videos, Artificial Intelligence and Interactive Digital Entertainment Conference, 12(1), 44–50, 2016. [15] Han J.; Forbes H.; Schaefer D. (2021). An exploration of how creativity, functionality, and aes- thetics are related in design, Research in Engineering Design, 32(3), 289–307, 2021. [16] Karth I. (2019). Preliminary poetics of procedural generation in games, Transactions of the Digital Games Research Association, 4(3), 2019. [17] Lin X.; Han S.; Joty S. (2021). Straight to the gradient: Learning to use novel tokens for neural text generation, International Conference on Machine Learning, 6642-6653, 2021. [18] Liu J.; Snodgrass S.; Khalifa A.; Risi S.; Yannakakis G.N.; Togelius J. (2021). Deep learning for procedural content generation, Neural Computing and Applications, 33(1), 19–37, 2021. [19] Ma X.; Deng Y.; Zhang L.; Li Z. (2023). A Novel Generative Image Inpainting Model with Dense Gated Convolutional Network, International journal of computers communications & control, 18(2), 2023. [20] Nesbitt K.V.; Friedrich C. (2002). Applying gestalt principles to animated visualizations of net- work data, Proceedings Sixth International Conference on Information Visualisation, 737–743, 2002. [21] Nyholm O.; Nilsson P. (2017). A Comparison Between Evolutionary and Rule-Based Level Gen- eration, Dissertation, 2017. [22] Petrovas A.; Bausys R. (2022). Procedural video game scene generation by genetic and neutro- sophic WASPAS algorithms, Applied Sciences, 12(2), 772, 2022. [23] Petrovas A.; Bausys R.; Zavadskas E.K.; Smarandache F. (2022). Generation of creative game scene patterns by the neutrosophic genetic CoCoSo method, Studies in informatics and control, 31(4), 5–11, 2022. [24] Radha R.; Mary A.S. A.; Prema R.; Broumi S. (2021). Neutrosophic pythagorean sets with dependent neutrosophic pythagorean components and its improved correlation coefficients, Neu- trosophic Sets and Systems, 46, 77–86, 2021. [25] Ramesh A.; Pavlov M.; Goh G.; Gray S.; Voss C.; Radford A.; ... & Sutskever I. (2021). Zero-shot text-to-image generation, International Conference on Machine Learning, 8821-8831, 2021. [26] Serb A.; Prodromakis T. (2019). A system of different layers of abstraction for artificial intelli- gence, arXiv:1907.10508, 2019. [27] Serpa Y.R.; Rodrigues M.A.F. (2019). Towards machine-learning assisted asset generation for games: a study on pixel art sprite sheets, 18th Brazilian Symposium on Computer Games and Digital Entertainment, 182-191, 2019. [28] Short T.; Adams T. (2017). Procedural Generation in Game Design, CRC Press, 2017. [29] Smarandache F. (1999). A unifying field in Logics: Neutrosophic Logic, In Philosophy, 1–141, 1999. [30] Soleymani S.; Dabouei A.; Kazemi H.; Dawson J.; Nasrabadi N.M. (2018). Multi-level feature abstraction from convolutional neural networks for multimodal biometric identification, 24th In- ternational Conference on Pattern Recognition (ICPR), 3469–3476, 2018. https://doi.org/10.15837/ijccc.2023.4.5475 20 [31] Srinivasan, R.; Uchino,K. (2021). Biases in generative art: A causal look from the lens of art history, Proceedings of the 2021 ACM Conference on Fairness, Accountability, and Transparency, 41–51, 2021. [32] Todorovic D. (2008). Gestalt principles, Scholarpedia, 3(12), 5345, 2008. [33] Torrado R.R; Khalifa A.; Green M.C; Justesen N.; Risi S.; Togelius J. (2020). Bootstrapping conditional gans for video game level generation, IEEE Conference on Games (CoG), 41–48 2020. [34] Walia, C. (2019). A dynamic definition of creativity, Creativity Research Journal, 31(3), 237–247, 2019. [35] Wang H.; Smarandache F.; Zhang Y.; Sunderraman R. (2010). Single valued neutrosophic sets, Infinite Study, 12, 2010. [36] Wertheimer M. (2012). Investigations on Gestalt principles, MIT Press, 127–183, 2012. [37] Wiggins, G.A. (2006). Searching for computational creativity, New Generation Computing, 24, 209–222, 2006. [38] Yu Q.; Yang Y.; Liu F.; Song Y. Z.; Xiang T.; Hospedales T.M. (2017). Sketch-a-net: A deep neural network that beats humans, International journal of computer vision, 122, 411–425, 2017. [39] Zadeh L.A. (1965). Fuzzy sets, Information and Control, 8(3), 338–353, 1965. [40] Zadeh L.A. (1973). Outline of a new approach to the analysis of complex systems and decision processes, IEEE Transactions on Systems, Man, and Cybernetics, 1, 28–44, 1973. [41] Zavadskas E.K.; Turskis Z.; Kildienė S. (2014). State of art surveys of overviews on MCDM/MADM methods, Technological and Economic Development of Economy, 20(1), 165– 179, 2014. Copyright ©2023 by the authors. Licensee Agora University, Oradea, Romania. This is an open access article distributed under the terms and conditions of the Creative Commons Attribution-NonCommercial 4.0 International License. Journal’s webpage: http://univagora.ro/jour/index.php/ijccc/ This journal is a member of, and subscribes to the principles of, the Committee on Publication Ethics (COPE). https://publicationethics.org/members/international-journal-computers-communications-and-control Cite this paper as: Petrovas, A.; Bausys, R.; Zavadskas, E. K. (2021). Gestalt Principles Governed Fitness Function for Genetic Pythagorean Neutrosophic WASPAS Game Scene Generation, International Journal of Computers Communications & Control, 18(4), 5475, 2023. https://doi.org/10.15837/ijccc.2023.4.5475 Introduction Gestalt principles Modelling of Gestalt Principles for the Incorporation into the Fitness Function Game Scene Generation Result Conclusion