Examples: logic.in

In this problem, the network learns to solve simple boolean formulae. These formula have three variables, each of which occurs once. The variables can be true or false, they can be negated, and the second variable can either be grouped with the first or the third.

The names of the examples should make clear what formula is being represented. The input encoding is as follows:

0) 0 if the parentheses are on the left, 1 if on the right
1) 1 if variable A is negated
2) Variable A
3) The operator between A and B (0=or 1=and)
4) 1 if variable B is negated
5) Variable B
6) The operator between B and C (0=or 1=and)
7) 1 if variable B is negated
8) Variable C

One might think that having parenthesization and negation would throw the network for a loop, but it is actually surprisingly good at solving these problems. You should find that it learns quickly and generalizes well to the testing set.

You may want to experiment with the network to see if you can get really perfect test-set generalization.

The example logic2.in has a much more difficult boolean formula problem that uses a simple recurrent network.

Douglas Rohde
Last modified: Thu Nov 16 16:26:11 EST 2000