# Enhancing Recognition Memory in Virtual Memory Palaces Using Worlds-in-Miniature
## Appendix A How to Implement a Virtual Memory Palace
### Procedural Generation of Memory Palaces  
Our virtual world was based on a flat plane, capable of accommodating rooms of various sizes in a grid. Larger rooms were placed first and smaller rooms were placed later in empty spaces to prevent overcrowding and maintain a minimum gap. Each room was connected to its adjacent room via a path. Regarding the rooms and paths as the nodes and edges, the entire world could be effectively encoded as a graph structure. Applying the [PERSON]'s Minimum Spanning Tree algorithm to this graph ensured that all rooms were linked to form a connected component. Finally, each cell in the grid was represented in 3D, with walls and open passages constructed accordingly. This process is explained in detail below (see Figure 11). Figure 11: Procedural generation process of a virtual memory palace. Tiles colored red and blue are rooms and paths, respectively. Line segments colored light green and dark green are all possible rays to be added to a graph and some intersected rays among those to be removed, respectively, in the search process. First, to simplify and expedite the creation process of the world, we limited it to a single-level, flat plane without elevation. The world was represented as a two-dimensional \(N\times N\) grid, which we referred to as the _tile map_. Each tile in the tile map was assigned one of three attributes: _Room_ (representing a room), _Path_ (representing a path), or _None_ (representing an empty space). The minimum size of each tile was \(1\times 1\), corresponding to approximately 4 m per side in real-world dimensions. This size was chosen to ensure collision safety and allow free movement within the physical space used for the experiment. Depending on the room's area and the placement of objects, the size could be adjusted flexibly. Room sizes ranged from \(1\times 1\) to \(M\times M\), where \(M\) must be significantly smaller than \(N\) to ensure sufficient space for additional rooms and paths. In our experiment, \(M\) was limited to 20% of \(N\), which was determined in order to provide a balance between spatial diversity and efficient use of the available tile map, based on several trial simulations conducted during the experiment design process. Second, the list of rooms was sorted in descending order of size, determining which room was created first. The position of each room was assigned a random index between 0 and \(N-1\). The first room could be placed anywhere on the tile map. However, for subsequent rooms, the placement had to consider the existing rooms. If a collision occurred due to the position or size of a newly placed room, the placement process was repeated until no collisions occur. Additionally, to prevent rooms from directly touching each other, a minimum gap around each tile was maintained on the tile map (see Figure 11a). The third step involved generating paths to connect the rooms. Rays were cast from the center of each room to all other rooms (Figure 11b). Each ray was associated with its starting and ending room. Among these rays, any ray that intersected a room other than its starting or ending room was removed (Figure 11c,d). Once all rooms and rays were connected, the result formed a graph structure (Figure 11e). In this graph, each room acted as a node, and each ray served as an edge. To ensure all rooms were connected, the [PERSON]'s Minimum Spanning Tree algorithm was applied to the graph (Figure 11f). After connecting all rooms, the rays were rasterized onto the tile map (Figure 11g). This process involved iterating through all tiles and converting tiles intersected by rays into paths (Figure 11h). In our virtual memory palace, images for memorization could be placed and arranged according to the experimental requirements. A single-unit room was able to display a maximum of four images, determined by the number of walls that allowed for image placement. However, to reduce visual density, we limited the number of images to half the available walls.