Control method of electronic device, electronic device, and computer program for choosing optimal passageway connecting multiple rooms to generate procedural map in three-dimensional space

KR103025761B1Active Publication Date: 2026-09-29FOUND OF SOONGSIL UNIV IND COOP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
KR1020240124224
Authority / Receiving Office
KR · KR
Patent Type
Patents
Current Assignee / Owner
Filing Date
2024-09-11
Publication Date
2026-09-29
Estimated Expiration
2044-09-11

Smart Images

  • Figure 112024100233818-PAT00002_ABST
    Figure 112024100233818-PAT00002_ABST
Patent Text Reader

Abstract

A method of operation of an electronic device for selecting an optimal edge connecting multiple rooms generated in three dimensions to generate a procedural map is disclosed. The method of operation of the electronic device according to the present disclosure includes the steps of: generating multiple edges connecting points corresponding to each of the multiple rooms generated according to map generation data; selecting at least one set of edges including edges that constitute a tetrahedron among the multiple edges that do not include points of other edges; and selecting a target set of edges composed of target edges that connect all points corresponding to each of the multiple rooms at a minimum cost based on the cost according to the length of each edge included in the edge set.
Need to check novelty before this filing date? Find Prior Art

Description

Technology Field

[0001] The present disclosure relates to a method of operation of an electronic device for selecting an optimal edge to generate a procedural map in three-dimensional space, and more specifically, to a method of control of an electronic device for selecting an optimal edge among a plurality of edges connecting points corresponding to each of a plurality of rooms generated based on map generation data. Background Technology

[0002] The video game Rogue, released in 1980, introduced a game system called procedural map generation. While games of the time offered consumers static gameplay, Rogue gained sensational popularity by introducing randomness through procedural map generation algorithms, providing gamers with a fresh experience. Since then, as the Rogue-Like genre was created and developed inspired by Rogue, the procedural map generation algorithms that characterize Rogue-Like games have also evolved in various ways.

[0003] 'Procedural map generation' refers to the creation of objects, such as maps or environmental elements, using algorithmic methods.

[0004] Games providing procedural map generation that emerged after Rogue have been used only in 2D spaces for the past 30 years, so they have evolved into simple algorithms that do not consider height and depth. However, with the advancement of 3D space technology, the sandbox genre has succeeded in generating procedural maps in 3D spaces by applying the Perlin Noise algorithm. Subsequently, the roguelike genre is also continuing to attempt to extend procedural map generation algorithms to 3D. Prior art literature

[0005] Registered Patent Publication No. 10-2272815 The problem to be solved

[0006] The purpose of the present disclosure is to provide an electronic device for selecting an optimal edge to create a three-dimensional passage in which points corresponding to a plurality of rooms are connected to each other in order to procedurally generate a map in three-dimensional space.

[0007] The purposes of the present disclosure are not limited to those mentioned above, and other purposes and advantages of the present disclosure not mentioned may be understood from the following description and will be more clearly understood from the embodiments of the present disclosure. Furthermore, it will be readily apparent that the purposes and advantages of the present disclosure can be realized by the means and combinations thereof set forth in the claims. means of solving the problem

[0008] A method of operation of an electronic device for selecting an optimal edge connecting a plurality of rooms generated in three dimensions to generate a procedural map according to one embodiment of the present disclosure comprises: generating a plurality of edges connecting points corresponding to each of the plurality of rooms generated according to map generation data; selecting at least one set of edges including edges that constitute a tetrahedron among the plurality of edges that do not include points of other edges; and selecting a set of target edges composed of target edges that connect all points corresponding to each of the plurality of rooms at a minimum cost based on the cost according to the length of each edge included in the set of edges.

[0009] At this time, the step of selecting the set of edges can generate multiple tetrahedrons by dividing all points corresponding to each of the multiple rooms such that no other points other than those constituting the tetrahedron are included within the circumscribed sphere of the tetrahedron, and can identify the edges constituting each of the generated multiple tetrahedrons among the multiple edges.

[0010] Meanwhile, the step of selecting the target edge set may include the step of calculating the cost as the sum of a first cost according to the length of the first direction, a second cost according to the length of the second direction, and a third cost according to the length of the third direction for each edge included in the edge set.

[0011] In this case, the step of calculating the cost may include the step of obtaining the first cost by applying a first weight to the length component of the first direction of each edge included in the edge set, the step of obtaining the second cost by applying a second weight to the length component of the second direction of each edge included in the edge set, and the step of obtaining the third cost by applying a third weight to the length component of the third direction of each edge included in the edge set, wherein the third weight may be a value greater than the first weight and the second weight.

[0012] Alternatively, the step of selecting the target edge set may include: setting the priority of each of the multiple edges in order of lowest cost for each edge included in the edge set; selecting the edge with the highest priority among the multiple edges; determining whether a circular path circulating at least some of the points corresponding to each of the multiple rooms is generated as the selected edge is added, and identifying the selected edge as the target edge only if the circular path is not generated; and repeating the process of selecting another edge among the multiple edges according to the priority and identifying it as the target edge until the target edge is identified by a threshold number, wherein the threshold number may be a value one less than the number of the generated multiple rooms.

[0013] Here, the step of identifying the selected edge as the target edge may involve setting multiple groups for each point corresponding to each of the multiple rooms, and if the groups of each of the two points connected by the selected edge are identified as being different groups, it may be determined that the selected edge does not generate the circular path, and as the selected edge is identified as the target edge, the group formed by merging the groups of each of the two points connected by the selected edge into one may be set as the group of each of the two points, and if the groups of each of the two points connected by the selected edge are identified as being the same group, it may be determined that the selected edge generates the circular path.

[0014] An electronic device for selecting optimal edges connecting multiple rooms generated in three dimensions to generate a procedural map according to one embodiment of the present disclosure includes a memory comprising instructions for generating multiple rooms according to map generation data and generating multiple edges connecting points corresponding to each of the generated multiple rooms, and a processor comprising at least one edge set including edges constituting a tetrahedron that does not include points of other edges among the multiple edges, and selecting a target edge set composed of target edges connecting all points corresponding to each of the multiple rooms at minimum cost based on the cost according to the length of each edge included in the selected edge set.

