Programmatically generating rooms and buildings for memory palaces

Hello! I’m new to the forums and relatively new to SketchUp. My interest is in using SketchUp for personal use for memory learning purposes. If you haven’t heard of the method of loci, also referred to as a memory palace, you may be interested in reading more here.

Many people use real-world structures as a basis for their memory palaces, upon which they superimpose vivid images in their minds. It is also possible to create totally artificial memory palaces, such as the sketch in the upper-left of the illustration further down on this page, which is the concept of an early 19th century mnemonist Gregor von Feinaigle. There are 50 locations in the room starting with number 1 in the back-left corner of the floor and number 50 in the middle of the ceiling.

The advantage of an artificial memory palace like this is that it has the potential to be highly organized and infinitely expandable. The difficulty is that it can be harder to visualize than a real-world memory palace that a person already knows well, such as their home.

For this reason I would like to use 3D modeling software like SketchUp to create very large memory palaces that can then be further customized with colors, pictures and 3D warehouse objects.

The vision I have involves using nested iterations of the 50-location Feinaigle box. So just like each box or room can have up to 50 locations in it, each of those rooms in turn can be arranged in a box with up to 50 locations, which can again be arranged in an even larger box, etc. I think some pictures will help explain, so in this illustration (as a new user I can only post one image) you’ll see the Feinaigle numbering format, a couple of renderings of such a room in SketchUp consisting of 50 10’ x 10’ square locations, and finally in the lower-right corner a larger arrangement of these rooms in Feinaigle order.

Memory Palaces

You may notice that some of the rooms are missing portions of their walls. That is because I intend to give each room only as many locations as are required. Many of the rooms will need less than 50 locations and thus will only look like partial rooms, or in some cases just part of a floor.

Using this layout I want to turn any text such as a book, an article, a manual, etc. into a memory palace. So in effect the resulting memory palace will be like a giant 3D e-reader. You know how you often remember reading something in a book and it was in the lower-right hand corner of the page but you don’t remember which page it’s on? That’s because your brain automatically assigned that bit of information to the location of the page, but there’s too many pages with text in nearly the same location. But if all that text was spread out over a series of surfaces in 3D space, and you even made some attempt to visualize what you were reading, there would be a lot higher likelihood that you would remember where to go back and find that information. This is memory palace theory that I have proven to work very well for myself but I’ll let you draw your own conclusion.

Now that I’ve explained the general concept of what I’m trying to accomplish I will try to describe what I’d like to be able to do programatically:

The user will take the text they wish to learn (book, article, notes, etc; In my case I will use the Bible) and break it up into many lines of text. Each new line will represent a piece of information that they want to assign to a location in a room. In my case each new line will be a verse of the Bible. Then when there is a new line called “Chapter” or something like this can be an indication that a new room of locations should be created. All of these rooms or book chapters will be oriented like the Feinaigle box as in the illustration above and constitute a complete book. A new line in the text called “Book” or something like this can indicate that everything past that point should be placed in a new book or collection of rooms. All such books will be oriented in 3D space like a Feinaigle box as well.

For my primary use of these memory rooms as an aid in studying the Bible it will be comprised of two “super” palaces that go even one level above the orientation of books–one on the left comprised of 39 books of the Old Testament and one on the right comprised of 27 books of the New Testament.

To review, the heirarchy of levels I need is:
Categories of Old and New Testament (“super” palaces)
Books (as pictured in the last illustration above)
Chapters (the rooms)
Verses (each location in the rooms)

In order for this to be a 3D e-reader of sorts (and to not have to go back and forth between a document of the text and the SketchUp model) I want to graphically attach each line of text to its location. I’ve deliberated about where the text should be exactly and I think it may be best to put the line of text on all 5 visible faces on the inside of each location box. That way the words (a verse in my case) can be read from nearly any angle, and if I choose to place a picture or 3D object in the box at least one of the faces will still be readable.

So besides using the spreadsheet or CSV file of separated text (like this one for my project) to determine the structure of the memory palace, the script will also need to place the lines of text on each location in some fashion. I assume some kind of 2D text would be best, and likely in the form of an image.

There is other functionality I would dream about adding to this automation such as chapters (rooms) and books that are themed by color for better differentiation. But the two things I’ve described above–creating the structure and placing lines of text on every location–are the must-haves.

