Feedforward neural network I am new in neural network and I am trying to figure out how to build a feed-forward neural network to solve a classification problem defined in the following way (X1, X2 being the features and Y the target):
if X1>0 and X2>0 then Y=1
if X1<0 and X2>0 then Y=0
if X1>1 and X2<0 then Y=1
if X1<1 and X2<0 then Y=0
If someone could at least give me a clue
Thanks
 A: Try simplifying your set of rules to a simpler set of rules (one with fewer rules).
What nodes are you allowed to use?  I assume you can use some sort of a threshold node to produce the zeros and ones.
Can you do these problems well with only one feature (positive goes to 1 and negative goes to zero)?
edit
I misread the last rule before thinking it said X1 < 0.  It's quite easy to do it in three layers (counting the output layer) as long as you can,
1) construct a node asking if the input is greater than a certain value.
2) construct a node performing "and" on two outputs from the previous layer.
Are these things you can handle?  Am I correct in assuming you need to cut out one layer?  It's possible but harder to lead you there.
(In the future I suggest adding more information by editing your original question)
A: Ah the old XOR problem. This has been written about at length. See here:
https://web.stanford.edu/group/pdplab/pdphandbook/
Ultimately, this can be solved with a fully connected 1 hidden layer network. You need two input nodes to read in your input pattern, a two-node hidden layer, and a single output node. Then train with stochastic gradient descent.
Consider a network with input nodes $i_0$ and $i_1$, hidden nodes $h_0$ and $h_1$ and output node $o$ and a sigmoid activation function. 
One solution would have strong positive weights from both input nodes to $h_0$ and weak positive weights from both input nodes to $h_1$. $h_0$ will have a weak negative bias weight and $h_1$ will have a strong negative bias weight. $h_0$ will have a strong positive weight to $o$ and $h_1$ will have a strong negative weight to $o$. Finally, $o$ will have a weak negative bias.
It might help to draw a diagram of this configuration and walk yourself through how the activation would flow for each of the possible 4 input patterns.
