E.

27.05.2026

A=B.

A programming game made entirely from find-and-replace rules. It looks almost trivial. It gets difficult very quickly.

Open the game on Steam ↗

The entire language

An A=B program is a list of instructions. Each non-blank line contains exactly one equals sign. The characters = ( ) # are reserved.

string1=string2

Find the leftmost occurrence of string1 and replace it with string2.

cababaab=XYcXYaba
string1=(return)string2

If string1 is found, stop immediately and replace the whole string with string2.

cabbagebb=(return)yesyes

How a program runs

  1. Read the input string.
  2. From the top, find the first instruction that can run.
  3. Run it, then begin scanning again from the first line.
  4. If no instruction matches, return the current string.

Rule order is therefore part of the program. A matching line near the top prevents lower lines from running on that step.

EXAMPLE 01

Remainder after division by three

The input contains only as. Return how many remain after removing complete groups of three.

aaa=
aa=(return)2
a=(return)1
=(return)0
aaaaaaaa=aaaa=(return)22

The first rule repeatedly deletes groups of three. One of the return rules then reports whether zero, one or two as remain.

EXAMPLE 02

Are every letter’s occurrences odd—or zero?

ca=ac
cb=bc
ba=ab
aaa=a
aa=(return)false
bbb=b
bb=(return)false
ccc=c
cc=(return)false
=(return)true

The first three rules sort the input into blocks of a, b and c. Each nnn=n rule removes two copies at a time, preserving whether that letter’s count is odd or even. An odd count eventually becomes one; a positive even count becomes two and triggers false. If no doubled letter remains, the empty left side always matches and returns true.

abacbcasortaaabbccreduceabbccbb matchesfalse

THE NEXT PROBLEM

And this is where “easy” ends.

I found the next puzzle and had absolutely no idea where to start. That gap—between four symbols of syntax and genuinely awkward reasoning—is what makes the game so good.