The story behind AutomataVerse

It came back with a red circle.

Two degrees, two countries, and the same frustration: machines drawn in pencil that could not tell you they were wrong. How that turned into a simulator 20,000 people in 60 countries draw theirs in.

RS
Robin Singh
Creator of AutomataVerse · 8 min read
Q3. DFA: binary numbers divisible by 3q0q1q2011001110 ✓1001 ✓traced both by hand. looks right!111 ?−2
Chapter one · India · fifth semester

It started on a piece of paper

I met Theory of Computation in the fifth semester of my bachelor’s degree in India. The syllabus was small and the method was simple: we drew automata on paper. A circle for a state, an arrow for a transition, a double circle for accept. Then you put a finger on the start state, read the string one symbol at a time, and hoped you had not slipped somewhere along the way.

You draw a DFA for binary numbers divisible by 3. It looks right. You trace 110 and it accepts. You trace 1001 and it accepts. You hand it in.

A week later it comes back with a red circle, because your machine also accepts 111, and you never tried 111.

A machine on paper cannot tell you it is wrong.

You find out when someone else walks it and lands somewhere you did not. This is the run I could not see that week, the one the red pen was pointing at:

The same machine, running · input 111
111
Accepted · should reject
011001q0q1q2accepting by mistake
q0 → q1 → q0 → q1. What the paper never showed: the third string ends on q1, which got a double circle it should never have had.

And it was not only hard on us. Our professors had a stack of hand-drawn machines to check, each one a little different, each one needing the same strings traced through it again.

I looked for help online. Each tool I found covered a machine or two and stopped there. One did DFAs. Another did Turing machines. JFLAP did the job, but it was an old tool with a simple UI, and it felt like it belonged to a different era of software than everything else on my laptop.

Chapter two · The US · first semester of my master’s

The same feeling, a bigger syllabus

Later I moved to the US for my master’s, and in my very first semester Theory of Computation came back. This time the syllabus was vast:

NFAspushdown automataTuring machinesregular expressionsthe pumping lemma

If I had to rate that course, it was a 100 out of 100. My friend Mahesh and I learned an enormous amount about the foundations of automata theory and every kind of state diagram that comes with it.

The course was great. The tools to learn it with were still old. Different country, different university, a much deeper syllabus, and the exact same feeling I had in my fifth semester.

The subject is about machines that move. We were still studying them as pictures that do not.

There are plenty of lectures on YouTube. Real knowledge comes from doing it yourself.

Robin Singh

That is when the idea took shape. I wanted something really lightweight, something that needs no installation at all. Open a link, draw a machine, run a string, watch what happens.

Chapter three · The turning point

No money for a backend, so the browser became the backend

There was one practical problem. I could not afford to host a backend that ran simulations for every user. Every string stepped through every machine, on a server I was paying for, was not a bill I could carry as a student.

Then the obvious thing finally occurred to me.

The simulations do not need a server.

Stepping a DFA, branching an NFA, pushing and popping a stack, moving a Turing machine’s tape head. All of it is work a browser can do on its own. So I built it as a web app where the simulation runs inside the tab itself.

Q3. DFA: binary numbers divisible by 3q0q1q2011001110 ✓1001 ✓traced both by hand. looks right!
On paper: a picture.
Divisible by 3DFA3 open
input
1110
2/4Runningq1
011001q0q1q2
StateExamplesOpenSaveTestsConvertShareExport⌘K
In the tab: the same machine, and it moves.

What started as a budget constraint turned out to be the best decision in the project.

For a student, it means the tool works wherever they are. On a locked-down lab computer where you cannot install anything. On a library PC. On a borrowed laptop ten minutes before class. You open a link and your machine is there, saved as you draw.

For me, it means it costs almost nothing when more people show up. And because it costs almost nothing, I could keep the simulator free. That was the chance I wanted: the problems I faced had surely been faced by a lot of students, and now I could build something that anyone, anywhere in the world, could use.

Chapter four · After graduation

One editor for the whole syllabus

I built AutomataVerse after I graduated. The goal never changed from that first idea, and neither did the list I started with:

day one
  • free to use, for anyone
  • nothing to install. it runs in the browser you already have open
  • every machine a real course covers, in one editor
  • learn by doing: draw it, run the string, see exactly where it dies

All the machines from the syllabus, in one place instead of scattered across different tools. Seven of them today, and every one draws, runs and steps the same way, so the second machine you learn costs nothing to pick up.

DFANFADPDANPDATMMEALYMOORE
plus regular expressions and grammars, as tabs next to them
Chapter five · The part that gets used

An ordinary weeknight

Features are easy to list. It is more honest to describe the moments they were built for, because every one of them is a moment I remember being stuck in. So here is one night.
9:40 pm

You are not sure your machine is right

You type a string and step through it one symbol at a time. The current state lights up as the machine moves. With an NFA you see every branch it is exploring at once. With a pushdown automaton the stack grows and shrinks beside the diagram. With a Turing machine you watch the head walk the tape. When a string dies, you see the exact state and the exact symbol where it died.

11:05 pm

The assignment is due in the morning

Instead of tracing strings one by one, you write down the ones you expect to accept and reject, and run them all in one click. The 111 you forgot to try on paper takes one second to try here.

