;;
;; run-full-epochs.scm — Full multi-epoch run with grammar phase
;;
;; Run in CogServer: (load "run-full-epochs.scm")
;;
(format #t "~%═══ FULL MULTI-EPOCH RUN ═══~%~%")
;; Record pre-run stats for comparison
(let ((pre-surprise (cl-average-surprise))
(pre-classes (hash-count (const #t) *word-classes*))
(pre-merges (length *cl-merge-history*))
(pre-grammar *cl-grammar-available*))
(format #t "Pre-run state:~%")
(format #t " Level: ~a~%" *cl-current-level*)
(format #t " Avg surprise: ~,3f~%" pre-surprise)
(format #t " Word classes: ~a~%" pre-classes)
(format #t " Total merges: ~a~%" pre-merges)
(format #t " Grammar available: ~a~%" pre-grammar)
(format #t " Class-MI cache: ~a entries~%"
(hash-count (const #t) *cl-class-mi-cache*))
(format #t "~%Starting run-epochs (max 5)...~%~%"))
;; Run up to 5 epochs
(run-epochs 5)
;; Post-run stats
(format #t "~%═══ POST-RUN STATS ═══~%")
(corpus-status)
(grammar-status)
(format #t "═══ FULL RUN COMPLETE ═══~%~%")