Original post by Victor-Victor
What in the world? Are you making fun of it yourself? It's not supposed to be equivalent! That makes it very ridiculous, especially if you're making it more complex. Your function is static - it does not learn - it does not change at all, it's a XOR before and after. Not just your function, your complete program can be substitute with this: f= a^b.
10 input a,b
20 f= a^b
30 goto 10
You are talking about tables, but your example has nothing to do with tables or learning. You change some 'tables values', but you do not use any of that information later for anything, your function is static, it does not learn.
The table starts out full of arbitrary numbers (0.5 in this case). Then the table is "trained" by being shown a number of examples. To generate the examples, yes, I compute XOR: So will any xor-learning ANN demo; your training data has to come from somewhere. After this training phase, the table contains values which approximate the correct ones. Thresholding at the end snaps these values to zero or one. The last few lines of the program output what has been "learned" by the table.
I could have replaced that line,
f = (a | b) & ~(a & b);
f = [Any other boolean function of a and b]
and the table would have "learned" whatever that function was.