title: Why do we need layers in artificial neural network?
body: <p>I am quite new to artificial neural network, and what I cannot understand is why we need the concept of layer.
  Isn't is enough to connect each neuron to some other neurons creating a kind of web more then a layered based structure?</p>
  
  <p>For example for solving the XOR we usually need at least 3 layers, 1 input with 2 neurons, 1+ hidden layer(s) with some neurons and 1 output layer with 1 neuron.</p>
  
  <p>Couldn't we create a network with 2 input neurons (we need them) and 1 output connected by a web of other neurons?</p>
  
  <p><a href="https://i.stack.imgur.com/DV2Dq.png" rel="nofollow noreferrer">Example of what I mean</a></p>