The homepage of Dylan
Holmes

# Logical•AI

## artificial intelligence ⋅ mathematics ⋅ programming
⋅ quantitative design ⋅ civil liberties ⋅
humanism ⋅
short essays

My doctoral dissertation, *Computing moral hypotheticals*. I
built a computer system that understands moral hypotheticals such as
self-defense or preventive harm, in much the same way we do. Here's a
video recording of
my thesis
defense.

I wrote a program to manipulate infinite series, solve recurrences, and convert infinite sequences into finite closed form. A finite computer can wrangle infinities.

Exotic algorithms that compute using scifi time travel and stable time loops. Working examples included. (Aug 2022)

A computer program that identifies poetic features of Latin
poetry (such as alliteration, syllable counts, and caesurae) to help
identify the Anglo-Saxon poets who wrote
them.

(July 2022)

I analyze the implicit pragmatic rules that constrain when it's appropriate to say that "X drove Y to Z". These rules hinge on concepts including "intended destination", "passenger sentience", and "transport beneficiary", showing just how surprisingly nuanced our language is.

I propose an intro quantum mechanics course based on playing with smart, qualitative numerical simulations. You can ditch the nonphysical idealizations and instead focus on big messy physical problems—such as chemistry! The main advantage is compositionality: learning something new enables you to do combinatorially many new things. (July 2022)

A question-answering program capable of holding a conversation about
what happened when. (Class project based on Longuet-Higgins's
book *Mental Processes*.)

I explain, from first principles, how the sun moves through the
sky and how it looks from different vantage points. Seasons,
extremely tilted planets, Martian zodiacs, how sundials work, and
more. Just the geometric consequences of orbiting on a spinning
planet with a tilted axis—no physics.

Update: A sundial theorem (Oct 2022)

Can you wrap rubber bands around a cube so that every face looks like the image shown here (or a rotation or reflection of it?). I write Clojure code to find out.

I derive the ideal gemstone shape based on physical
principles. Along the way, I uncover connections between gemstones,
mirrors, lasers, and glass.

My friends and I have developed a useful strategy for working together. Social queues provide short one-way conversations that enable you to tell someone else that you'd like to talk to them, without interrupting their focus if they're working hard on a problem.

By optimizing my walk home, I've discovered some beautiful graphs and an unexpected conclusion.

In this essay, I argue that online surveillance endangers our basic freedoms; a direct solution should target exploitative organizations, not the people who built the free-of-charge, communal Internet.

Microwave ovens measure time in strange and wonderful ways: you can
type in three minutes as `3:00`— but also
as `2:60`! In this article, I explore the properties of this
number system and its relationship to another numbering system, binary
coded decimal (BCD).

A mini-theory of choreography. Three constraints to help you
design elegant choreography for games like *Stepmania*.

A map of all the shrines in *Breath of the Wild*. Using the
elegant grid-based index, you can easily look up the location of
any shrine by name. Find shrines you've missed.

The *Magic: The Gathering* card game has evolved its own English
dialect, complete with new grammar. Here, I describe and codify
some of the (implicit) rules.

I describe Kellogg's and Warmus's procedures for testing whether a function can be nomographed, and for constructing the nomogram if so.

Game-playing strategies for card games with luck manipulation.

Given some empirical data points, find the best-fit hyperbola/parabola/ellipse passing through them. Includes Python code.

A few unsorted, miscellaneous little ideas or results. Updated occasionally.

Write in an alien language using Loren's circular alphabet. Pre-alpha proof of concept.

A cubic meter is larger than a liter, but a cubic millimeter is smaller than a milliliter. Changing the prefix changes which is larger— can you find the prefix that makes them equal?

This fixed-verse poetic form, invented in the 12th century, has beautiful hidden symmetry. I depict the symmetry several ways and generalize it, defining a family of new poetic forms.

My optimized design for a weight-plate loading app. No typing of any kind. Unified interface for assembling a target weight, visually looking up an arrangement of plates, and converting between pounds and kilograms. (Designed for smartphones.)

