My Games

Sunday, April 30, 2023

Maximum Recursion Depth... in 3D!!! (Proof of Concept)

While I did not design the algorithm, I've been playing around with the StereoscoPy open source codebase to create anaglyph 3D images. I've talked about my interest in anaglyph 3D before with my Positive and Negative Planes Concept so it was fun to do this. I actually bought red and cyan glasses to try this out (you can find them pretty cheap online).

The results are by no means perfect, but short of designing it from scratch with anaglyph 3D in mind, the fact that it works at all and I can more or less automate it is pretty cool.

How does Anaglyph 3D Work?
Anaglyph 3D takes two images offset from each other, like imagine a photo of a scene, and a subsequent photo taken from a foot to the left, or something like that. It then aligns and merges the images, and color codes them, most frequently with red and cyan. Then, when wearing red and cyan lenses, the respective colors are filtered from one eye or the other, such that your eyes receive competing information that makes it appear 3D.

Tbf since I did not code the algorithm myself, this is a bit of a weak sauce explanation, this is among the reasons why I prefer to do things from scratch like with my Genetic Algorithm that Learns the Konami Code, but for now this is fine.

Anyway, after installing that StereoscoPy module, and after experimenting with several different parameters, I used the following command to generate an anaglyph 3D version of the MRD Cover:
  StereoscoPy -A -S 20 0 -a ./MRD_Cover.jpg ./MRD_Cover.jpg
Rather than using two images, I just used the one cover, but offset it to the left (-S 10), and used their auto-alignment algorithm (-A).

In addition to installing this module with the auto-align optional dependencies, I did also have to install some linux packages for this to work, and only was able to figure that out by tracing some errors and googling around, so it's not as user-friendly as it could be. Perhaps I could submit a PR to make it more user friendly, in lieu of writing it from scratch...

Maximum Recursion Depth in 3D!!!
Reminder that this requires red and cyan glasses.

Anaglyph 3D conversion

JPG of original cover

Sunday, April 23, 2023

Appendix-N for a "Weird & Wonderful" Animist Setting I haven't Written Yet: Pariah by way of Maximum Recursion Depth(?)

I've been slowly conceiving of a "Weird & Wonderful" Animist setting, percolating over the last couple years or so at least. I've probably posted other versions of this idea that I'm forgetting, or at least there are other ideas I've posted about that feed into this. It's probably reductive to solely refer to it as an Animist setting, but I don't know how else to do so that isn't rooted in or going to provoke preconceived notions that I don't mean to provoke, that was the best I could think to do.