Batch test×
10/12passed · 83%
InputExpectedGotResult
εacceptaccept
110acceptaccept
1001acceptaccept
111rejectaccept
101rejectreject
101011rejectaccept
Run 12 teststhe canvas is not animated for this
12:30 am

The textbook skipped a step

A conversion is usually shown as a finished table. Here it plays like a film: each new state appears as it is discovered, with a caption explaining why. NFA to DFA, minimization, removing ε-moves, regular expressions both ways, a grammar into a pushdown automaton. You pause, go back a step, and play it again until it clicks.

To DFAMinimizeRemove ε1/42/43/44/4
Your NFAaabq0q1q2
DFA · being builtaa{q0,q1}b{q2}{q0}
Step 1 · the start state
The DFA starts from the set holding the NFA’s start state: {q0}. Each DFA state is a set of NFA states.
Step 2 · read a from {q0}
On a, q0 can stay in q0 or move to q1, so the set is {q0,q1}, a state the DFA has not seen before.
Step 3 · read b from {q0,q1}
On b, only q1 has a move, to q2. The new set {q2} contains an accepting NFA state, so it is accepting too.
Step 4 · done
No unseen set appears. Three states, no guessing left: the DFA accepts exactly the strings the NFA did.
1:15 am

The grammar might be ambiguous

You type a context-free grammar and a word, and watch the parse tree and the leftmost derivation grow step by step. If the word can be derived in more than one way, you get every tree. Ambiguity stops being a definition and becomes two pictures sitting side by side.

2:00 am

The homework has to look good

You export the diagram as an image, or as TikZ that drops straight into your LaTeX document. No redrawing a finished machine by hand in a second tool.

2:10 am

You want a second pair of eyes

You share the machine as a link. Your friend opens it and runs strings through it in their own browser, without signing up for anything. Then you go to sleep.

Chapter six · The other side of the desk

Then I remembered our TA

During my master’s, our TA used to give really good feedback on our state diagrams. Looking back, I understand how much work that was. To check one student’s machine properly you have to run many inputs through it. Now multiply that by every student, every assignment, every week of the semester.

So I asked the next question: why not take that off their desk too? A simulator already knows how to run a string through a machine. Running fifty strings through thirty machines is the same job, just repeated.

S01
S02
S03
S04
S05
S06
S07
S08
S09
S10
S11
S12
S13
S14
S15
S16
S17
S18
S19
S20
S21
S22
S23
S24
S25
S26
S27
S28
S29
S30
30 / 30 graded in one click
Thirty machines. Twelve hidden strings. One click.

Professors create a group for their course, students join it for the semester, and the assignments live inside it, next to the work. The part I like most is what happens when a machine is wrong. If the professor has added their own solution, AutomataVerse finds the shortest string the two machines disagree on. Which changes what a TA gets to say:

Your machine is wrong.
Your machine accepts 111 and it should not.
where a good conversation starts

The feedback my TA gave us by hand is the part I wanted to protect. Taking the tracing off their plate leaves more time for the part only a person can do: explaining why a design is wrong and how to think about it differently.

What a course gets

A professor creates a group for the course, and students join it for the semester.

Assignments live inside the group. Students build their answer in the same editor they practice in.

A few sample tests can be published, so students check the basics before they submit.

The real test strings stay hidden, and the whole class is graded against them in one go.

For DFA and NFA work the professor can add their own solution. If a student’s machine accepts a different language, the shortest string the two disagree on is shown.

A small class runs on the free plan. Larger courses have a paid plan, and that is what keeps the simulator free for everyone else. The details are on the pricing page.

Submissionhide →×
Aisha Verma
Binary divisible by 3 · submitted 2 hours ago
Auto-grade · reference solution · 12 hidden tests
Not equivalent to the reference. Shortest counterexample: 111. This machine accepts it, the reference rejects it.
10/12passed · 83%
Use suggested score · 8/10
Grade *
8/ 10 points
80% · letter grade B
Feedback for student
Your transitions are right, but q1 should not be accepting: 111 is 7, and 7 is not divisible by 3. Remove the double circle and the hidden tests pass.
150/1000 characters
Submit grade
What the TA sees. The student here is made up; the counterexample is the real feature.
Chapter seven · Accepting state

Where it is today

Over the last year and a half, AutomataVerse has served more than 20,000 users in more than 60 countries. I did not plan for that number. I planned for one person: the student I was in my fifth semester, staring at a diagram on paper and not knowing whether it was right.

Where the machines are being drawn
World map with the countries AutomataVerse is used in highlighted
20k+
Users
60+
Countries
1.5
Years live
7
Machine types

That student is everywhere. The syllabus changes from country to country, the language changes, the university changes. The moment of drawing a machine and wanting to know if it works does not.

And the machine from the top of this page? One double circle fewer, and it is finally right.

The same machine, fixed · input 111
111
Rejected · as it should be
011001q0q1q2
q0 → q1 → q0 → q1. One double circle fewer. The run ends on q1, q1 is not accepting, and 7 is finally not divisible by 3.

If that is you tonight, you do not need to read anything else.

Draw the machine. Run the string.

input
story
5/5RunningAccepted
Free. No account. Nothing to install.