HomePage RecentChanges

Erunticlab

desc:

ErunticLab? is an artificial life environment designed for experimentation at the intersection of animal behavior studies and computer science. It was written as course software for the Spring 1995 Animals and Animats course at Hampshire College. Animals in ErunticLab? have lisp-like behavior programs and produce offspring using the tree crossover operation developed by Koza [J. Koza, Genetic Programming, MIT Press, 1992].

- a "code-stepper" utility that allows animals to execute their programs with function-call-level pseudo-parallelism - a wide range of animal sensors/actions/features

;; CodeStepper?-v2.1.lisp – a facility for the step-by-step evaluation of code

DESCRIPTION CodeStepper? is a facility for the step-by-step evaluation of code. This can be particularly useful for simulating the parallel execution of several pieces of code. Code-stepping the code after it has completed causes evaluation to restart at the beginning. Any Lisp functions that take a constant number of arguments (no optional or keyword arguments) may be used in the code, but they must first be "registered." Macros and special forms may NOT be used, but there is a pseudo-macro facility for obtaining macro-like behavior.

source:

how interacts with generic code-stepper code

(action :initform #'(lambda () (step-code (code-stepper actor)))))

(dolist (a animals) (when (alive a) (act a))

(setf (code-stepper a) (make-instance 'code-stepper :code (program a))))

(defmethod act ((wo world-object)) (setq actor wo) (funcall (action wo)))