#lang racket
(require "Clases-neuron-capa-red.rkt")

(define proc
  (lambda (s)
    (cond
      ((= s 3) 0);blanco
      ((= s 4) 2);negro, hormiga
      ((= s 5) 1);amarillo, comida
      (else -1);resto de objetos
      )
    ))
;;;;;;;;;;;;;;INSTANCIAS
;;;NEURONAS
(define n_1 (make-object neuron_entrada% proc 'n_1))
(define n_2 (make-object neuron_entrada% proc 'n_2))
(define n_3 (make-object neuron_entrada% proc 'n_3))
(define n_4 (make-object neuron_entrada% proc 'n_4))
(define n_5 (make-object neuron_entrada% proc 'n_5))
(define n_6 (make-object neuron_entrada% proc 'n_6))
(define n_7 (make-object neuron_entrada% proc 'n_7))
(define n_8 (make-object neuron_entrada% proc 'n_8))

;;;CAPAS
(define capa_1 
  (make-object capa_entrada% 'c_1
    (list n_1 n_2 n_3 n_4 n_5))); n_6 n_7 n_8) ))
;;;RED
(define discriminacion_tactil (make-object red% (list capa_1)))
;;;;;;;;
(provide discriminacion_tactil)
;;;;;;;
;(require "Training_set.rkt")
;
;(define estimulos->red
;  (lambda (red estimulos);estimulos : training_set
;    (let go ((i 0)
;             (j (length estimulos))
;             )
;      (if (= i j)
;          #t
;          (let* ((input (car (list-ref estimulos i)))
;                 (capa1 (send capa_1 proceso! input))
;                 (deseada (second (list-ref estimulos i)))
;                 (resp (send red proceso! input)) )
;            (if (equal? deseada resp)
;                (printf "~a --> ~a~n" input resp)
;                (printf "~a ==> ~a ==> ~a~n" input capa1 resp)       
;                )
;            (go (add1 i) j)
;            )
;          )
;      )
;    )
;  )
;
;    (estimulos->red discriminacion_tactil training_set)