In it's current shape it's not connected to the shared setting of Maximum Recursion Depth Vol. 1 and MRDVol. 2 directly, but I see it as spiritually connected. Whereas MRD Vol. 1 uses as a metaphor Buddhism and the satire of Journey to the West, and MRD Vol. 2 uses as a metaphor Judaism and my thoughts on Jewish American Identity, this is more so inspired by Animism and Humanism from paleolithic, neolithic, and indigenous cultures both historically and in modern times (acknowledging modern indigenous cultures are not "living museums"). But just as with MRD Vol. 1 and 2, spinning those metaphors into something distinctly and unambiguously my own. I don't want to hew too closely to any specific belief or culture, because I don't want to misrepresent them (I'm already worried about some of my terminology and explanations here, but hopefully the intent comes through) nor risk appropriating them. They are inspirations in a distilled sense, and if you've read anything I've written before, hopefully this is all clear. Anyway... 

The single-sentence pitch might be: Pariah by way of Maximum Recursion Depth(?)

The Appendix-N ended up being so long, and the setting itself still so nascent, that I'm actually going to post this first, you all can digest it, and then later I'll post about the setting and you can try to interpret it from this lens.

It might be a fun exercise to consider what world you might create for yourself from these disparate inspirations.

I already feel guilty if I forget someone or chose not to include them, but so it goes :/. Also, if you're reading this in the future, hopefully I've since read some of the things here that I reference but acknowledge I have not read yet. And I bet by the time I actually do anything formally with this setting, there will be many more inspirations.

PARIAH (Alone in the Labyrinth). Brilliant setting and arguably the beginning of some of these ideas, from my interview with Semiurge (Archons March On) and subsequent interview with SofinhoOne day I will get back to doing interviews...

Semiurge: To go back to Pariah's setting, it's hit home a bit of what is conventional wisdom for osr settings that didn't previously land for me. The post-apocalyptic, social order has broken down sort of stuff. But in kind of the opposite direction, pre-civilization rather than post-civilization. Smaller cast, smaller world, no big powerful states to exist in the shadow of. More room for weirdos and weird doings.

As discussed in my interview with Sofinho, I also found the Realms and Entheogens in particular deeply inspiring; this weird psychedelic blurring of reality, and defying the preconceived notions and categorical thinking of most kinds of magics, planes, and elements found in many other settings.

Sapiens by Harari and The Dawn of Everything by Graebor & Wengrow. Despite the fact that the latter frequently responds to the former and people seem to put them in mutually exclusive boxes, or perhaps because of that, I include these two together.

Sapiens provides an impressively comprehensive and coherent look at the history of humanity, with some big picture ideas around superorganisms and the nature of religions and ideologies which strongly resonated with me.

Dawn of Everything provides deep and detail-oriented insights into various indigenous and historical cultures, arguing for how things were and how things could be in ways that, while I have some qualms or open questions, I nonetheless find compelling and aspirational.

Ènziramire of On a Majestic Fly Whisk. A brilliant newer TTRPG blogger and academic thinker exposing me to so much more about Africa's cultures, and his own thoughts and ideas. An OSR Aesthetic of Ruin, Have you Met My Ghoulfriend, and Mantismen come to mind most immediately, but all of his posts are amazing.

Ubuntuism the African humanist philosophy. I still have read very little into it unfortunately, since very little of it is readily available, although Enziramire has pointed me to some of Samkange's other works. If Cartesian Rationalism says "I think therefore I am", Ubuntuism says "I am therefore we are". Given the interconnectedness of all people, any one's existence is confirmation of the existence of all others, and the acknowledgment of our collective being. An elegant synthesis of ethics, epistemology, and metaphysics. Amazing. Another book on African philosophy I hope to read that Enziramire turned me onto: The African Novel of Ideas: Philosophy and Individualism in the Age of Global Writing

I assume many of the ideas in that book would fall into the subsequent category below, or outside of either of these categories, which is of course the problem with trying to discretely categorize things like this. I apologize in advance if my categorical scheme between these paragraphs implies any ignorance on my part, but anyway I am not taking these categories as Truths of the universe.

Animism. This is such a broad category that I don't even know where to begin pointing to, and frankly I have not done nearly enough formal reading. I used to be one of those people who thought of animism along a linear spectrum of "progression", but I realize now how mistaken that idea was. As with Ubuntuism, or the Panentheism I see in Judaism, there is an understanding in Animism of the interconnectedness of things, a kind of graph theory by way of spirituality. Some Animism or indigenous culture-related books I hope to read eventually:
Very much open to other suggestions! I'd also like to read more about Shintoism and the Shinto/Buddhist interaction, indigenous Japanese animism such as the Ainu, and the Jomon era (I am somewhat knowledgeable on some of these things already); Australian, Polynesian, Pacific Island indigenous beliefs (and also the math of their astronomy and naval navigation, if known); Inca, Maya, Olmec, Teotihuacan, Hopewell, and other civilizations of the Americas; Celtic Animism; the list goes on...

Somewhat of a tangent, but I'm also interested in the Animist/Dualist interaction, like the recurring Hero Twins in relation to an otherwise Animist schema in many Native American mythologies, the Ondinonk / soul desires concept of the Wendat which I can find very little about online but read about through Dawn of Everything; some of my thoughts around the Philosophy of Games (see that section further below) intersect with these spiritual and cultural ideas. Likewise, the way DoE describes the historical trade practices in the Americas as being rooted not in market / barter economics as we think of it, but in heroic adventures, art, and spiritual wellness; I believe the interaction between these ways of thinking with various aspects of systems or quantitative thinking is profound and vastly underexplored in modern culture, even among more radical countercultures that I'm aware of. Also interested in the dualism of Zoroastrianism, Gnosticism, and Yazidi mythology, but I'm not sure if any of that fits into this so that's entirely a tangent...

Poetry, Manifestos, and Countercultural Literature. A broad category and I'm not sure how to describe it's influence necessarily. Perhaps inspired by my interview with Ms. Screwhead of Was It Likely (and Iconoclastic Flow!). Much of what appeals to me about poetry is its synthesis of structure and aesthetics. Listen to this episode of the Ezra Klein podcast, they explain it better. I've been thinking about numinousness, specifically through a conversation with Semiurge, and I believe that ties into this as well. I've been reading things like James Baldwin and the Beat Poets, and some of the manifestos like The Dada ManifestoThe Manifesto of Futurism, and hopefully soon the The Surrealist Manifesto (I'll also get around to properly rereading The Communist Manifesto some day...). It may not directly influence the setting, but it's influencing how I'm thinking about things generally. All of this talk about numinousness and poetry reminds me that from Semiurge's suggestion, I really need to read Novalis as well.

The Philosophy of Games. I've been thinking about "games" for a while. Inspired by Kondiaronk and the Wendat people (by way of aforementioned Dawn of Everything), the philosopher C. Thi Nguyen (he had a great Ezra Klein interview as well, and he also has a book, Games: Agency as Art which admittedly I have not read yet), Genetic Algorithms, and TTRPGs in the abstract. I also need to read Homo Ludens. In the same way that language and writing have been transformative technologies that meaningfully influence society and individual human consciousness, I believe other transformative technologies have existed, or could exist, and that the pursuit of such is no less worthy than that of any other cultural pursuit, or at the very least is a worthwhile pursuit within the context of creative endeavors, the arts, fiction, gaming, etc.

The Aquarians of Aquarian Dawn. Yes I'm referencing my own setting. I still think there's more to explore with that, and I'm better equipped to do so now than I was a 4+ years ago when I was running that campaign. Mike of Sheep & Sorcery described The Aquarians as like a Fantasy version of the Tau from WH40K. While I'm referencing my own ideas feeding into this, I'm also working on something called The Mycelium Matrix with Huffa, which conceptually feeds into this setting well.

The X-Men Comics, specifically the Krakoan Era, and the Cerebro Podcast by Connor Goldsmith. I've always been a fan of X-Men, but the Krakoan Era has really been exceptional (note that I'm still like at least a year behind and very slowly catching up while simultaneously reading through the Claremont era and other classics...). I love how Krakoa picks up kind of where Grant Morrison's New X-Men left off philosophically, trying to not just fit the X-Men into a metaphor of the status quo, but to elevate them, to explore how the interaction of spiritual, intellectual, scientific, and queer ideas might create something radical and powerful and new, something Weird and Numinous and technomagical, while acknowledging flaws and failings and the ways in which they might be undermined or might undermine themselves. It's one of the most interesting takes on the Superhero Mythology that I've ever seen, and it's amazing how consistent and organized it has been across the entire line of books, many creative teams, over a span of years, which is in itself a testament to the narrative they are telling. There's just nothing else like it afaik; even despite the corporate constraints it tells a more interesting and profound story than most anything else of its kind. It is a profoundly honest attempt to explore a new kind of society. I find it inspiring and aspirational in the same way I find the ideas explored in Dawn of Everything, or those explained below.

Charles Stross' Accelerando and Glasshouse, Adrian Tchaikovsky's Children of series, and Quipu, or the importance of numinousness, and considering alternative STEM frameworks and the interaction of philosophy and STEM through science fiction or other cultures.
A reductive explanation of Stross and Tchaikovsky, and why I group them together, is that they each explore in a brilliant, imaginative, and at least semi-plausible way, transhumanist worlds, through AI/singularity and animal uplifts, respectively. Return to my quote from Semiurge on Pariah to hopefully at least understand in part the circular relationship between any meaningful exploration of the past and future. I am still reading Glasshouse, and have not read Children of Memory yet.

Semiurge also recently suggested an idea around reconceptualizing our categorical frameworks of knowledge, i.e. the semi-arbitrary distinction between humanities and STEM, suggesting as one possibility the idea of numinousness as a better dimensionality reduction (that's my own paraphrasing of it, using Principle Component Analysis as a metaphor here). Some of this I believe is expressed in his Random Numbers, itself inspired by my Weird Colors. This also gets back to the poetry stuff.

As someone who values STEM / systems-thinking, I also want to explore alternative frameworks of doing so, either from science / speculative fiction as explained above, through poetry and spirituality and in the numinous, or through indigenous or historical cultures. I find ideas like the Inca Quipu's knot-based encoding system and other historical or indigenous maths and sciences absolutely fascinating (including modern indigenous maths [EDITED: Hyperlinking this post from the future (it's lower down in the post...)]), and beneficial to humanity as a whole both in a one-dimensional sense as the net effect of its application, but even more so in the multidimensional profundity that comes in having multiple frameworks from which to think about things, and all the ways one may combine them. Below are a couple books that I admittedly have not yet read but that I hope to read eventually. My exploration of Gematria would also fall under this category.