[0015] The present disclosure includes a non-transient computer-readable medium storing at least one instruction that is executed by a processor of an electronic device to cause said electronic device to perform the method of operation of said electronic device described above. Effects of the invention

[0016] The present disclosure can effectively identify the most economical edge among the edges connecting multiple rooms in the process of creating a virtual space to which a procedural generation technique in three-dimensional space is applied. Brief explanation of the drawing

[0017] FIG. 1 is a drawing for explaining the configuration of an electronic device, FIG. 2 is a flowchart for explaining the operation of an electronic device, FIG. 3 is a drawing for explaining map generation data according to one embodiment of the present disclosure, FIG. 4 is a flowchart illustrating the operation of an electronic device according to one embodiment of the present disclosure, which identifies the cost of an edge based on the sum of costs by direction and identifies a target edge based on the identified cost by edge. FIG. 5 is an algorithm for explaining the operation of an electronic device according to one embodiment of the present disclosure identifying a set of target edges connecting all points corresponding to each of a plurality of rooms, FIG. 6 is a diagram illustrating the overall operation of an electronic device according to one embodiment of the present disclosure generating rough data for generating a procedural map. Specific details for implementing the invention

[0018] Before specifically describing the present disclosure, the method of description in the specification and drawings is described.

[0019] First, the terms used in this specification and claims have been selected based on general terms considering their functions in the various embodiments of this disclosure. However, these terms may vary depending on the intent of those skilled in the art, legal or technical interpretations, and the emergence of new technologies. Additionally, some terms have been arbitrarily selected by the applicant. Such terms may be interpreted according to the meanings defined in this specification; in the absence of specific definitions, they may be interpreted based on the overall content of this specification and common technical knowledge in the relevant field.

[0020] In addition, the same reference numbers or symbols described in each drawing attached to this specification represent parts or components that perform substantially the same function. For convenience of explanation and understanding, the same reference numbers or symbols are used to describe different embodiments. That is, even if components having the same reference number are all depicted in multiple drawings, the multiple drawings do not imply a single embodiment.

[0021] Additionally, in this specification and claims, terms including ordinal numbers, such as "first," "second," etc., may be used to distinguish between components. These ordinal numbers are used to distinguish identical or similar components from one another, and the meaning of the terms should not be limited by the use of such ordinal numbers. For example, the order of use or arrangement of components combined with such ordinal numbers should not be restricted by the number. If necessary, each ordinal number may be used interchangeably.

[0022] In this specification, singular expressions include plural expressions unless the context clearly indicates otherwise. In this application, terms such as "comprising" or "consisting of" are intended to specify the existence of the features, numbers, steps, actions, components, parts, or combinations thereof described in the specification, and should be understood as not precluding the existence or addition of one or more other features, numbers, steps, actions, components, parts, or combinations thereof.

[0023] In the embodiments of the present disclosure, terms such as "module," "unit," "part," etc. are used to refer to a component that performs at least one function or operation, and such component may be implemented in hardware or software, or in a combination of hardware and software. Additionally, a plurality of "modules," "units," "parts," etc. may be integrated into at least one module or chip and implemented as at least one processor, except where each needs to be implemented in specific individual hardware.

[0024] Furthermore, in the embodiments of the present disclosure, when a part is described as being connected to another part, this includes not only a direct connection but also an indirect connection through another medium. Additionally, the meaning that a part includes a certain component implies that, unless specifically stated otherwise, it does not exclude other components but may include additional components.

[0025] Hereinafter, various embodiments of the present disclosure will be described in detail with reference to the attached drawings.

[0026] Figure 1 is a diagram illustrating the configuration of an electronic device.

[0027] The electronic device (100) is configured to generate rough data consisting of grid data for rooms created at random locations within a specific target space corresponding to the entire three-dimensional map based on items set according to user input, and grid data for passages and stairs connecting each of the rooms. The user can complete the map by setting asset data, etc., on the rough data generated from the electronic device (100).

[0028] In particular, the electronic device (100) can be implemented to identify the most economical line between multiple rooms in order to generate grid data for passages and stairs connecting each room to each other.

[0029] Here, according to FIG. 1, the electronic device (100) may include memory (110) and a processor (120).

[0030] The memory (110) is configured to store at least one instruction or data related to an operating system (OS) for controlling the overall operation of the components of the electronic device (100) and the components of the electronic device.

[0031] The memory (110) may include non-volatile memory such as ROM or flash memory, and may include volatile memory such as DRAM. Additionally, the memory (110) may include at least one storage medium capable of storing data permanently or semi-permanently, such as a flash memory device, a hard disk drive (HDD), a solid state drive (SSD), a DVD, or a laser disc.

[0032] The memory (110) may include map generation data containing parameter information, and at least one instruction for generating a three-dimensional target space according to the map generation data.

[0033] A processor (120) is configured to control the electronic device (100) overall. Specifically, the processor (120) can perform operations according to various embodiments of the present disclosure by being connected to memory (110) and executing at least one instruction stored in memory (110).

[0034] For example, the processor (120) can control one or any combination of other components of the electronic device (100) and can perform operations or data processing related to communication.

[0035] When a method according to one embodiment of the present disclosure includes a plurality of operations, the plurality of operations may be performed by a single processor or by a plurality of processors. For example, when a first operation, a second operation, and a third operation are performed by a method according to one embodiment, the first operation, the second operation, and the third operation may all be performed by a first processor, or the first operation and the second operation may be performed by a first processor (e.g., a general-purpose processor) and the third operation may be performed by a second processor (e.g., an artificial intelligence dedicated processor).

[0036] The processor may be implemented as a single-core processor comprising one core, or as one or more multicore processors comprising multiple cores (e.g., homogeneous multicore or heterogeneous multicore). When the processor is implemented as a multicore processor, each of the multiple cores included in the multicore processor may include internal processor memory such as on-chip memory, and a common cache shared by the multiple cores may be included in the multicore processor. Additionally, each of the multiple cores included in the multicore processor (or some of the multiple cores) may independently read and execute program instructions for implementing the method according to one embodiment of the present disclosure, or all (or some) of the multiple cores may be linked together to read and execute program instructions for implementing the method according to one embodiment of the present disclosure.

