AI > MemorizeBrightBLOB {
  RGBImage blobImage;
  static ImageSurface is;

  static L<Rect> segment(RGBImage img) {
    ret autoSegment_blackBG(new BWImage(img), 3); // 2 is too small
  }

  void go {
    // guess
    
    L<Rect> myRects = segment(image);
    Rect guess = null;
    if (blobImage != null)
      guess = rgbFindMostSimilarClip(image, blobImage, myRects, 0);
      
    // submit
    
    Rect solution = first(submit(guess));
    
    // learn
    
    if (blobImage == null) {
      solution = autoCropOfRGBImage_blackBG(image, solution);
      Rect mine = smallestRectContaining(myRects, centerOfRect(solution));
      if (mine != null) {
        blobImage = image.clip(mine);
        is = showZoomedImage(is, "Memorized BLOB", blobImage);
      }
    }
  }
}