#lang scheme

(require "Clases-neuron-capa-red.rkt")

;;;;;;;;;;;;;;INSTANCIAS
;;;NEURONAS
(define n_1 (make-object neuron_entrada% 'n_1))
(define n_2 (make-object neuron_entrada% 'n_2))
(define n_3 (make-object neuron_entrada% 'n_3))
(define n_4 (make-object neuron_entrada% 'n_4))

(define n_5 
  (make-object neurona%  'n_5
    4 propagacion_lineal lineal escalon_1))
(define n_6 
  (make-object neurona%  'n_6
    3 propagacion_lineal lineal escalon_1))
;;;CAPAS
(define capa_1 
  (make-object capa_entrada% 'c_1
    (list n_1 n_2 n_3 n_4) ))
(define capa_2 
  (make-object capa% 'c_2
    (list n_5 n_6) (list (list 1 1 1 1) (list -1 1 1 1))))
;;;RED
(define perceptron (make-object red% (list capa_1 capa_2)))

;;;USO
(display "Input  -->Salida") (newline)
(display '(1 0 0 1)) (display " ")
(send perceptron proceso! '(1 0 0 1))
(display '(1 1 0 1)) (display " ")
(send perceptron proceso! '(1 1 0 1))
(display '(1 0 1 1)) (display " ")
(send perceptron proceso! '(1 0 1 1))
(display '(1 1 1 1)) (display " ")
(send perceptron proceso! '(1 1 1 1))
(display '(1 1 1 0)) (display " ")
(send perceptron proceso! '(1 1 1 0))
(display '(0 1 1 1)) (display " ")
(send perceptron proceso! '(0 1 1 1))