Welcome to the Occult Triangle Lab

You opened the box, he came.

This is the Occult Triangle Lab, a blog about fantasy, trigonometry, and ungodly amounts of milk. New posts are below, but for new visitors, here’s a guide to some of the coolest projects on the Lab so far:

  1. Ergodica: Experimental Literature, Fractals, and Necromancy
  2. The Making of ANATMAN: Origami Books, Zen Buddhism, and Oroboro
  3. The Rats in the Walls: Graffiti, Lovecraft, and an NYC Alternate Reality Game

Other posts cover my fantasy world and short stories, including posts on worldbuilding, magic systems, and sketches from my stacks of notebooks. I also talk about books and articles I’m reading.

Welcome to the Occult Triangle Lab

My New Post on Magical Warfare Is up on Fantasy Faction!

Here are the opening lines:

“Fallout taught fans that war…war never changes. Military historians, however, argue otherwise. Case in point: the stirrup.

Before firearms dominated the battlefield, it’s generally agreed that the stirrup was the most important innovation in warfare for a couple centuries. Fans of the Rohirrim will recognize why: cavalry is fast and maneuverable, and the stirrup allows the rider to swing swords, carry lances, and fire arrows with ease. Anyone who doesn’t have an army equipped with stirrupped cavalry is doomed to be dominated by those who do. As a result, the stirrup changed the way armies waged war and (arguably) the very face of medieval Europe. Keep in mind, the stirrup is a piece of leather that’s attached to the saddle.

With that in mind, what would magic do to warfare?”

You can read the article on Fantasy Faction here!


Worldbuilding: Bloodless Warfare in a World Without Death


On a basic level, symmetrical warfare (where two sides line up on a field and attack) is governed by a lot of recognized principles and tactics, like envelopment, flanking, retreats, charges, and routs. For my world, I wanted to approach warfare differently by introducing two twists: first, magic is incorporated into combat, and second, killing people is forbidden.

The reason I wanted combat in my world to be non-lethal is because death in my world functions differently from other fantasy worlds: rather than being sent to a vague and mostly opaque afterlife, people know that their souls will be expelled from their bodies and doomed to exist in a half-conscious state here on earth, constantly craving the things that drove them in life. The world, as I imagined it, is already suffused with ghosts who are tied to familial obligations as guardian spirits or left to aimlessly wander. Meanwhile, the living are obsessed with living forever and extending their lives. Warfare, then, has to be shaped around this institutional fear of death.

With that in mind, I took some notes on how I envisioned warfare would look in my world:

“Killing your opponent is taboo, and a violation of the rules of war. Instead, your focus is to incapacitate enemies and capture them. Mortal injury (including cleaving off limbs) is fine, as long as the person does not die. Capturing can occur after or during the battle, but you must keep enemies from rescuing their own allies on the battlefield and bringing them back to their lines.”

“Armies are not made of professional soldiers, and are instead peopled by a mix of militias, career soldiers (like samurai), and mages. Mages form the heart of each unit, which can range from 5 people to 50 people. There is no external organization to the forces, and armies are loosely commanded by a war council.”

“At the periphery of the battlefield are healers and enchanters, who support the army by healing the injured (both friendly and captured enemies) and enchanting their allies with spells that prevent physical or magical damage. It is not permissible to attack these healers or support mages, but it is permissible to capture them without violence.”

“Honor is one of the key constraints of combat. Those who do not obey the rules of combat are stigmatized and punished harshly. It’s dishonorable to try to escape once you’re captured and held by the enemy. False surrenders and disobeying parlay rules are also forbidden. Everything else, including sabotage, spies, subterfuge, torture, hostages, and ambushes are permitted but looked down upon.”

“There are different kinds of mages. In my mage hierarchy, wizards are elites. Sorcerers, illusionists, witches, and hedge wizards are all lower on the hierarchy. They can be very specialized and even more capable at certain tasks than wizards, but they are not as all-around powerful and adaptable as a wizard. Mages can use any magic they want, as long as its non-lethal.”