If you made it this far in reading, thank you for your patience and interest. I have very little programming experience but I understand some of the basic concepts and I’m willing to learn.

How feasible is the project I’m describing? Can this be done with a Ruby script with SketchUp? What would be the best route to take to accomplish the goals? Any thoughts on this appreciated. Also if anyone has a more keen interest in collaboration I’m open to this possibility as well. Thanks in advance for your help.

I’m no expert on memory palaces but isn’t the point of the palace that each room is unique and distinguishable? I’m thinking that rooms generated to a strict pattern might be difficult to differ from each other in memory. Perhaps a manually drawn palace would be more effective.

Hi @eneroth3 and thanks for your reply The question you raise regarding uniqueness and distinguishability is very valid and a point to which I’ve given considerable thought. For nearly two years I’ve been using a more standard approach to memory palaces: I pick some houses that I’m familiar with and create a journey through the rooms. Each room represents a chapter in which I then painstakingly assign 20 or 40 or 60 or more nooks and crannies to verse numbers. Then I begin the process of visualizing the verse content at each location, and after some reviews the images lock in.

I’ve done enough of these houses and rooms to know that the memory palace technique works quite well and is worth investing time in. I’ve also come to see how tedious the process is to get dozens of loci out of one room. Then the need to review where those loci are so nothing gets skipped over when remembering. Then after having done that work, I still don’t know which location is verse number 18 or 38. So I add objects that represent numbers (such as a golf club for number 18) to some of those locations as reference points. The verse numbers are never in consistent locations from room to room, because the journey of locations has to be more spread out if there are lots of verses and more condensed if there are few.

In time I’ve come to realize that the primary aspects of a room that I use to distinguish it from other rooms mentally is also repetitive. Another door, another closet, another piece of trim, another window, another nightstand, another bed. Showers, sinks, toilets, ovens, refrigerators, chairs, and on and on. 9 out of 10 rooms in a traditional house I would use are a simple rectangle of 4 walls of similar height distinguishable visually only by some textures and shapes, and otherwise to some degree by my associated memories of smell, sound and touch.

By automatically generating an artificial memory palace as I’ve suggested, there will be a huge time savings in not having to create journeys and assign locations and remember numbers (because the numbers are in consistent locations). If there are more than 50 locations needed per room, another room is simply added on and the standard numbering continues from 51.

When first generated, rooms of the artificial palace will indeed look similar, yet already distinguishable in two ways: their distinct locations relative to each other in 3D space, and their unique number of locations that will make for some rooms of 4 walls, 1 wall or even just part of a floor.

Then the user-customization begins. For me this will be highly based upon the content of the chapter designated to the particular room. Is the overall mood dark or light? Change the colors and textures to match. Are the events taking place in a forest or by a river? Add some trees or a water feature. Is there a very prominent visual image in the chapter? Create that image first at its appropriate location and then use that vivid image as a reference point.

In this way the box-like rooms of the artificial memory palace that are not unlike the simple rectangular rooms of standard houses are transformed into unique realms with a specific look and feel based on the actual content of the chapter. I have no problem adding doors and windows and refrigerators here and there as are in a real house, but I think that won’t be necessary, because instead of the anchor imagery being somewhat random it can actually have meaning based on the content of the text.

Finally there’s a fail-safe tool if there still remains any issue in distinguishing rooms of the memory palace: a person/object peg system for numbers. Most people who do some kind of memory training develop a personalized system of images that represent the numbers 00-99 or even 000-999. If one of these images is selected to represent the chapter number and another image is selected to represent a book name, then two images can be combined in some unique interaction in the middle of a chapter room. This then acts as a peg to which the user can associate any information in the room.

I’d be interested in collaborating with you. It seems doable unless I’m missing something. I am not sure on the specifics but it seems to me like I wouldn’t have a problem accomplishing what you’ve asked.

A couple questions:

  1. How are you planning on supplying the data needed to place each of the rooms in the correct spot in relation to other rooms?

  2. When you say location what exactly are you referring to? How much variability will there be? Can each location in each room be a different color? Will they all be shaped the same? Sized the same?

  3. If I’m understanding what you’re saying the amount of locations varies between rooms. How are you thinking about supplying both the positioning and number of locations?

I have more questions but it’s very probable I’m misunderstanding things so I’ll wait for a response before I ask any more.