A visualization of how material and lighting can affect
brightness. *(A four-variable oriented nomogram with
transparency.)*

Ambiguous drawings like this Escher staircase or this elephant employ surfaces and lines that you interpret differently depending on where you're looking.

I found a way to depict a four-dimensional Klein bottle using a similar ambiguous technique. Here, you can see the neck of the bottle bypass the inner surface without piercing it — an impossible feat in three dimensions.

To solve a puzzle about a conversation, I converted the conversation into an interpretable program. When you describe a problem in this new puzzle-language, the resulting code looks like a natural language conversation and, when run, will find the solution.

How would you experimentally determine the Pokémon type chart
if you didn't already know the types and their interaction strengths?

pokémon, ai

Solving a subletting problem with an elegant payment protocol.

Drawing Celtic knots using platonic solids as the underlying
shape.

See also: Tutte polynomials of the platonic solids

A well-known puzzle asks for a least-time strategy for a group of
people to cross a bridge in pairs with a flashlight. With a
combination of search and some astonishing computer-automated
algebra, we can get insight into the general case.

Edit: I found a closed-form
solution. Regardless of who's crossing the river, an optimal
solution is to send the two slowest people across the river,
either escorted by the fastest person, or in a "one-two ratchet"
(the two fastest people cross, then the fastest returns, then the
two slowest people cross, then the second-fastest person returns),
whichever strategy is faster. This is always
optimal. [writeup]

This script explains medical terms by breaking apart their etymological roots. It translates Latin-based jargon into familiar words that anyone can understand.

I use a variety of conceptual, programming, and mathematical tools to investigate a card game puzzle.

In Latin poetry, the length of each syllable is determined using rules
regarding nearby letters and accent marks on the vowels. This program
allows you to input Latin poetry without accent marks; it then
intelligently guesses the accent marks by assuming that the poetry
follows a specific metrical form known as *dactylic hexameter*.
latin, programming

A lightning-fast tool for looking
up Latin verb endings. You can type any combination of English
(“we will/should have been -ed”) or grammatical terms (“3i
subjunctive passive”) to get a tailor-made table of relevant
verb endings.

latin, programming

Parables about life and identity. Updates some Fridays.

A collection of short essays outlining some moral issues concerning life and death and what we can do about them today.

A cultivated collection of songs that are variously life-affirming, immortality-positive, futurist, and/or socially conscious.

We nearly ran out of gas while driving between states!
This usually means walking to the nearest gas station
and back. In this article, I devise the optimal cooperative
solution.

This compound nomogram enables you to compute the concentration of a mixture of two solutions at different concentrations.

chemistry, nomography, programming
A picture of the relations between complexity classes. As shown in
the key, containment goes in the upward direction. Solid lines
indicate equality; the axes are time/space, difficulty, and
complementation; and the hardest problems for each class are written in
blue.

(See
also: Hasse
diagrams on Wikipedia.)

The Jewish law prohibiting mixtures of meat and milk has the same algebraic structure as the rules for which blood types are compatible donors.

A search engine which searches itself. Reminiscent of Minsky's Ultimate Machine.

Quantum measurement becomes easier to explain when you think of each measureable quantity as a coordinate system — which, in a precise way, is what an eigenbasis is.

Converting genders and orientations into numbers allows you to
estimate relationship compatibility using arithmetic.

Also Kinsey Strings: Using
pushpins and yarn to depict compatible attraction.

Polygraphs: Graph theory applied to relationship shapes among multiple participants.

By expressing human relationships in terms of relational algebra,
I discover that monogamy is like unitarity, stepchildren and
children-in-law are dual concepts, and your spouse could
reasonably be called your self-in-law.