[0037] In this case, if the method according to one embodiment of the present disclosure includes a plurality of operations, the plurality of operations may be performed by one of the plurality of cores included in a multi-core processor, or may be performed by a plurality of cores. For example, when a first operation, a second operation, and a third operation are performed by the method according to one embodiment, the first operation, the second operation, and the third operation may all be performed by a first core included in a multi-core processor, or the first operation and the second operation may be performed by a first core included in a multi-core processor and the third operation may be performed by a second core included in a multi-core processor.

[0038] The processor (120) may include a general-purpose processor such as a CPU, AP, DSP (Digital Signal Processor), a graphics-dedicated processor such as a GPU, VPU (Vision Processing Unit), or an artificial intelligence-dedicated processor such as an NPU. An artificial intelligence-dedicated processor may be designed with a hardware structure specialized for training or utilizing a specific artificial intelligence model.

[0039] Additionally, although not illustrated in FIG. 1, the electronic device (100) may include a communication unit or a user input unit for receiving user input.

[0040] The communication unit is a configuration for the electronic device (100) to communicate with an external device, such as a user terminal or an external server. The communication unit may include circuits, modules, chips, etc., for performing communication using various wired or wireless communication methods. The communication unit may also be connected to external devices, such as servers, through various networks.

[0041] Depending on the area or scale, a network may be a Personal Area Network (PAN), Local Area Network (LAN), Wide Area Network (WAN), etc., and depending on the openness of the network, it may be an Intranet, Extranet, or Internet, etc.

[0042] The communication unit can be connected to external devices through various wireless communication methods such as LTE (long-term evolution), LTE-A (LTE Advance), 5G (5th Generation) mobile communication, CDMA (code division multiple access), WCDMA (wideband CDMA), UMTS (universal mobile telecommunications system), WiBro (Wireless Broadband), GSM (Global System for Mobile Communications), DMA (Time Division Multiple Access), WiFi (Wi-Fi), WiFi Direct, Bluetooth, BLE (Bluetooth Low Energy), NFC (near field communication), Zigbee, and LoRa.

[0043] In addition, the communication unit may be connected to external devices via wired communication methods such as Ethernet, optical networks, USB (Universal Serial Bus), and Thunderbolt.

[0044] In addition, the communication department may be configured to utilize various newly devised communication methods / technologies in the future.

[0045] In addition, the communication unit is not limited to performing a communication connection in a single manner, but can perform communication connections in multiple ways, such as wireless and wired methods.

[0046] The electronic device (100) according to the present disclosure receives user input for setting a target space from a user terminal through a communication unit, and can create a target space according to the set user input and provide it to the user terminal.

[0047] The user input unit is configured for the processor to receive at least one user input described above from the user, and can receive various commands or information from the user.

[0048] Accordingly, the user input section may be implemented with at least one button, touchpad, touchscreen, microphone, etc. Additionally, the electronic device (100) may be connected to various user input devices (e.g., keyboard, mouse, etc.) equipped with at least one keypad, button, motion sensor, etc.

[0049] Alternatively, the electronic device (100) may be connected to a separate device that includes one or more user input units.

[0050] In this case, a separate device may correspond to a user terminal, and the user terminal may be connected to the electronic device (100) wirelessly or via a wired connection to output an image, video, or GUI according to a signal provided from the electronic device (100), and may also receive user input from the user and provide it to the electronic device (100).

[0051] Figure 2 is a flowchart illustrating the operation of an electronic device.

[0052] Referring to FIG. 2, the electronic device (100) can generate multiple edges connecting points corresponding to each of the multiple rooms generated based on map generation data (S210).

[0053] Specifically, the electronic device (100) can generate grid data to specify a target space and a plurality of rooms based on map generation data.

[0054] Map generation data corresponds to a set of parameters required to generate a three-dimensional target space. In this case, the map generation data can be set by a user, and the target space can be generated by setting at least one parameter included in the map generation data. For example, the map generation data may include a three-dimensional parameter for defining the size of the target space, two parameters (minimum value, maximum value) for defining the number of three-dimensional rooms randomly generated within the target space, and a parameter for the minimum distance of the generated rooms.

[0055] In this regard, FIG. 3 is a drawing for explaining map generation data according to one embodiment of the present disclosure.

[0056] As illustrated in FIG. 3, the map generation data may include a parameter (: Map Size) for setting the size for each coordinate by direction constituting the target space, a parameter (: Min Room Size, Max Room Size) for setting the size for each coordinate by direction of each of the multiple rooms included in the target space, a parameter (: Min Room Count, Max Room Count) for setting the number of multiple rooms included in the target space, and a parameter (: Room Margin) for setting the minimum distance between the multiple rooms.

[0057] The coordinates for each direction may consist of a first direction, a second direction, and a third direction. For example, the first direction may correspond to the horizontal direction (e.g., x-coordinate direction) in a three-dimensional coordinate system, and the second direction may correspond to the depth direction (e.g., z-coordinate direction) in a three-dimensional coordinate system. As with the first and second directions, the third direction may correspond to the vertical direction (e.g., y-coordinate direction) in a three-dimensional coordinate system.

[0058] Through map generation data, the electronic device (100) can generate multiple rooms that randomly configure the target space within conditions satisfying the input parameters.

[0059] Grid data is a concept necessary to represent the components of a target space. Each of the multiple rooms constituting the three-dimensional target space may correspond to a single grid data, or structures such as passageways connecting multiple rooms or stairs due to height differences between multiple rooms may correspond to grid data. In this case, the grid data may include the distance from a reference point in the three-dimensional coordinate system (e.g., the starting point of the room), the size of the grid data (e.g., the size of the room), and the range of the grid data (e.g., the range of the room).

[0060] In this case, the grid data may be composed of the sum of multiple unit grid data. The unit grid data may correspond to grid data in the form of a cube of a specific size, for example, with a length of 1 each for the first, second, and third directions in a 3D coordinate system. That is, if the size of a specific room created within the target space is 10x15x5, the grid data may be composed of the sum of 750 unit grid data.