“There are three kinds of magic: spoken magic, similar to chanting or shouting, movement magic, similar to martial arts kata, and written magic, which is made of spell maps imposed on skin or objects. There does exist anti-magic measures, which are dependent on the kind of magic being used. For spoken magic, anything that disrupts speech or sound can jam a spell. For movement magic, anything that restricts the necessary movement of the body (arm and leg movements, etc.). For written magic, contact has to be made with the written surface to jam it or break it.”

“Other rules:
1. Biological warfare is not allowed.
2. Healers must do everything in their power to keep enemy soldiers alive, as well as their own soldiers. In case of a conflict, friendly soldiers take precedence.
3. Psychological warfare is permitted.
4. Captured enemy soldiers must not be allowed to die, even after the battle is over. Their well-being is entirely entrusted to their captors, who are honor-bound to keep them alive.
5. Sieges are permissible, as is the capture of non-combatants. In the case of sieges, the attacking army may impose conditions upon a community that will result in eventual death—cutting off water and food supplies, etc. It is up to the community to survive or surrender.”

“Since death is taboo, lethality is not permitted in warfare. Incapacitating an opponent through cunning or strength is mandated, with capturing an opponent being the ultimate goal. When enough units are incapacitated and captured, a victory is declared. With these conditions, individual bravery and recklessness (since there is no chance of death) is much more common than normal. Ransoms are paid to reclaim captured combatants, which enrich the capturing parties’ individual families and bring them prestige.”

“Armor, wrestling, blunt weapons, and physical strength (the ability to induce trauma on a body) are key components to normal warfare, with individuals attempting to incapacitate one another via melee being the main method. In addition to this, magic comes into play as safeguards and offensive tools: almost all mages and combatants have some kind of enchantment which limits physical or elemental harm, such as draw-redirect or targeting with ranged spells (without touch). To overcome these magical defenses, physical touch is required to make interface with another being, and hand-to-hand combat is highly prized as a final execution method to incapacitate an enemy.

All of this results in combatants and mages wearing extremely comprehensive, full-body armor and weaving heavy enchantments around themselves. Ranged attacks in general combat are generally meant to “jam” enemies’ enchantments and “soften” them for melee combat.’

“Armies are generally made up of family or familial alliance units, individual vagabonds, bands of companions, and mages and their entourages. The center of every unit is a mage, with each having their own specialty. Armies are usually below 1,000 units and are commonly 80-200 units, with a council of warleaders representing their constituents. Actual warfare is very loose and chaotic, with routs and intimidation common. Mages and strong soldiers form the morale center of their armies, and have the essential ability to rally their forces with their bravery or cunning.”

“Every battle can become extremely chaotic and changeable, since mages can employ almost any tool in their magical arsenal to turn the tide. Illusions are common to try and fake out enemies, as well as techniques that alter or disrupt the field of battle. Diseases are against the rules of war, but fire, water, earthquakes, light, animals, and extreme force are permitted as long as they are not lethal.”

“Ghost warfare is also an integral part of warfare—ghosts are martialed and invoked to protect their families and assist them in battle, which can take the form of weather, physical manifestations or possessions (including golems and mannikins), decay or weaving of spells. Ghosts can be unpredictable and hard to combat, and so a channeler/sorcerer or necromancer is generally a major asset in large-scale warfare.”

“Horses and cavalry are generally avoided because of horses’ ease of being incapacitated or frightened by ghosts, magic, mages, or illusions. However, they are utilized for fast travel and mobility.”

Worldbuilding: Bloodless Warfare in a World Without Death

Programmer Spells: The Two-Ton Punch

I’ve spoken a bit about how spells would work in my world, but for a long time I’ve struggled to figure out the details of the nuts-and-bolts mechanics. I’ve drawn inspiration for my spells from computer coding, but I don’t know how to code or the syntax of any programming languages. So with that in mind, I decided to do some research on Python this weekend and see if I could use some of the basic elements of programming to write a rudimentary spell, as I imagined it.

