%
dummy = 0;

function g = sigmoid(z)
g = 1./ (1 + e .^-z);
end

LOR = [
   -20
    30
    30
];

LAND = [ 
   -30
    20
    20
];

LNOTAND = [
    30
   -20
   -20
];

function y = propagate(X, L, K)
X = [ones(size(X,1),1) X];
H = sigmoid(X * L);

if exist("K")
H = [ones(size(H,1),1) H];
y = sigmoid(H * K);
else
y = H;
end

y = round(y);
end

## X = [
##   0 0
##   0 1 
##   1 0
##   1 1
## ];

## y = propagate(X, [LOR LNOTAND], LAND);
## [X y];
