anchor.diff:  (in-package :bukvonesis)
   
   (defparameter *population* '())
  +(defparameter *scores* '())
   (defparameter *allele-size* 10)
   
   (defclass font-app (base-app)
     ((font-loader :accessor font-loader)
      (bukva :accessor bukva :writer (setf bukva))
  -   (contours :accessor contours)
  +   (glyph :accessor glyph)
      (candidate :accessor candidate :initform '())))
   
   (defmethod setup ((app font-app))
  
positive.code: (defun evaluate (candidate target)
    (let ((index 0)
  	(score 0))
      (when (< index (length candidate))
        (zpb-ttf:do-contours (contour target)
  	(zpb-ttf:do-contour-segments (start ctrl end) contour
  	  (incf score (coords-distance start ctrl end (aref candidate index)))
  	  (incf index))))))
  
  (defun coords-distance (start ctrl end candidate)
    (let ((score 0))
      (unless (and (zpb-ttf:x ctrl) (zpb-ttf:y ctrl)) 
        (setf ctrl (zpb-ttf::make-control-point 0 0 nil)))
  
      (incf score (distance-squared (zpb-ttf:x start) (zpb-ttf:y start)
  
negative.code: 
  (defun (setf bukva) (bukva app)
    (setf (slot-value app 'bukva) bukva)
    (setf (slot-value app 'glyph) 
  	(zpb-ttf:find-glyph (aref (bukva app) 0) (font-loader app))))
  
  (defun start ()
    ;;setup drawing window
  