The spell I decided to write out is a draw-redirect spell, one of the first spells I ever came up with. It was originally inspired by Soto’s magical abacus in Terry Pratchett’s Thief of Time, which allowed the monk to move around kinetic force stored in falling bodies (namely, the protagonist Lobsang Ludd). I liked the idea of a spell that could absorb force and redirect it, and after researching martial arts like Aikido and Judo, I thought it’d be a great technique for a martial artist-mage.

The character I had in mind was the Dyer, a mage who had little to no muscle mass, but could topple much stronger foes by absorbing the kinetic force of their blows and redirecting it into his strikes. Here’s what I came up with for a sketch of the spell:

The Dyer’s Basic Draw-Redirect Strike Technique

Part 1: Intercept and absorb kinetic force (Draw)


Part 2: Store kinetic force (Draw)

[DEFINE tolerances: 0 PSI to 120,000 PSI]
[DEFINE shape: bound to caster’s physical dimensions, 1-inch radius around skin surface]
[DEFINE internal structure: triangular tessellation]

Part 3: Release kinetic force on a trigger (Redirect)

[WHEN][1 OF FOLLOWING CONDITIONS=TRUE][Execute respective functions]:


[TRIGGER 1= Caster says the word “release”]
[TRIGGER 2= Caster’s right palm takes designated form MANTIS HAND and makes contact with non-caster living entity]

[CONDITION 2: Sea reaches maximum capacity]
[EXECUTE: dissipate amount of stored energy equal to most recently absorbed energy amount]

The desired outcome of this spell, as it’s structured here, would be to absorb the full force of a punch or strike and dump that force into a magical space I termed a “Sea of DIrac”, which is an actual scientific phenomenon, but pretty much unrelated to the concept of kinetic energy. I first heard the term in Neon Genesis Evangelion, when Shinji encounters an Angel that can suck objects into its shadow, which is actually a Sea of Dirac. I just wanted a shorthand term for a space that existed outside of the material dimension, where energy could be stored indefinitely.

Once the kinetic energy is stored in the caster’s sea, that energy can be released again in conjunction with a strike, depending on one of two triggers: when the Dyer says a trigger keyword, or when the Dyer’s hand conforms to a predetermined shape (in this case, a mantis strike) and meets an opponent’s body. Activating one of these triggers will dump all of the kinetic energy the Dyer has stored into the inertia of his right arm, which, if he times it correctly, means that his relatively weak strikes could become incredibly powerful.

According to this article, the amount of force some elite boxers can put into their punches can range from 776 pounds to 1,300. After receiving only five punches at 800 PSI, the Dyer would be able to redirect roughly 4000 PSI into one strike (if I’ve done my math right). That comes out to about 2 tons.

The next step with this spell is translating it into its own symbols and notation–a magical language. That’s going to be much more difficult, because it means creating a whole set of symbols that correspond not only to programming tokens (like “and”, “or,” or “true”), but to nouns and concepts, like kinetic energy and the Sea of Dirac. Then again, it might be fun to start creating a pictographic language like Chinese or Japanese, especially for small projects.

Programmer Spells: The Two-Ton Punch

Hidden Layers: Spell Maps, Illusions, and Neural Networks

Anyone who’s ever watched Serial Experiments: Lain remembers the scene when Lain goes to greet her friends at school, but instead a doppelganger detaches from her and goes in her place–it’s the perfect expression of alienation, and evokes the idea that someone else is living your life. It also brings up questions about reality and identity: can we trust our senses to tell us what’s there or not? How many other things lie beyond sensory perception? Could someone fabricate reality? Are we who we think we are?

I like the idea of doppelgangers, but I like the idea of creating illusions even more. In Ursula LeGuin’s Wizard of Earthsea series, illusions are the easiest thing in the world, but when I sat down to figure out how to create illusions using my own system’s logic, I realized there were all kinds of difficulties: how do you trick all five senses? What sustains the illusion? What happens when you need to create something new, something that has never existed? The goal I had in mind was to create an illusory doppelganger, a kind of puppet that could be controlled by an unseen mage nearby.

