Lab · c19.s02.L1

XOR network

One unit is one straight line, so no weights and threshold label all four rows of XOR correctly; three of four is the ceiling.

Question: What can one unit never do?

XOR networkA square board holds four corner points: the two labelled different, at the top left and bottom right, sit on one diagonal, and the two labelled same sit on the other. A straight line crosses the board; the four score bars beside it show which side of the line each point falls on. Moving the weights tilts the line and moving the threshold slides it, yet the counter never passes three of four.XOR networkraw = w1*x1 + w2*x2 answer 1 when raw > theta, else 0 (a tie answers 0)0101x2x11 different0 samethreshold thetarowraw scoreverdict0(0, 0) = 00 same(0, 1) = 11 different(1, 0) = 11 different(1, 1) = 00 sameNo setting reaches fourHow many of the 891 settings get each count right00 of 41191 of 46722 of 41003 of 404 of 4100 settings reach 3 of 4672 reach 2, 119 reach 1,none reaches 0 or 4.The best is 3 of 4, reached by 100 settings.First such setting: w1 = -2, w2 = 0.5,theta = 0. The default at weights 1, 1and threshold 0.5 is one of them.A finer grid of 361201 weight pairs from-3 to 3, step 0.01, separates thefour corners 0 times.
Re-simulated Re-simulated: the script scores the four XOR rows recorded in section 19.2 for every setting of the two weights and the threshold; no measured data is used. The drawing is a diagram of that computation. The three default frames show the histogram over 891 settings, the four inequalities that cannot all hold, and the working setting at weights 1, 1 and threshold 0.5 (3 of 4, missing (1, 1)); every other stored setting is shown as a single frame when you pick it.
Lab controls
1

Arrow keys choose among -2 and 1

1

Arrow keys choose among 0.5 and 1

0.5

Arrow keys choose among 0, 0.5, 1.5 and 2.5

Frame 1 of 3: The ceiling over every settingOver all 891 settings of the two weights and the threshold, the counter never reads 4: 119 settings reach 1 of 4, 672 reach 2, 100 reach 3, and none reaches 0 or 4. 100 settings reach the ceiling of 3 of 4, the default among them. A finer search of 361201 weight pairs from -3 to 3 in steps of 0.01 at a fixed threshold separates the four corners 0 times.

The ceiling over every setting. Over all 891 settings of the two weights and the threshold, the counter never reads 4: 119 settings reach 1 of 4, 672 reach 2, 100 reach 3, and none reaches 0 or 4. 100 settings reach the ceiling of 3 of 4, the default among them. A finer search of 361201 weight pairs from -3 to 3 in steps of 0.01 at a fixed threshold separates the four corners 0 times.

Keyboard: Space plays or pauses, Left and Right step, Home goes to the first frame, End goes to the last frame.

Text description of this lab

A square board holds four corner points: the two labelled different, at the top left and bottom right, sit on one diagonal, and the two labelled same sit on the other. A straight line crosses the board; the four score bars beside it show which side of the line each point falls on. Moving the weights tilts the line and moving the threshold slides it, yet the counter never passes three of four.

Return to the section that hosts this lab

Caption status: re-simulated. Every lab declares one of published, re-simulated, schematic, synthetic or interpolated.