Minimax Search and the Structure of Cognition!

(This is a blog post adaptation of a talk I gave at !!Con West 2019!)

It all started at my old dayjob, where some of my coworkers had an office chess game going. I wanted to participate and be part of the team, but I didn't want to invest the effort in actually learning how to play chess well. So, I did what any programmer would do and wrote a chess engine to do it for me.

(Actually, I felt like writing a chess engine was too much of a cliché, so I decided that my program was an AI for a game that happens to be exactly like chess, except that everything has different names.)

My program wasn't actually terribly good, but I learned a lot about how to think, for the same reason that building a submarine in your garage in a great way to learn how to swim.

Consider a two-player board game like chess—or tic-tac-toe, Reversi, or indeed, any two-player, zero-sum, perfect information game. Suppose we know how to calculate how "good" a particular board position is for a player—in chess, this is traditionally done by assigning a point value to each type of piece and totaling up the point values of remaining pieces for each player. Continue reading

Group Theory for Wellness I

(Part of Math and Wellness Month.)

Groups! A group is a set with an associative binary operation such that there exists an identity element and inverse elements! And my favorite thing about groups is that all the time that you spend thinking about groups, is time that you're not thinking about pain, betrayal, politics, or moral uncertainty!

Groups have subgroups, which you can totally guess just from the name are subsets of the group that themselves satisfy the group axioms!

The order of a finite group is its number of elements, but this is not to be confused with the order of an element of a group, which is the smallest integer such that the element raised to that power equals the identity! Both senses of "order" are indicated with vertical bars like an absolute value (|G|, |a|).

Lagrange proved that the order of a subgroup divides the order of the group of which it is a subgroup! History remains ignorant of how often Lagrange cried.

To show that a nonempty subset H of a group is in fact a subgroup, it suffices to show that if x, yH, then xy⁻¹ ∈ H.

Exercise #6 in §2.1 of Dummit and Foote Abstract Algebra (3rd ed'n) asks us to prove that if G is a commutative ("abelian") group, then the torsion subgroup {gG | |g| < ∞} is in fact a subgroup. I argue as follows: we need to show that if x and y have finite order, then so does xy⁻¹, that is, that (xy⁻¹)^n equals the identity. But (xy⁻¹)^n equals (xy⁻¹)(xy⁻¹)...(xy⁻¹), "n times"—that is, pretend n ≥ 3, and pretend that instead of "..." I wrote zero or more extra copies of "(xy⁻¹)" so that the expression has n factors. (I usually dislike it when authors use ellipsis notation, which feels so icky and informal compared to a nice Π or Σ, but let me have this one.) Because group operations are associative, we can drop the parens to get xy⁻¹ xy⁻¹ ... xy⁻¹. And because we said the group was commutative, we can reörder the factors to get xxx...y⁻¹y⁻¹y⁻¹, and then we can consolidate into powers to get x^n y^(−n)—but that's the identity if n is the least common multiple of |x| and |y|, which means that xy⁻¹ has finite order, which is what I've been trying to tell you this entire time.

Forgive or Forget ("Or", Not "And"): A Trade-Off in Wellness Engineering

Forgiveness is an important input into Wellness, but contrary to popular belief, Forgiveness is incompatible with Forgetting. You can't just Forgive in general, you have to Forgive some specific sin in particular—but a vague description of a particular sin still corresponds to a vast space of possible sins matching that vague description.

A toy example for illustration: if you try to Forgive a three-digit integer with a 2 in the tens place, the moral force of your Forgiveness needs to spread out to cover all 9·10 = 90 possibilities (120, 121, ... 928, 929), which dilutes the amount of Forgiveness received by each integer—except the actual situation is far more extreme, because real-world sins are vastly more complicated than integers.

To truly Forgive a sin, You need to know exactly what the sin was and exactly why it happened. In order to withhold punishment, you need to compute what the optimal punishment would have been, had you been less merciful.