[0061] According to various embodiments of the present disclosure, the electronic device (100) may compare the size of the target space generated through map generation data with the minimum size of the space including all of the generated plurality of rooms.

[0062] In this case, if the space for including all of the generated multiple rooms is significantly lower than the target space, the electronic device (100) can generate multiple rooms again.

[0063] Specifically, the electronic device (100) can obtain the minimum length of the space for including all of the multiple rooms in each direction based on the coordinates of the first direction, the second direction, and the third direction of each of the multiple rooms. That is, for the first direction, the difference between the coordinates of the room closest to the origin and the coordinates of the room farthest from the origin may correspond to the first minimum length, and the same applies to the second minimum length in the second direction and the third minimum length in the third direction.

[0064] Afterwards, the electronic device (100) can calculate the size of the minimum space to include all of the multiple rooms as the product of the first minimum length, the second minimum length, and the third minimum length.

[0065] And, if the size of the calculated minimum space is less than the threshold ratio relative to the size of the target space, the electronic device (100) can identify that multiple rooms need to be regenerated.

[0066] At this time, when the electronic device (100) regenerates multiple rooms, it may add a pre-set value for each direction to the minimum distance between multiple rooms that is previously set through map generation data. That is, if the size of the minimum space containing all multiple rooms is significantly lower than the size of the target space (: less than the threshold ratio), the multiple rooms are relatively densely packed, so the electronic device (100) can increase the minimum distance between multiple rooms to cause the multiple rooms to be regenerated in a dispersed manner.

[0067] When grid data is generated for each of the multiple rooms constituting the target space, the electronic device (100) can generate multiple edges to connect each point corresponding to the multiple rooms to each other.

[0068] Specifically, the coordinates corresponding to the center of gravity of each of the multiple rooms may correspond to a point representing the room. And, the electronic device (100) can generate multiple edges connecting each point for the multiple rooms to another point (= center of gravity corresponding to another room).

[0069] In other words, assuming that 7 rooms are generated in the target space, each of the multiple rooms can generate 6 edges connecting itself to 6 other rooms, and multiple edges can be generated for all rooms by excluding duplicate edges. In this case, the number of edges generated in the target space with 7 rooms will be 21.

[0070] Here, the electronic device (100) can set an edge set that includes at least one edge among the generated multiple edges (S220).

[0071] Specifically, generating grid data for all multiple edges of a target space means that the possibility of the grid data for each edge colliding with or overlapping with other grid data increases. Therefore, the electronic device (100) can generate grid data for only the edges corresponding to the optimal path for generating a target space in three dimensions, without implementing all edges as corridors. In this case, among the multiple edges, the edges corresponding to the optimal path can be identified according to several criteria.

[0072] First, the edge corresponding to the optimal path may be an edge that does not interfere with grid data corresponding to other structures in the target area. That is, the optimal path refers to a path that does not overlap or collide with other grid data for each of the rooms, corridors, and stairs.

[0073] Secondly, the edge corresponding to the optimal path may be an edge that minimizes the generation of grid data that matches the stairs in terms of structure. Specifically, to prevent grid data from overlapping, specific grid data must be removed or the location of grid data must be changed.

[0074] However, since rooms are essential elements for implementing the target space and are randomly generated through map generation data, it is impossible to change the grid data for the rooms.

[0075] On the other hand, stairs themselves increase the difficulty and create an inefficient structure when generating grid data for edges. This is due to the volume and characteristics of stairs. For example, grid data corresponding to a corridor does not consider height differences, so there is relatively less potential for collision with other grid data. That is, an edge between rooms separated by a distance of 7 in a straight line, rather than stairs, can be implemented as a corridor composed of 7 unit grid data, and collisions between grid data can be resolved by creating a simple detour path with other grid data.

[0076] However, the grid data corresponding to the stairs corresponds to the most complex structure with a size of 1X2X4 due to the characteristics of its structure, and since it is based on a difference in height, selecting an edge that requires the minimum existence of stairs may correspond to an edge corresponding to the optimal path.

[0077] Finally, every room must be connected to at least one other room via an edge. A room without an edge implies that it is an isolated room without a passageway connecting it to another room, in which case there is no benefit in creating that room. Therefore, every room must be connected to another room via at least one edge.

[0078] At this time, in order to select an edge of the optimal path among a plurality of edges according to the above-described criteria, the electronic device (100) can select an edge based on the Delaunay triangulation algorithm.

[0079] The Delaunay triangulation algorithm is a method of dividing arbitrary points into the form of triangles, wherein the division is performed such that the minimum value of the interior angles of each divided triangle is maximized. For example, while there may be various methods for dividing multiple points into triangles depending on the shape of the triangle, the Delaunay triangulation method divides the space such that the triangles formed by the multiple points are as close as possible to equilateral triangles.

[0080] The Delaunay triangulation algorithm has several features, one of which is that the circumcircle of any divided triangle does not contain points from other triangles, except for the points that constitute that triangle. In other words, a triangle formed by Delaunay triangulation cannot have a different point at its center.

[0081] The present disclosure can extend this to three dimensions to establish optimal edges. Specifically, the electronic device (100) divides a plurality of points into a tetrahedral shape (four points) rather than a triangle. At this time, each point of the plurality of rooms may correspond to each point of the tetrahedron divided according to the three-dimensional Delaunay triangulation, and the line connecting each point constituting the tetrahedron may correspond to an edge of the optimal path.

[0082] The electronic device (100) according to this can generate multiple tetrahedrons that satisfy the Delaunay triangulation algorithm extended to three dimensions, with multiple points as vertices of the tetrahedron, in order to identify the optimal edge among multiple edges.

[0083] Specifically, the electronic device (100) can create a tetrahedron by dividing points corresponding to each of a plurality of rooms so as not to include other points, excluding the points constituting the tetrahedron within the circumscribed sphere of the tetrahedron.