Part of the process of creating an illusory person could be accomplished with an AutoCAD-like process–sculpting a person like a 3D model in isolation, adding details and textures like a video game character. But from there you run into the same problems video game characters do: how does the doppelganger ‘model’ interact with it’s environment realistically? How do you simulate the flapping of clothing when running, or when it’s windy out? How do you correctly recreate the sounds of footsteps on tile floors vs. cobblestones?How does the model deal with gravity and changes of elevation in terrain, let alone clipping through things like doors or tables? The model would need to be meticulously crafted to keep it from coming across as a glitchy mess.

The other issue is how to make it move, walk, and talk at all. One solution is to have its controller act out the movements verbatim in real-time with the situation, but that leads to all kinds of problems–if the controller is hidden somewhere, observing the situation, they need to react perfectly in time with outside actions, meaning that if there’s any disruption in line of sight, the whole facade is ruined. The biggest problem is when people or objects try to interact with the illusion model–if someone throws an apple at the doppelganger, the apple will pass through the illusion. Even if a controller were able to weave more illusions on the fly to correct this, by say, making an illusion that the model had caught the apple, the real apple would still make a sound as it hit the floor. The latency issues would be rough.

So there are a lot of issues here, and ones I didn’t really know how to solve practically. Luckily, Google came to the rescue.

One of the big recent announcements from Google’s I/O conference was that developers had created a method called AutoML, which is a system that guides artificial neural networks in creating other neural networks for a specific purpose, like speech or image recognition. Some of the networks created using AutoML actually surpassed the ones created by humans–meaning that an artificially intelligent system had beaten humans at creating systems similar to itself. What really caught my attention, though, was the structure of neural networks:

Image result for neural network structure

The nodes and interconnecting lines reminded me of summoning circles and occult diagrams, like the Tree of Sephiroth:

Here’s the thing about neural networks: they’re incredibly difficult and time-consuming to create and alter. The amazing thing about AutoML is that using a neural network to create other neural networks means that human programmers can delegate the heavy lifting to the AI, which is very adept at trawling through millions of nodes and collecting/changing basic information. With that kind of automation, all the programmers need to do is give it feedback on whether the networks it’s creating are doing a good job.

Here’s an example of what an AutoML-created daughter neural network looks like (right), compared to a human-designed neural network (left) meant to solve the same problem):

With this in mind, I started thinking about how a mage might use the structure of a neural network (and the techniques of AutoML) to create a doppleganger that is not only realistic and responsive, but is (for the most part) autonomous.

Now, just like a real neural network, this magical, semi-autonomous doppelganger would be a dumb automaton–maybe Turing complete, but not capable of doing anything it wasn’t instructed to do. This, however, is where deep learning comes in–the ability for neural networks to independently develop more complex layers to deal with problems. Given enough data and power and a competent neural network, there can be an element of emergence–the arising of a large phenomenon from smaller interactions.

It’s important to realize that neural networks are based off the structure of the human brain, and that when you create a new one, you’re essentially creating the possibility of a new brain to develop, one that can learn, make decisions, and change itself based on inputs. The problem, however, is allowing the system to change itself–as XKCD brings up, you could make a fully functional computer with rocks and enough space, but it would be extremely slow. So how could a neural network-like spell develop and change itself?

What I imagine is a mage who turns their body into a living canvas, with their skin becoming the hardware and the spells becoming the software. After laying down the basic structure of the neural network and employing the techniques similar to AutoML, the spell would begin to spit out output spells, which the mage would then look at and give feedback on. In this case, magic would be the stand-in for electricity, and the human body would take the place of a terminal or OS. Once the networks became complex and developed enough, the mage would essentially be walking around with a second brain on their body, operating in real time and generating a doppelganger like a projector. Creating illusions is just one use–reprogrammed, this same structure could be used for all kinds of magical purposes, including creating new custom spells.

Of course, the process of training the magical neural network and doing backpropagation would still take time, effort, and expertise, but the great thing about the AutoML system is that it can conceivably be used by non-experts to create an intermediary network that can do the more complicated tasks of creating and altering new, purpose-crafted networks. It essentially offers a shortcut to more complex creations.