When you type an English word, the system explains how to pronounce it using simple English words — rather than using more precise but arcane phonetic systems such as IPA. (Pronunciation data comes from CMU's pronouncing dictionary for American English.) programming

In this game, you think of a Pokémon and the program asks you questions to determine which Pokémon it is; it wins in at most nine questions (Generation I) or ten questions (Generation I & II). Beyond the game itself, this project is interesting because I extract Pokémon trait data directly from the Yellow/Gold ROMs respectively, ensuring that my data is correct. With this trait data, I use a greedy algorithm to construct a short decision tree of questions to ask. Because I restrict the set of questions to common knowledge (about types, evolutions, and so on), the guesser generally requires one more question than it would if it were playing optimally — but as a consequence the game is, presumably, more fun to play. pokémon, ai

This short Clojure program solves a class of introductory chemistry problem using logic programming instead of the usual tedious method taught in classrooms— namely, manual trial and error. The use of a programming language — and constraint terminology in particular — makes the description of the task unambiguous. Programs like these demonstrate why computational thinking belongs in all classrooms. clojure, chemistry, education, programming

I show how molecules can be represented as a kind of adjacency matrix. In particular, the properties of lewis structures (polar character of bonds, formal charges, etc.) can be read off as properties of the corresponding matrix.

You can balance chemical equations automatically by calculating a basis for the null space of a “chemical composition” matrix. The method is useful because the calculations are automatic, because the method is always applicable, and because the null space reveals a wealth of useful detail about the space of possible answers.

I re-implemented the code from Andrew Kennedy's
paper *Drawing Trees*, in which the author
adduces four aesthetic criteria and designs an elegant, recursive
tree-drawing algorithm to meet them.
clojure, quantitative design, functional programming

Two groundbreaking AI programs— Jim Slagle's integration program
and Tom Evans's geometric analogy program — showed that
computers could perform tasks that many believed only smart humans
could do. In particular, they exemplified the possibility and the
power of programs that make *educated guesses*. In order to make
these programs (and the ideas surrounding them) available to a wider
audience, I've implemented both of these programs in modern
programming languages.
(good old-fashioned) artificial intelligence

Since 2012, I have been a teaching assistant for MIT's introductory AI course (6.034). During that time, I've produced some runnable demonstrations of the different concepts we study; these demos, along with other miscellaneous school-related doings, are available at my MIT page: http://web.mit.edu/dxh/www. artificial intelligence, MIT

In this essay, I affirm the following view: All people are entitled to
live a healthy, flourishing life, to determine in what ways they will
grow old, and to decide how and when they will die. A just society
should exert tremendous effort in promoting this entitlement to life,
defending its citizens from aging or dying against their will, and
respecting the choices that they make in this matter as sacrosanct. No
society currently meets this standard. We will require new tools to
bring about this human right, and undoubtably it will be costly
— but the injustice of the alternative is clear and compelling,
and emerging technology makes success an genuine possibility if we
strive for it.

In my observation, our societal taboos
contribute to muddled beliefs about death (e.g. beliefs about
selfishness, “the natural order”, and preordained
lifespans), and those muddled beliefs, in turn, present the biggest
obstacle to securing a society which promotes this entitlement to
life— or even one which notices the problem.
an essay, mortality

- Nomograms with oriented transparency
- A six-variable nomogram for mixing
- Nomograms for relativity
- Weak acid/base dissociation
- Proof: Filling in constant coefficients
- Proof: Recovering curves from isopleths
- Function decomposition
- Nomograms with two or three straight scales

Nomograms are too interesting to summarize in such a small
space. Briefly put, nomograms are diagrams that help you compute the
solution of an equation of three variables— even very
complicated ones — by finding the place on a drawing where a
line crosses three curves simultaneously. This converts the analytic
problem of solving for one of the variables given the other two into
a 2D *geometric* problem.
The result is a two-dimensional representation of the equation where
you can read off solutions using only a straightedge; all the
complicated relations are implicitly encoded in the particular shape
of the curves.
mathematics

I wrote a tune to accompany one of my favorite poems,
E.E. Cummings's *anyone lived in a pretty how town*.
a song

The sun emits light of various frequencies which scatters in Earth's
atmosphere, producing a lovely characteristic blue color. I took a
table of blue sky spectral data and resized the visible frequencies
(400-700 THz) into audible frequencies (around 400-700 Hz).
This is the result — a chorus of blue.

Note: The blue color of the sky results when the radiation of the sun
(effectively a 5600K blackbody) becomes scattered by small
particles in the air (Rayleigh scattering).
rayleigh scattering

This clock maps the twelve divisions on a clock to the notes of a twelve-tone scale, allowing you to hear the current time as musical intervals. music, clocks

I depict a generic human lifespan as a 12×90 grid of provocatively tiny squares, each representing a month. It enables you to project your own life onto the smallish grid, noting the spatial location of different milestones, measuring the amount of life you've accumulated so far, guessing where in the grid future events may happen, and ultimately to contemplate how short life is, even when it's as long as our best modern technology allows. After all, it's a rare person indeed who won't fit in this grid. a sort-of art project, mortality

This simple Javascript program lets you interact with a puzzle described by Pólya in one of his books. I find that an increased ability to play with the problem can help you to spot the solution. a puzzle

I use the indispensable Calibre software to manage my ebook collection. I've written a script which extends Calibre by interacting with its database; it uses PHP, Javascript, and CSS3 to render the cover images in your library as aesthetically pleasing 3D books. (If you like the way this looks, you could for example extend it to enable searching your library, editing your library, etc. You could even read your books online; see next entry.) ebooks, server culture

Load EPUB-format ebooks from your local computer or from any URL. I use this in conjunction with the previous program to access and read my books from any computer that has an Internet connection and a web browser. ebooks, server culture

This one-off Javascript script is for interacting with the arithmetic of finite fields; it helped me to understand more deeply some of the requirements and properties of (so-called) elliptic curves. mathematics, elliptic curves

Mathematicians are often rightfully accused of showing their results in elegant final form without showing the methods and dead ends by which they arrived at them. In this tutorial, I attempt to explain what an exterior algebra is in terms of our intuitive real-world understanding of geometry and space. I've attempted to motivate each definition this way, using pictures and eschewing jargon and formalism wherever possible. a tutorial, mathematics, algebra

A fun program for drawing *simple-alternating-transit*
mazes, which are nonbranching mazes of a particularly simple kind
that exhibit particularly inscrutable patterns.
recreational mathematics, mazes

This was a project I started after being a teaching assistant for
Marvin Minsky's AI course *Society of Mind*. It's a simple online
version of the book *Society of Mind* which I converted from a
multimedia CD edition of the book. The online version, like the
multimedia CD, contains great video interviews of Marvin alongside the
original text, which is itself a rich source of thought-provoking
ideas.
mit, ai

I wrote the first draft of a transcript for this interview by
Aaron Sloman, a mathematician-turned-philosopher whose work in
artificial intelligence attacks questions of impressively broad
scope— he asks questions about how virtual machines evolved
and in turn influenced the environment in which other virtual
machines evolved, how the nature of *chemical* computations and
other exotic architectures might help to explain how brains compute
(and why von Neumann machines are a flawed paradigm), and how primal
spatial reasoning skills and an eye for affordances eventually led
to works like Euclid's *Elements*, the first
*explicit codification* of that spatio-geometric
knowledge.
ai

In this short piece, I present a poset category in which the commutation law is just Bayes's Law. Enriched versions of the category provide a glimpse of the fundamental properties that plausibility values must satisfy (in particular, you can quantify plausibilities with values drawn from rather simple spaces — you don't need to use the entire idiosyncratic aparatus of the real numbers or even a σ-algebra.) mathematics, category theory, probability

A few web resources collected to commemorate the brilliant, kind,
redoubtable Marvin Minsky.

I sketch an idea I had for a program that builds and debugs bespoke cryptographic protocols by drawing upon a library of techniques and common bugs. (This idea is heavily inspired by Sussman's HACKER thesis.) As a benchmark test, it would re-derive familiar protocols such as asymmetric-key cryptography, oblivious transfer, and so on, merely from the specification of the problems. programming, ai, cryptography