[0084] In one embodiment, the electronic device (100) may set up a virtual tetrahedron that includes all points corresponding to each of the plurality of rooms. Then, the electronic device (100) may select any one of the plurality of points as a first point and create at least one first tetrahedron that includes the first point.

[0085] And, the electronic device (100) can select a new second point and regenerate at least one second tetrahedron that generates the second point. Here, if the second tetrahedron is located within the circumscribed sphere of the first tetrahedron, the first tetrahedron is removed because it is a tetrahedron that does not satisfy the conditions of Delaunay triangulation. And, a new tetrahedron can be generated in the space from which the first tetrahedron was removed. Accordingly, the electronic device (100) can select a new point (third point) or reconstruct the tetrahedron using the already selected points.

[0086] The electronic device (100) can generate multiple tetrahedrons that divide all points by repeating the above-described operation until a tetrahedron is generated for all points.

[0087] And, the electronic device (100) can identify the edges constituting each of the generated tetrahedrons among the multiple edges as edges constituting the edge set.

[0088] In conclusion, the electronic device (100) can identify edges that constitute a tetrahedron that does not include points of other edges among all multiple edges as edges of the optimal path, and can set the set of such edges as an edge set.

[0089] Here, the edge set consists of edges connecting relatively close vertices, characterized by the absence of overlapping or intersecting edges. This is a result of applying the principle that, according to the Delaunay triangulation, no room location exists within the tetrahedron. From a heuristic perspective, this characteristic of the edge set implies that passageways do not intersect each other, rooms are connected to relatively close rooms, and there are no collisions when connecting each room. In other words, the edge set consists of optimal paths for connecting multiple rooms that were randomly generated based on the map generation data.

[0090] And, the electronic device (100) can select a target edge set composed of target edges based on the cost according to the length of each edge included in the edge set (S230).

[0091] Specifically, the electronic device (100) can identify a path that connects all points corresponding to each of a plurality of rooms at the minimum cost. In this case, since the sum of the costs (: cost) increases as the sum of the lengths of the edges increases, the electronic device (100) can select the edges with the lowest cost according to the length of each edge among the edges included in the edge set as a candidate group for the target edge, which is one of the edges constituting the path. For example, the edge set identified by partitioning according to a tetrahedron may include three edges for each room. Here, the electronic device (100) can select the edge with the minimum cost among the plurality of edges as the target edge.

[0092] And, the electronic device (100) can select the path as a set of target edges. In this case, since the path connecting multiple rooms at minimum cost consists of edges where the sum of the costs of the edges is minimized, the edges connecting each of the multiple rooms have a high probability of being straight lines. That is, it means that there is only one optimal path from one room to another, which means that the map generated through the processing of the target space moves only along a specific path (target edge).

[0093] At this time, the electronic device (100) can calculate the cost of each edge included in the edge set by direction and calculate the sum of the calculated costs by direction.

[0094] Figure 4 is a flowchart illustrating the operation of an electronic device (100) according to one embodiment of the present disclosure, which identifies the cost of an edge according to the sum of the costs by direction and identifies a target edge according to the identified cost by edge.

[0095] As illustrated in FIG. 4, the electronic device (100) can obtain a first cost according to the length component of the first direction of each of the edges included in the edge set (S410).

[0096] And, the electronic device (100) can obtain a second cost according to the second direction length component of each of the edges included in the edge set (S420).

[0097] Additionally, the electronic device (100) can obtain a third cost according to the length component of the third direction of each of the edges included in the edge set (S430).

[0098] In this case, the difference between the horizontal direction components of the three-dimensional coordinates of each of the two points may correspond to the length component of the first direction, the difference between the depth direction components of the three-dimensional coordinates of each of the two points may correspond to the length component of the second direction, and the difference between the vertical direction components of the three-dimensional coordinates of each of the two points may correspond to the length component of the third direction.

[0099] And, the electronic device (100) can identify the target edge based on the sum of the first cost, the second cost, and the third cost (S440). That is, the electronic device (100) can calculate the sum of the first to third costs of each edge as the cost of the corresponding edge, and identifies the target edge based on the calculated cost.

[0100] For convenience of explanation, the operation of the electronic device (100) for calculating the cost of the line in FIG. 4 is described as having steps S410, S420, and S430 performed sequentially, but it is not limited thereto. That is, the electronic device (100) is not limited to operations such as calculating the second cost after calculating the first cost as shown in FIG. 4, and may calculate the first cost, the second cost, and the third cost simultaneously.

[0101] Meanwhile, each of the first cost, second cost, and third cost may be a value that reflects the length component of the first direction, the length component of the second direction, and the length component of the third direction as they are, but the electronic device (100) may obtain the first cost to the third cost by applying weights to the length components of each direction (first direction, second direction, third direction).

[0102] Specifically, the electronic device (100) can obtain a first cost by applying a first weight to a length component in a first direction, obtain a second cost by applying a second weight to a length component in a second direction, and likewise obtain a third cost by applying a third weight to a length component in a third direction.

[0103] And, the electronic device (100) can calculate the sum of the first cost, the second cost, and the third cost as the cost of each edge.

[0104] At this time, the first weight, the second weight, and the third weight may correspond to weights of different values. Here, the third weight corresponding to the vertical direction may correspond to a value greater than the first weight and the second weight.

[0105] This reflects the fact that, in order to minimize the generation of grid data corresponding to the steps, it is necessary to select edges that minimize the steps. According to this, for the number of steps to be minimized, edges with the minimum cost of the vertical component must be selected as target edges. For example, the first and second weights can be set to a specific value a, and the third weight can be set to 10a. Accordingly, since the third direction yields a cost value 10 times greater than other directions for the same change, it increases the probability that edges with the minimum change in the third direction among multiple edges will be selected as target edges.

[0106] This is a method to reduce the number of stairs in itself, and reducing the number of stairs offers the advantage of lowering the complexity of the corridor generation process from the perspective of map creation.

[0107] In another embodiment, the electronic device (100) may calculate a third cost by changing the value of a third weight according to the size of the third direction component of the edges included in the edge set.

