12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- #|
- This code is to easily go through all the posner experiments
- |#
- ;; 1. Set stuff up
- (setf *default-pathname-defaults*
- ;;#P"/home/laurab/common-lisp/gems-1.2-alpha-3/posner/")
- #P"/Users/bartletl/Documents/portacle/projects/gems-1.2-alpha-3/posner/")
- (require :asdf)
- (require :gems)
- ;; 2. Enter the names of the experiments to be included
- (setf experiment-list (list 'arjona))
- ;; 3. Go through each and run GP
- (load "posner-initialise.lisp")
- ;; optional things:
- (setf decay-toggle 0) ;; stm decay on (1) or off (0)
- (setf *decay-threshold* 0.1) ;; just try different values
- (defparameter stored-state (make-random-state t)) ;; this is a new one every time. so need to actually store it somewhere.
- (setf *random-state* (make-random-state stored-state))
- ;; this info will be printed in the output file and so can be used in future.
- (dolist (name-exp experiment-list)
- (load (format nil "posner-~a.lisp" name-exp))
- (defun operator-set () op-set)
- (run-gp :f-a 0.7 ;; changed from 0.75
- :f-t 0.25
- :f-s 0.05 ;;changed from 0.05
- :population-size 5000 ;; change from 3000 ; 8000 ; 2000
- :max-generations 500 ;; change from 200 ; 700 ; 500
- :phased t
- :logger (gems:combine-loggers (gems:make-logger (format nil "summary-~a-prev.csv" name-exp) :if-exists :supersede) (gems:make-logger (format nil "models-~a-prev.yml" name-exp) :kind :trace :filter #'(lambda (generation-number) (= generation-number *max-generations*)))))
- )
- (defun operator-set () (append op-set wait-op-set))
- (load (format nil "posner-~a.lisp" 'arjona))
- (setf clean-models-arjona (best-models "models-arjona.yml"))
- (print (format nil "~a final models - ~a" (length clean-models-arjona) 'Arjona))
|