While he is more so an inspiration for MRD Vol. 2, I continue to think Norbert Wiener is someone more people should be reading. He is the originator of the concept of cybernetics, and also someone who clearly thinks critically and philosophically about the world, with generally leftist/progressive views which he was very frank about, and an excellent example of the numinousness found in the intersection of STEM and philosophy. The Human Use of Human Beings, and God & Golem, Inc. are both fairly short reads and geared towards a general audience, and I would recommend both of them (the former especially).

Finally, many of these ideas have been coalescing through my ongoing conversations with my friend Dr. Flux.

Sunday, April 16, 2023

I Wrote a Genetic Algorithm to Learn the Konami Code!

It's been a pet interest of mine for years to learn how to write Genetic Algorithms, but it was never quite clicking for me. I ended up stumbling upon this video (embedded below but if you don't see it it's also the previous hyperlink), and it finally clicked. This video is entirely no-code, just a simple and intuitive explanation. They said there'd be a code walkthrough video as well but unfortunately it doesn't look like they ever posted it.

My Genetic Algorithm to Learn the Konami Code is open source, available on github here. With a little work this could probably be fitted to an emulator to actually trigger in a game, or maybe even with a real game console if the controller inputs are programmable, that's a little outside my purview. It would be cool if somebody wanted to try that, but really this is just intended as a technical demonstration.