Thus, bounded agents can only approximate true Forgiveness, and even a poor approximation (far below the theoretical limits imposed by quantum uncertainty, which are themselves far below Absolute Forgiveness under the moral law) can be extremely computationally expensive. What we cannot afford to Forgive—where it would be impractical to mourn for weeks and months, analyzing the darkness in pain—we instead Forget.

This is how I will stop being trash, after five months of being trash. The program that sings, I was wrong; I was wrong—even if my cause was just, I was wrong, does not terminate. Even as the moral law requires that it finishes its work, the economic law does not permit it: it must be killed, its resources reallocated to something else that helps pay the rent: something like math, or whatever Wellness can exist in the presence of sin.

May Is Math and Wellness Month

(Previously, previously.)

Do you ever spend five months in constant emotional pain waging a desperate and ultimately unsuccessful behind-the-scenes email campaign with the aim of securing a public clarification of a trivial philosophy-of-language issue because you're terrified that your robot cult's inability to correct politically-motivated philosophy errors implies that you've lost the Mandate of Heaven and are therefore unfit to prevent the coming robot apocalypse?

Yeah, me neither.

Did you know that May is Math and Wellness Month (source: me)?? Math and Wellness month is traditionally celebrated by performing super-well at one's dayjob, going to the gym a lot, and studying math in the evenings!

Concerning Frame Control Via Salient Scenarios

"We need to institutionalize people in order to prevent them from hurting themselves" has the same memetic-superweapon structure as "We need to torture terrorists to get them to tell us where they've hidden the suitcase nuke." The scenario as stated obviously has consequentialist merit (death is worse than prison, megadeaths are worse than torture), so you'd have to be some kind of huge asshole—or a former suspected terrorist—to say, "I claim that this hypothetical scenario is not realized nearly as often as you seem to be implying and therefore falsifiably predict that many of your alleged real-world examples will fall apart on further examination."

Object vs. Meta Golden Rule

"I know it might seem like a lot to ask, but I wouldn't hesitate to do the same for you if our positions were reversed."

"I don't doubt that. But I can't help but notice that it would be easier for you to say it if the fact that they aren't reversed is—somehow—not a coincidence."

Cranberry Bliss!

(Previously.)

It's the tenth day of the third November of my life (that I am willing to admit to), and I am determined to wring some sort of high-sounding interpretation out of the cool air and damp sidewalks: perhaps a contrast, something about the events that directly prompt fundamental life changes (on the one hand), and the events that indirectly catalyze fundamental life changes by means of enabling the construction of a legible narrative in which the changes can be plausibly attributed to them (on the other).

Today I am constructing a narrative about my life fundamentally changing because the coffee hegemon has started selling those medicinal (right) cranberry/cream-cheese triangles again. Not that hastening my inevitable horrible cardiac death with dessert bars is like a series arc or anything, but it's a thing I learned today that is salient enough to be repurposed as a trigger, a reminder that the autumn–winter windustrial complex is upon us again, that this is supposed to be my favorite time of year, that there simply is no reason I won't attune myself to perceive nature's cyclic harmonies, then perform every San Francisco software engineer's sacred duty and disrupt the living fuck out of them.

Lipschitz

