Search code examples
machine-learningneural-networkxorunsupervised-learningsupervised-learning

Learning algorithm to implement XOR gate


I know we can't use perceptron learning algorithm to implement XOR gate because it is a lineraly inseparable problem. So my question is which learning algorithm and which neural network can we use to implement XOR gate? I tried using Delta rule, but it is not producing desired weight matrix.

Thank You!


Solution

  • A 2 layered MLP (multi-layer perceptron) will do the trick.

    Consider this article.

    By the way, Wikipedia reads:

    The delta rule is a gradient descent learning rule for updating the weights of the inputs to artificial neurons in a single-layer neural network.

    The "single-layer neural network" here is the issue. As you said, a simple (single layer) perceptron does not have the representational power to capture XOR.