Hi @gnebster Thanks for your interest! First of all I’m thrilled to hear that you think this seems doable and would be interested in working on it. If the end of all this could result in some kind of plugin freely available for anyone to generate a memory palace in SketchUp it would be well worthwhile. There are some online communities of people interested in memory such as this one who would also be interested in a development like this.

As I mentioned in my previous posts, the proposed SketchUp palace could be used to learn just about any large text or subject matter that would be correctly formatted ahead of time on separate lines of a computer text document, interspersed with lines of text that signify to the script when to start a new room or arrangement of rooms.

For my first memory palace I’ll be doing the Bible. I’ll use the King James Version for now since it’s the classic of Bible versions and is in the public domain. But instead of coding the script in terms of verses, chapters, books and testaments which would be specific to only the Bible, I would prefer to use some more universal terminology such as Class 1, Class 2, Class 3 and Class 4. I don’t think anyone would want to go much higher than Class 4 in terms of size, but theoretically it would be possible and I think it could be coded as such.

To review, the terminology could be:
Class 1 → The smallest box (which currently has dimensions of 10’ x 10’ x 3’ with 6" walls) which I have sometimes referred to as a ‘location’ or a ‘locus’ (plural ‘loci’). The entire structure is composed of these Class 1 boxes. For the Bible project each Class 1 will contain a single verse.
Class 2 → The arrangement of Class 1 boxes in Feinaigle order. I have sometimes referred to these as ‘rooms’. Feinaigle order is illustrated in the upper-left corner sketch of the image in the first post, showing 1-9 on the floor, turn to the left and look up to see 10 on the ceiling followed by 11-19 on the left wall, turn straight forward to see 20 on the ceiling followed by 20-29 on the back wall, etc., etc. ending with 50 in the middle of the ceiling. So if all 50 Class 1 boxes are needed there will still be 4 empty spaces in the ‘ceiling’. For the Bible project each Class 2 arrangement will represent a chapter.
Class 3 → The arrangement of Class 2 arrangements in Feinaigle order. For the Bible project there will be a total of 66 of these Class 3’s each representing a book of the Bible.
Class 4 → The arrangement of Class 3 arrangements in Feinaigle order. For the Bible project there will only be 2 Class 4’s: An Old Testament on the left comprised of 39 Class 3’s and a New Testament on the right comprised of 27 Class 3’s.

The most consistent numbers I’ve found online are that there are a total of 31,102 verses in the KJV Bible and 1,189 chapters. This means the Bible memory palace will have 31,102 Class 1 boxes that are arranged in 1,189 Class 2’s, arranged in 66 Class 3’s and a total of 2 Class 4’s. Thus many Feinaigle ‘boxes’ are nested inside of many other Feinaigle ‘boxes’, though I say ‘boxes’ in quotes because many of the arrangements won’t look like boxes they will just be following the rules of Feinaigle number order.

It was surprisingly difficult to find statistics on the web for how many verses there are per chapter of the KJV Bible. One popular website details statistics for a much more obscure translation that has different numbers of chapters and verses. Anyway I found one post on a site of a chart with statistics, but lots of the numbers were incorrect. I found this out by comparing total number of verse statistics with other sites and I had to make a lot of adjustments to get the numbers to come out even. So even though I can’t guarantee that the number of verses in each chapter is 100% correct in this spreadsheet link, it should be very close. However this won’t be needed to generate the palaces, read on…

To answer your question #1, the data will be supplied from a version of this guy’s spreadsheet manipulated into a text document (or whatever you think would be best) where every new line of text is another verse (Class 1 box). I will then intersperse new lines of text with “Class” and the number to signify to the script that it should start another arrangement of Class 2, Class 3, etc. Hence I don’t think the spreadsheet of Bible stats I shared above will be necessary, but just useful as a reference, since the actual number of Class 1, 2, 3 and 4’s will be determined by the pre-formatted text document.

As I mentioned in the terminology section ‘location’ can now be referred to as a Class 1 box if that makes sufficient sense. My aim is to make this as simple as possible to begin with so every Class 1 box can be identically shaped and sized.

In the illustrations in the first post I have the Class 1 boxes touching each other. As I think on it more it may actually be better to have about 6 to 12" of space between every Class 1 box simply for the sake of making it easier to peak inside a room (Class 2) from the outside and zoom into a room without getting stuck in a wall.

Coloring is very optional at this point but will be a necessary part of a fully-customized memory palace so if it’s possible to color-coordinate complete Class 2’s or Class 3’s according to some kind of sensible coloring scheme that would make it a lot more visually appealing from the start. Individual Class 1 boxes could also be colored programmatically but it would have to be more subtle and not a rainbow of colors all in one room as that could be dizzying.

Yes, the number of Class 1 boxes varies for every Class 2 room. Again, position and quantity of the Class 1’s will be entirely dependent on the content of the pre-formatted text document. Just as an example–not in any coding language–the text document might start out like:

Class4 Old Testament
Class3 Genesis
Class2 Genesis 1
Class1 IN the beginning God created the heaven and the earth.
Class1 And the earth was without form, and void; and darkness was upon the face of the deep. And the Spirit of God moved upon the face of the waters.
Class1 And God said, Let there be light: and there was light.

The first instance of the words Class4 establishes that the remainder of that line will be the title of the Class 4 arrangement. The first instance of Class3 and Class2 likewise. Then the next 3 lines of text contain one verse a piece (there might be some word wrap on the forum here), each preceded by Class1.

The next line after this chapter would be “Class2 Genesis 2” followed by all the verses of that chapter. When it reaches the book of Exodus there will be a “Class3 Exodus” and a “Class2 Exodus 1” line followed by all the verses of Exodus 1. Class4 will only appear a total of two times in the entire document.

So if every Class 2 arrangement had a complete set of 50 Class 1’s and every Class 3 had a complete set of 50 Class 2’s, and so on, every structure would be touching each other, or have about 6-12" of buffer space as I suggested earlier, for the sake of zooming in more easily.

However, since many of these Classes of structures will have less than 50 in their arrangement and thus will look incomplete, it will still be necessary to maintain the appropriate amount of empty space between structures as if the missing structures were still there. This will ensure that a Class 2 that only has a few Class 1’s in it won’t get jammed up against something else, but will rather look somewhat solitary and thus be a visual cue for the user that there is not as much information in this area.

I should also mention what happens when there are more than 50 in a Feinaigle arrangement. I think Mr. Feinaigle himself originally envisioned additional Feinaigle rooms ascending vertically, but that wouldn’t always be physically possible in these nested Feinaigle arrangements. Thus the second or third or fourth, etc. Feinaigle room that may be needed to complete a section of information should be placed toward the outside of the first 1-50 numbering. For example, the first chapter that has more than 50 verses in it is Genesis 24. So on the back ‘wall’ of the Class 3 Genesis arrangement in the left-middle section there will be the Class 2 Genesis 24 entity. The remaining 17 verses (there are a total of 67) of that chapter should go in a second Class 2 entity behind the first one, because that would be toward the outside. The numbering in these secondary rooms continue as with the first, but starting with 51.

The largest Class 3 entity in the Bible will be the book of Psalms which has 150 chapters, which will require 2 additional arrangements in addition to the first one. And the largest Class 2 entity will be Psalm 119 which has 176 verses and thus will require 3 additional Class 2-type entities behind the first one.

A part of the design that I’m still not settled on is how to attach the words of the verse to each Class 1 box. This may be dependent on what is actually possible… editable text or an image of text? If I was just doing a palace of words only I would say just simply but the words on the inside square face of the Class 1 boxes. But part of the idea of having a memory palace in SketchUp is to be able to, over the course of time, add images and 3D objects. The inside square face of the Class 1 boxes is a perfect place to put an image, but that then covers up the verse text. This is why I thought to put the verse text on all 5 inside faces of the box, but that might look too overwhelming.

At this point I’m thinking a good compromise might be to have the verse text in large lettering across the large square inside face of each Class 1 box, and just a second time in smaller lettering across the top inside face of the box. This way if an image is placed on the large inside square face (which I intend to do for many of them), the text on the top face is still visible. Or maybe there is a way to hide that secondary text unless it is actually needed and then it can be unhid. You will probably have some thoughts on this.

Edit: Modified Class numbering

Oops I didn’t get to finish that post before I accidentally sent it.
Basically there could be a problem with scale. I’d have to do some testing.

edit: I’m at work so I’ll have to get back to you. Maybe someone else could offer insight into models of this scale and how they perform.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.