Petri Net Lizard

Wound the lizard and watch it heal

A 40 × 40 lattice with the same small Petri net at every site. A constant supply of chemical fuel holds the picture away from equilibrium. Click or drag on it to wipe a patch back to blank paper.

Click or drag on the lattice to wound it. Dark means more ink tokens at that site.

Time
0.0
Phase
holding
Error vs target
0.0000
Fuel burned
0
Ink + blank
exact

Run

Wound

Free energy

Show

Model

What heals it

A wound resets ink, blank and the four signalling tokens in the disc to their equilibrium counts. The seed tokens stay, because no transition consumes them. The rates are frozen and the fuel is still flowing, so the net redraws the patch.

Tick the seed box and wound again: now the positional information is gone and the patch stays blank.

What pays for it

Slide the fuel drive to zero. Every transition still obeys the same rate law, but with no free energy the lattice relaxes to equilibrium paper, about 4.7% ink everywhere, and the fuel burned reads zero. Slide it back up and the lizard returns.

Fuel burned is in kT per site per time unit.

Use your own trained model

  1. Put export_lizard_demo.py and gray_regen_defs.py in the folder with your checkpoint.
  2. Run python export_lizard_demo.py. It writes lizard_model.json.
  3. Press “Load a model file” and pick that file.

The built-in model is a short CPU-trained run, so its lizard is blurry.