csys: minor fixes

This commit is contained in:
Helmut Merz 2026-03-03 22:13:25 +01:00
parent c6292309a4
commit 6ea6811103
2 changed files with 8 additions and 9 deletions

View file

@ -50,10 +50,10 @@
(defun find-sensors (msg)
(let* ((key (cddr (shape:head msg)))
(sns (gethash key (sensors *environment*))))
;(util:lgi key sns)
(util:lgi key sns)
sns))
;;;; detectors: pseudo-neurons in environment, addressabel via message head
;;;; detectors: pseudo-neurons embedded in environment, addressable via message head
(defun do-log (msg state syns env)
(util:lgi msg))
@ -83,10 +83,10 @@
(defun std-proc (msg state syns env)
;(util:lgi msg state)
(destructuring-bind (nmsg nst syns)
(destructuring-bind (nmsg nst nsyns)
(handle-action msg state syns env :default #'remember)
(forward nmsg syns)
(actor:become (neuron #'std-proc nst syns env))))
(forward nmsg nsyns)
(update-neuron #'std-proc nst nsyns env)))
(defun forward (msg syns)
(dolist (s syns)
@ -106,8 +106,7 @@
(list msg (shape:data msg) syns))
(defun create-sensor (msg state syns env)
(let ((key (shape:data msg))
(sensor (actor:create
(neuron #'std-proc 0 (list (synapse actor:*self*))))))
(let* ((key (shape:data msg))
(sensor (make-neuron actor:*self* :state key)))
(setf (gethash key (sensors env)) (list sensor))
(list msg state syns)))

View file

@ -49,7 +49,7 @@
(format stream "~&(~a ~a) = ~a~%" op args r)
r)))
;;;; date and time manipulations
;;;; date and time manipulations
(defconstant +unix-time-base+ (encode-universal-time 0 0 0 1 1 1970 0))