[0108] Specifically, the electronic device (100) can identify the largest maximum value of the third direction length component among a plurality of third direction length components for each edge included in the edge set. At this time, if the identified maximum value is less than a preset length, the electronic device (100) can set a third-1 weight for the third direction weight, and if it is greater than or equal to the preset length, it can set a third-2 weight. At this time, the third-2 weight corresponds to a value greater than the third-1 weight.

[0109] This takes into account that if the length of the edges in the vertical direction included in the edge set is sufficiently small, only a relatively small number of steps will be generated even if the weight for the vertical component is not set to a large value, and is intended to prevent the electronic device (100) in the corresponding embodiment from calculating the cost of edges with lengths in other directions (first direction and second direction) that are longer than necessary at a low value.

[0110] Meanwhile, based on the cost calculated according to the method described above, the electronic device (100) can select a set of target edges that select multiple edges as target edges.

[0111] In this regard, FIG. 5 is an algorithm for describing the operation of an electronic device according to one embodiment of the present disclosure identifying a set of target edges connecting all points corresponding to each of a plurality of rooms.

[0112] Referring to FIG. 5, the electronic device (100) can set the priority of each of the multiple edges in order of the lowest cost of each edge included in the edge set (S510).

[0113] And, the electronic device (100) can select the edge with the highest priority among multiple edges (S520).

[0114] Afterwards, the electronic device (100) can determine whether a circular path is created when the selected edge is added as a target edge (S530).

[0115] A circular path is a path that circles at least some of the points corresponding to each of the multiple rooms. For example, a combination of edges AB, BC, and CA can be a circular path that circles points ABC.

[0116] According to the explanation above, a cycle means that the sum of the costs of the target edges does not become the minimum. In other words, if a cycle exists that circles at least some of the points, removing one of the edges forming the cycle can still keep all points connected. In this case, since the total cost is reduced by the cost of the removed edge, a path containing a cycle always has a higher cost than the minimum path that connects all points.

[0117] Accordingly, the electronic device (100) determines whether a circular path is created as the selected edge is added, and if no circular path is created (S530 - N), the selected edge can be identified as a target edge (S540). The operation of the electronic device (100) identifying the selected edge as a target edge can be repeated until a threshold number of target edges are identified.

[0118] Specifically, when a selected edge is identified as a target edge, the electronic device (100) can determine whether the target edge has been identified in a threshold number (S550). Here, if the target edge has not been identified in a threshold number (S550 - N), the electronic device (100) can select another edge according to priority (S560).

[0119] That is, when a selected edge is identified as a target edge, the electronic device (100) can repeat the operation of determining whether a circular path is created as a result of adding the selected edge by newly selecting an edge of the next rank after the selected edge under the condition that the target edge is not identified by a threshold number of times.

[0120] Alternatively, if a circular path is created when a selected edge is added in the above-described step S530 (S530 - Y), the electronic device (100) may repeat the above-described operation by selecting another edge according to priority instead of identifying the edge as the target edge (S560).

[0121] And, when the electronic device (100) identifies a threshold number of target edges (S550 - Y), it can identify a set of target edges composed of the identified target edges (S570).

[0122] At this time, the electronic device (100) can determine whether a circular path is created by comparing a group of two points connected along an edge.

[0123] Specifically, the electronic device (100) can set independent groups for each of a plurality of points, each including the point itself. In this case, the electronic device (100) can compare the groups set for each of the two points connected according to the selected edge. As a result of the comparison, if the groups of the two points correspond to different groups, the electronic device (100) can identify the selected edge as a target edge that does not generate a circular path.

[0124] If the selected edge is identified as a target edge that does not generate a circular path, the electronic device (100) can update the group of each of the two points connected by the selected edge. Specifically, the electronic device (100) can merge the group of each of the two points to create a single group and set the created single group as the group of each of the two points.

[0125] Alternatively, the electronic device (100) may determine that the selected edge creates a circular path if it identifies that the groups of each of the two points connected by the selected edge are the same group.

[0126] For example, let us assume an embodiment in which, for points A, B, and C, the AB edge is first identified as the target edge, and the BC edge is additionally identified as the target edge.

[0127] In this case, as the AB edge is identified as the target edge, the electronic device can compare the {A, B} group (=group at point B), which is formed by merging the {A} and {B} groups, with the {C} group (=group at point C). Subsequently, as the BC edge is also identified as the target edge, the electronic device can set the respective groups at points A, B, and C as the same group {A, B, C}.

[0128] Here, when an AC edge is newly selected according to the priority of each of the multiple edges, the group {A, B, C} at point A and the group {A, B, C} at point C are the same group, so the electronic device (100) can identify that a circular path is created when an AC edge is added.

[0129] In short, it is possible to identify target edges constituting a set of target edges by repeating, according to priority, the operation of merging the group of two points connected by the selected edge and identifying the selected edge as a target edge that does not generate a circular path if the group of two points connected by the selected edge does not match, or the operation of identifying the selected edge as a target edge that generates a circular path if the group of two points connected by the selected edge matches, whenever a new edge is selected.

[0130] Here, the critical number may be a value one less than the total number of points corresponding to each of the multiple rooms, rather than a specific value.

[0131] This is because, by definition, an edge corresponds to a path connecting two points, so the minimum number of edges required to connect all points is one less than the total number of points. For example, the minimum number of edges required to connect all three points A, B, and C can be a combination of two edges, such as the combination of edges AB and BC, the combination of edges AC and AB, or the combination of edges AC and BC.

[0132] When a set of target edges is identified according to the above-described process, the electronic device (100) may additionally select at least one edge as a target edge, excluding the edge identified as a target edge among the edges constituting the set of edges.

[0133] This means that since the set of target edges selected according to the aforementioned process consists solely of target edges that are the optimal edges for visiting each point, there is only one path from a specific point to another, thereby limiting the number of cases where multiple rooms are visited. In this case, the selection of additional target edges has the characteristic that a circular path circling a specific room is generated. For example, assume that there exist paths from Room A to Room B, from Room B to Room C, and from Room B to Room D. In this case, the minimum path from Room A to Room C can be established through only the single path A -> B -> C.