Genetic Algorithms use the principles of genetics; fitness, reproduction, and mutation, to converge on solutions given some task.

They have a lot of applications, such as robotics, neurocomputation, and machine learning, but this is just a simple Genetic Algorithm, no ML involved here.

I also have some ideas for using Genetic Algorithms for worldbuilding, TTRPG stuff, or quasi-videogames, but still need to give all of those some thoughts.

Keeping it simple, I thought it would be fun to train a Genetic Algorithm to learn the Konami Code.

I give a simple explanation of it here, but if you follow the link above to the github repo, the README explains it in more detail and also shows an example.

Konami Code

["↑", "↑", "↓", "↓", "←", "→", "←", "→", "B", "A", "START"]

The Konami Code is a common set of user inputs in videogames to activate cheats or secrets, most famously old Konami games.

We can think of these 11 inputs as the genes making up a strand of DNA.


We have some number of players. We can represent each player as a strand of DNA composed of 11 genes of seven types: ↑, , ←, →, B, A, or START.

Our initial population has entirely random genes; any 11 inputs among those seven values.


We can imagine each player presses their controller inputs one by one (i.e. their genes), and each time their current input matches the Konami Code, their score goes up by one. If they press the wrong button, they lose a life, and they only have one life, so whatever score they had before the mistake is their final score. 

There are certainly more efficient fitness algorithms, but I like the simplicity of this one and the way it works for our metaphor, as if literally pressing the buttons one-by-one on a controller.

Selection and Crossover

We take the players with the top X score and drop the rest of them. 

Then, we generate new players, up to the number of the original playerbase size, by crossing the winners of the previous round. We take any two winners at random, and for each of our 11 genes of the DNA strand, we pick randomly from one parent or the other.

Since all of the new players were created from the selection of the highest scoring players of the previous generation, the genes they inherent are more likely to be correct, so they generally show improved performance over previous generations.

If all of the highest scoring players had a score of two or higher, this means they all inputted ↑ ↑ of the Konami Code correctly, and as a result all of the new players will also get at least a score of two, because they can only inherent ↑ for those first two genes.

On the other hand, if none of the starting players had START as their last gene, then no future generation of players will ever be able to win, because they can never inherent START in the final gene.

This is why we add Mutation.


Mutation creates a percent likelihood that any given gene will change into any of our possible inputs, even if they did not inherit that input. With a mutation rate of 0.05, there is a 5% chance that any of the 11 genes of a player's DNA will mutate into any of the seven inputs.

Mutation can cause a good gene i.e. a correct input of the Konami Code to change, meaning it might take more generations of play before a sufficient number of players win. However, it also means that if you start with a low-scoring or non-viable starting group of players, that they can catch up more quickly, or succeed where it might otherwise have been impossible.

If you want to know more about the particulars, check out the open source github project, or feel free to ask more questions here.

Sure this is cool I guess, but what's the big deal?

If you think coding and technology is black magic, nothing I say is likely to change that and while I think that's a shame, I'm not trying to change your mind.

All the same, if you're at all interested in natural philosophy or understanding the world, this is a cool demonstration. The fact that we can abstract the principles of genetics and use them to solve problems analogically demonstrates the existence of these systems and how they operate, and by extension informs our understanding of the world. The mathematical or algorithmic representation of them is just a language to make it easier to understand.

To me, conceiving of and training an algorithm to solve the Konami Code, it's like a puzzle, or a poem. It's a little piece of art. That's not to deny that these things can be used poorly, but both things can be true, and these systems exist in the world whether we use them or not, and also, people are using them, so isn't it better to find ways to find the beauty in them and use them for good? Even if you believe there is no good way to use them, if you really believe they're so powerful and so dangerous, isn't that all the more reason to understand what they are and how they work, so that you can better protect yourself from them?

Friday, April 7, 2023

A Super-Solid State of Matter

A super-solid state of matter like the opposite of plasma, colder than cold. Like a miniature blackhole in homeostasis. Black, opaque, bending spacetime around it. Hard, like absolute sharpness. Heavy with its own gravity, yet inert in-place. When pulled from homeostasis by a sufficient force, the imperfections in its field shear at spacetime like a ball of scribbles puncturing paper.

Found this old writeup in my notes, pretty sure I never posted it before.