The XOR Problem

Description

The XOR (exclusive OR) problem is a foundational example in machine learning and artificial intelligence. It demonstrates the challenges of non-linear classification, where simple linear models fail to separate the data correctly. The XOR logic gate outputs 1 if and only if the two binary inputs are different; otherwise, it outputs 0. This problem serves as a classic benchmark for understanding the power of neural networks and their ability to handle non-linear decision boundaries.

XOR problem

Dataset

Below is the dataset for the XOR problem. This dataset forms the basis for model training and evaluation.

Input 1Input 2Output

Visualize Data

The scatter plot below shows the XOR dataset. Points with output 0 are displayed in blue, and those with output 1 are in red.

Model Configuration

In this section, you can configure the architecture of the neural network for the XOR problem. Specify the number of units (neurons) and the activation functions for each layer. Layer 1 is the hidden layer, and Layer 2 is the output layer. The configuration directly affects the model's ability to learn and predict the XOR logic. Select appropriate values to experiment with different architectures.

Layer 1

Layer 2

Network Visualization

The following visualization represents the architecture of the neural network based on the selected configuration.

Model Training

Configure the training parameters for the neural network model. Adjust the learning rate to control the speed of optimization during training. Choose the number of epochs to define how many times the model will iterate over the entire dataset. Click "Run" to start training the model and monitor the progress, including the loss and epoch count, in real time.

0.01
0 N/A

Prediction

Choose inputs to predict the XOR output:

Prediction: N/A