[0134] Here, the path from room C to room D and the path from room A to room D can be selected as the additional target edges described above.

[0135] Accordingly, the minimum path from room A to room C can include not only the path A -> B -> C but also the path A -> D -> C.

[0136] Furthermore, regarding the cycle path from A through C back to A, the minimum path would have been limited to the path A -> B -> C -> B -> A if no additional target edges were selected. This is merely the reverse addition of the path from C to A. However, if additional target edges are selected, the path A -> B -> C -> D -> A can be newly identified.

[0137] That is, the electronic device (100) first selects a set of target edges, which is a set of target edges connecting all points at minimum cost, and then additionally selects an edge that creates a circular path as a target edge, thereby setting a cost-optimal path connecting multiple points while also creating at least one circular path, so as to prevent the number of cases of visiting multiple rooms from becoming monotonous.

[0138] At this time, the number of edges added as target edges can be set through user input that sets parameter values ​​included in the map generation data.

[0139] Specifically, in the embodiment of FIG. 3, the map generation data may include parameter information (: Extra Edges) regarding the number of edges additionally selected as target edges. As shown in FIG. 3, when the electronic device (100) inputs 2 as the parameter setting value, it may additionally select 2 edges as target edges, excluding the edge selected as a target edge among the edges constituting the edge set.

[0140] Here, the electronic device (100) can additionally select target edges based on the cost of each edge included in the edge set. At this time, the electronic device (100) can add edges as target edges in order of their cost being closest to the median value among the edges included in the edge set. That is, unlike the existing target edges selected based on the order of the edges with the minimum cost, the electronic device (100) can identify the median value between the smallest cost and the largest cost among the costs of each of the remaining edges excluding the edge selected as a target edge among the edges included in the edge set, and add edges having the smallest difference from the identified median value as target edges in order.

[0141] For example, if the number of edges additionally selected as target edges according to the parameter setting value is 3, the electronic device (100) can additionally select 3 edges as target edges in the order of edges corresponding to costs that differ less from the median value.

[0142] This reflects the fact that, considering the cost of a target edge ultimately corresponds to the length of the passageway connecting rooms during the map generation process, adding excessively long passageways (high cost) can lead to inefficient space utilization in the overall map layout, potentially making the map unnecessarily complex. Alternatively, regarding excessively short passageways (low cost), even if a circular path is generated, the difference from the existing optimal target edge is not significant; consequently, contrary to the original intent of generating circular paths for path diversity, the practical benefit may not be substantial.

[0143] Accordingly, the electronic device (100) can generate a circular path by additionally selecting an edge close to the cost of the intermediate value as a target edge in priority.

[0144] And, the electronic device (100) can generate grid data for at least one of the corridors and stairs that match the identified target line.

[0145] Specifically, the electronic device (100) can perform a path search to find an optimal path to generate grid data for a corridor where the target edge connects rooms to each other or grid data for a staircase to connect rooms to each other. And, depending on the path search result, the electronic device (100) can generate grid data composed of multiple unit grid data for the corridor and / or staircase constituting the edge.

[0146] Here, the electronic device (100) can generate grid data for a corridor or stairs through three-dimensional coordinates constituting a target edge and three-dimensional coordinates constituting each of a plurality of rooms.

[0147] Specifically, grid data for the hallway connecting each room may correspond to grid data where the outer surfaces of each room are connected to each other, rather than between the centroids of the rooms.

[0148] In this case, for connecting each of the multiple rooms, the electronic device (100) can identify coordinates of a third direction corresponding to the floor portion of the multiple rooms, and grid data of the hallway can be generated to connect the rooms to each other based on the identified coordinates.

[0149] To this end, the electronic device (100) can perform path exploration of corridors and stairs connecting multiple rooms through an algorithm that additionally incorporates the process of exploring whether grid data corresponding to stairs can be placed in the A* algorithm, which is known to be effective for path exploration.

[0150] In conclusion, the electronic device (100) can generate grid data based on both the three-dimensional coordinates of the target edge and the three-dimensional coordinates of the room, with the coordinates of the outer surface of the room as the starting point and the coordinates of the outer surface of the target room as the destination point.

[0151] And, the electronic device (100) can obtain rough data for a three-dimensional target space including at least one grid data for a corridor and a staircase corresponding to a target edge, and grid data for each of the aforementioned plurality of rooms by repeating path search related to a target edge.

[0152] FIG. 6 is a diagram illustrating the overall operation of an electronic device according to one embodiment of the present disclosure generating rough data for generating a procedural map.

[0153] As illustrated in FIG. 6, the electronic device (100) can first generate grid data specifying a three-dimensional target space and a plurality of rooms included in the target space (Figs. 6-a, 6-b). Then, the electronic device (100) can generate edges connecting each of the generated plurality of rooms (Fig. 6-c). In this case, the generated edges may correspond to a plurality of edges constituting a tetrahedron that does not include points of other edges, based on the three-dimensional Delaunay triangulation method as previously described. Then, the electronic device (100) can select a target edge from among the plurality of edges based on a cost according to length (Fig. 6-d).

[0154] And, the electronic device (100) can add at least some of the edges among the multiple edges as target edges according to the number set in the parameters of the map generation data (Fig. 6-e).

[0155] As the target edge is added, it can be confirmed that at least one circular path is generated that circles some of the multiple rooms, compared to the existing path where the target edge connects the minimum number of rooms.

[0156] When the addition of target lines is completed, the electronic device (100) can acquire rough data including grid data of at least one of the corridors and stairs that match the target lines, and grid data of multiple rooms (Fig. 6-f).

[0157] Meanwhile, the various embodiments described above may be implemented by combining two or more embodiments, provided that they do not conflict or contradict each other.

[0158] Meanwhile, the various embodiments described above may be implemented in a recording medium readable by a computer or a similar device using software, hardware, or a combination thereof.

[0159] According to hardware implementation, the embodiments described in this disclosure may be implemented using at least one of ASICs (Application Specific Integrated Circuits), DSPs (digital signal processors), DSPDs (digital signal processing devices), PLDs (programmable logic devices), FPGAs (field programmable gate arrays), processors, controllers, microcontrollers, microprocessors, and other electrical units for performing functions.