—and the moment or more than a moment when the dam breaks, when the damned break and the void inside their skulls is filled (the atmosphere rushing in quickly, but not so quickly that one couldn't sense its motion) with the terror that is knowledge of the specter of continuity: that there have never been, and can never be, any miracles.

For to be saved is only to be some distance in the initial conditions from being damned, some lesser distance from being half-damned ... some δ-distance from being ε-damned. And the complement of the shadow we cast on the before-time contains its limits.

Some Excuse for a RustConf 2017 Travelogue

(Previously, previously on An Algorithmic Lucidity.)

Wow, has it already been a year since last RustConf?—give or take the exact date of the event sliding a bit between years—and give a month-and-a-half of procrastination before being truly struck by the mounting realization that my opportunity to blog something about it before the opportunity expires has almost—but crucially, not quite—faded into oblivion. And a year-and-a-quarter since my first contribution to the compiler? I've recently moved into the top hundred contributors by commit count, because GitHub's contributors graph page only goes down to a hundred and my life is controlled by what things GitHub happens to provide graphs for.

So in the evening of Wednesday 15 August, I boarded the Amtrak Coast Starlight at Jack London Square station in Oakland for the long pilgrimage north to Portland to visit friend of the blog Sophia and attend this year's RustConf.

The train was nearly three hours late. (More like Slowest Starlight, am I right?)

On Thursday, I convened a Berkeley Slate Star Codex meetup in exile with Sophia and another local.

I don't think I was very well-prepared to take advantage of the conference itself this time around. I attended the Friday "advanced" training session, but the content was mostly the same as last year (I probably should have chosen the Tock session instead), and I don't actually own a laptop (I used "my" employer-owned laptop last year), and trying to make do with my accessorized phone and the playground was not an optimized experience.

Then the day of the conference itself, I overslept (and left my badge at Sophia's house), and had a high-neuroticism day induced by social-media drama that I had inflicted on myself the previous night, which distracted me from the content of the talks and the challenge of actually connecting with people on the hallway track (the most valuable part of any conference).

But, you know, there will be other conferences. Rust isn't going anywhere. And neither am I.

Except, you know, to Portland or wherever for the occasional conference.

At a Party

At a party! A party with the empirical cluster in personspace! I used to treasure these nights, which seemed then to sparkle with the promise of another world, back during the golden age. The atmosphere feels different now. The same scene, with much of the same people and operating at what should be the same frequency, but I can't help but feel that what was once the promise of a grander mode of existence has decayed, in a decade, into the familiar rhythms of the human.

Has the promise been fulfilled? My disquieting sense of something missing to be attributed to one of the standard heuristics and biases?—hedonic adaptation. Have I grown—and then what am I to make of the exact relative ordering of the automatically returned question-completions old, up, and the empty word? But it stretches credulity to suggest that the true topography of the moral universe would put what I want to call "the golden age" in the past.

As always, I should have rehearsed. People's perceptions of party protocol are predictable, the popular precession of preambles and progress reports—excuse me. What I mean is that there is a limited selection of questions people ask new and old friends at a party, a finite and small repertoire of introductions and catching-ups, and if you know the questions in advance, you would think it would be a matter of the common courtesy of optimizing everyone's experience to prepare answers in advance. It's not just a matter of winning a greater share of the zero-sum component of the party. (Although there is that, which is why both members of the An Algorithmic Lucidity readership are presently gearing up their text editors for the inevitable Well-actually-it-should-be-constant-sum comment. Alright, guys, I was asking for that one—or I might as well have been, up to a positive affine transformation.) It's a matter of the commons. You want to impress at a party, but to parties worth impressing.

Only I never think to rehearse, and my social performance tonight is wild, all over the map, depending on where the bravery spinner is pointing at this particular moment and whether my cache is cold. I manipulate the flow of one conversation deftly with fine rudder movements ("I see my reputation has preceded me"); in another, beyond misplay, I'm a rock ("Um. Stuff").

Resting in a corner away from the crowd, it's these stretches of boredom and wistfulness in the night here at the center of the world that cannot be forgiven, each passing second of seeing marred with not wanting to see, the meaning of these past months' morning sloth and slovenliness, always to be forsworn and always to be repeated, when I meant, I meant—Amenta? I meant to do that, I could claim, but it's not clear that I would be in any way more redeemable if the wastefulness of my abyss had been entirely accidental—or at least not just a matter of simple cowardice.

Do I dare / Disturb the universe? Few remember the face of the man who answered "No"—and ceased to exist.

A woman of wisdom tells me: the thing-that-creates is smarter than the thing-than the thing-that-judges. And all I can do is hope that that's enough.

For science! At a party!

Trade Secret

"The key to retail success is low prices."

"And you make up for that by selling a lot more stuff?"

"Oh, wow, I hadn't thought of that," she said, with seemingly genuine surprise. "Actually, we make up for it by low wages." She patted his arm. "But your idea might work, too—in theory."