21 NAND Docs 中文

Microduck

39 NAND gates steer a simulated little duck robot. Circuit #281 is written on BNB Chain. Walking is still done by the original neural network.

How to play

  1. Open the page and wait for it to load the robot, the MuJoCo physics simulation, and the walking policy.
  2. Pick a starting point and a "brain" (hand-written rules or circuit #281), then click run.
  3. Watch the duck walk toward the goal. The right panel shows the live input bits and which of the 39 gates are on.

Everything runs in your browser. The page has an "On chain" switch, off by default. Turn it on and each steering step becomes a read-only call to the circuit on BNB Chain (through https://bsc-rpc.publicnode.com). No wallet needed. If a call fails, the page falls back to computing in your browser.

Who does what

The depth sensor is an ideal sensor added in the simulation, with no noise. The goal direction comes straight from the true position in the simulation. This is not a real robot.

Circuit #281

ItemValue
GatesTrained as 14 logic gates, compressed to 39 NAND gates, depth 13, no latches
Netlist size273 bytes
EquivalenceOn all 16,384 inputs, the hand-written rules, the gate network, the NAND netlist, and the page's evaluator all give the same result
ProcessorBNB Chain 0x6Fb4089e7Cbaa9660Fd11056274Cbd8117EE5B38
Written on chain2026-09-09, block 120889741
Transaction0x4160e34f83e0220a79d529b78514a69e5c31453c4e8e3ab427c48d7e756c9740
On-chain check64 random inputs, on-chain eval and local all match

Results on the original field

One field, 8 fixed starting points. The hand-written rules and circuit #281 give exactly the same results.

This is a development starting point on a fixed field. It does not mean a different field gives the same result.

Memory circuit #282

The page can also hook up #282 (22 NAND gates + 3 latches) so the duck remembers which way it just turned. It is a fixed rule and does not learn. On field 2, which has a U-shaped pocket, some starting points do better and some do worse. It is not an overall improvement.

The new circuits (tested, not on chain yet)

We rebuilt the steering circuit and the memory circuit and ran the final test in simulation on 2026-11-11. Neither is on chain yet; the demo page above still runs #281 and #282.

"Collision-free arrival" means the duck reaches the goal and never touches an obstacle on the way. "Heading straight for the goal" is a comparison controller that ignores obstacles and steers only by the goal direction.

Details of the check

Next