In the end, it all comes back to Lain and Ghost in the Shell–can we create a facsimile of a person with the emergent property of consciousness? At what point does the illusion become indistinguishable from reality? When do we give up on our senses to tell us who is real and who isn’t? Who slips into my robot body and whispers to my ghost?

Hidden Layers: Spell Maps, Illusions, and Neural Networks

Meow Wolf and the House of Eternal Return

This past week, I visited my old college roommate in Albuquerque and went on a road trip to Santa Fe to check out Meow Wolf, which is home to something called ‘The House of Eternal Return.’ The building contains a full-sized family house, complete with a living room, porch, kitchen, and bedrooms, but scattered around the house are books, planners, and pamphlets that give clues about the residents, including Lucius Fox, who is the founder of a Scientology-like cult called Positive Mechanics, which is concerned with travelling through dimensions. It’s essentially Mark Danielewski’s House of Leaves, but built to scale, with a refrigerator that leads…somewhere else.

While wandering around the house, I found some interesting in-world texts, including a will, a PowerPoint presentation on a computer about Positive Mechanics, and a cipher for an unknown language, which allows you to decode a nearby message in a picture frame. Most interesting of all was a tapestry titled the ‘Technomancer Manifesto,’ which can be heard spoken aloud here.

Here are some of the pictures:


The House of Eternal Return is hands-down the coolest place I’ve ever visited, and not just because it’s a funhouse filled with occult B.S. It’s the kind of weird, incredibly ambitious project that you always hear people talk about as some ultimate goal, but inevitably never gets off the ground due to practicality. But Meow Wolf and the HOER is not only real, it exceeds all expectations and all goddamn definition. It really is a playground for the imagination, and mixes dark storytelling with mind-bending experiences and the sheer joy of exploring–anyone who’s been there knows the stuff I’ve described is only one-tenth of the experience. It makes me happy that a place like HOER exists, and it inspires me to do something just as weird and ambitious.

You can check out the website here.


Meow Wolf and the House of Eternal Return

I Have a New Monthly Worldbuilding Column at Fantasy Faction!

It’s called ‘Worlds Within Worlds’! The first article is an adaptation/revision of my OTL post on the Nokizi, titled “THE NECRONOMICON TO THE NOKIZI: CREATING TEXTS FOR SECONDARY WORLDS“. Here’s the banner for the column:

Worlds Within Worlds

Apart from giving the background on how I wrote the Nokizi, it gives some advice for writers looking to write their own secondary world texts:

  • Write out as much as you can
  • Always Write for Two Audiences
  • Pay Attention to Medium, Style, and Mode
  • Include References to Other Books, Events, and People

Check it out on Fantasy Faction!


I Have a New Monthly Worldbuilding Column at Fantasy Faction!

I’m Going to Be Moderating a Panel on Star Wars at Silicon Valley Comic-Con!

When I was a panelist on Outer Place’s “Science of Star Wars” panel last year, I thought that was going to be the high point of my nerd career for a while: I got to talk about sci-fi with a physicist, two PhDs in psychology, and professional Star Wars prop-makers. That’s me, second from the left.

Then I got to moderate a panel on robotics, AI, and sci-fi at Columbia University’s BRITE conference with a NASA astronaut, a PhD from the New School, a decorated fantasy/sci-fi author, and the director of the PKD Film Festival. Now, I’m moderating another panel at Silicon Valley Comic-Con. My editor and I are heading out to San Jose on the 20th to hit the show floor as press, then we’ll be presenting on Saturday. In short:

If you want to come see the panel, it’s on Saturday April 22nd, 2017, 4:30 pm to 5:30 pm, Room 211ABCD. The title is “Droids and Death Stars: The Science of Star Wars,” and we’ve got a kick-ass panel of experts lined up. I’ll be running the discussion and queuing the laser light show.

I’m Going to Be Moderating a Panel on Star Wars at Silicon Valley Comic-Con!