[0160] In some cases, the embodiments described herein may be implemented as the processor itself. In a software implementation, embodiments such as the procedures and functions described herein may be implemented as separate software modules. Each of the aforementioned software modules may perform one or more functions and operations described herein.

[0161] Meanwhile, computer instructions or computer programs for performing processing operations in electronic devices, such as robots and servers, according to the various embodiments of the present disclosure described above, may be stored on a non-transitory computer-readable medium. When such computer instructions or computer programs stored on the non-transitory computer-readable medium are executed by the processor of a specific device, the specific device described above performs the processing operations in the electronic device according to the various embodiments described above.

[0162] A non-transient computer-readable medium refers to a medium that stores data semi-permanently and can be read by a device, unlike media that store data for a short period of time such as registers, caches, and memory. Specific examples of non-transient computer-readable media include CDs, DVDs, hard disks, Blu-ray discs, USBs, memory cards, and ROMs.

[0163] Although preferred embodiments of the present disclosure have been illustrated and described above, the present disclosure is not limited to the specific embodiments described above. It is understood that various modifications can be made by those skilled in the art without departing from the essence of the present disclosure as claimed in the claims, and such modifications should not be understood individually from the technical spirit or perspective of the present disclosure. Explanation of the symbols

[0164] 100: Electronic device 110: Memory 120: Processor

Claims

Claim 1 A method of operation of an electronic device for selecting an optimal edge connecting multiple rooms generated in three dimensions to generate a procedural map, comprising: a step of generating multiple edges connecting points corresponding to each of the multiple rooms generated according to map generation data; and a step of selecting at least one set of edges including edges constituting a tetrahedron that does not include points of other edges among the multiple edges. The method comprises the step of selecting a target edge set composed of target edges that connect all points corresponding to each of the plurality of rooms at minimum cost, based on the cost according to the length of each edge included in the edge set; wherein the step of selecting the target edge set comprises the step of calculating the cost as the sum of a first cost according to the length of a first direction, a second cost according to the length of a second direction, and a third cost according to the length of a third direction for each edge included in the edge set; and the step of calculating the cost comprises the step of obtaining the first cost by applying a first weight to the length component of the first direction for each edge included in the edge set; and the step of obtaining the second cost by applying a second weight to the length component of the second direction for each edge included in the edge set. A method of operation of an electronic device comprising: a step of obtaining a third cost by applying a third weight to the length component of the third direction of each edge included in the set of edges; wherein the third weight is a value greater than the first weight and the second weight; and wherein the step of obtaining the third cost comprises: a step of identifying the largest maximum value of the length component of the third direction among a plurality of length components of the third direction for each edge included in the set of edges; and a step of setting a third-1 weight for the weight of the third direction if the identified maximum value is less than a preset length, and setting a third-2 weight that is a value greater than the third-1 weight if the identified maximum value is greater than or equal to the preset length. Claim 2 A method of operation of an electronic device according to claim 1, wherein the step of selecting the set of edges comprises dividing all points corresponding to each of the plurality of rooms such that no other points other than those constituting the tetrahedron are included within the circumscribed sphere of the tetrahedron, thereby generating a plurality of tetrahedrons, and identifying the edges constituting each of the generated plurality of tetrahedrons among the plurality of edges. Claim 3 delete Claim 4 delete Claim 5 A method of operation of an electronic device according to claim 1, wherein the step of selecting the set of target edges comprises: a step of setting the priority of each of a plurality of edges in order of lowest cost of each edge included in the set of edges; a step of selecting the edge with the highest priority among the plurality of edges; a step of determining whether a circular path circulating around at least some of the points corresponding to each of the plurality of rooms is generated as the selected edge is added, and identifying the selected edge as the target edge only if the circular path is not generated; and a step of repeating the selection of another edge among the plurality of edges according to the priority and identifying it as the target edge until the target edge is identified by a threshold number; wherein the threshold number is a value one smaller than the number of generated plurality of rooms. Claim 6 A method of operation of an electronic device according to claim 5, wherein the step of identifying the selected edge as the target edge comprises setting a plurality of groups for each point corresponding to each of the plurality of rooms, comparing the groups of each of the two points connected by the selected edge and determining that the selected edge does not generate the circular path if they are identified as different groups, and as the selected edge is identified as the target edge, setting a group formed by merging the groups of each of the two points connected by the selected edge into one as the group of each of the two points, and determining that the selected edge generates the circular path if they are identified as the same group by comparing the groups of each of the two points connected by the selected edge. Claim 7 An electronic device for selecting optimal edges connecting multiple rooms generated in three dimensions to generate a procedural map, comprising: a memory including instructions for generating multiple rooms according to map generation data and generating multiple edges connecting points corresponding to each of the generated multiple rooms; a processor including at least one edge set comprising edges constituting a tetrahedron that does not include points of other edges among the multiple edges, and selecting a target edge set composed of target edges that connect all points corresponding to each of the multiple rooms at minimum cost based on a cost according to the length of each edge included in the selected edge set; wherein the processor calculates the cost as the sum of a first cost according to the length of a first direction, a second cost according to the length of a second direction, and a third cost according to the length of a third direction for each edge included in the edge set; and wherein the processor obtains the first cost by applying a first weight to the length component of the first direction for each edge included in the edge set, and applies a second weight to the length component of the second direction for each edge included in the edge set An electronic device comprising: obtaining the second cost by applying the above; obtaining the third cost by applying a third weight to the length component of the third direction of each edge included in the edge set; wherein the third weight is a value greater than the first weight and the second weight; wherein the processor identifies the largest maximum value of the length component of the third direction among a plurality of length components of the third direction for each edge included in the edge set; if the identified maximum value is less than a preset length, a third-1 weight is set for the weight of the third direction; and if the identified maximum value is greater than or equal to the preset length, a third-2 weight is set, which is a value greater than the third-1 weight. Claim 8 A non-transient computer-readable medium storing at least one instruction that is executed by a processor of an electronic device to cause the electronic device to perform the method of operation of claim 1.