Warning: session_start(): open(/var/lib/php/sessions/sess_tl3rs7u5qm65s13ljohs3elb14, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
!7
!include #1007130 // AI Game Include
p {
showBlunderWindow = false;
pGame();
}
//////////////////////////////////////
// Test AIs. Just add your own here //
//////////////////////////////////////
AI > BWImageCat {
new BWImageCategorizer cat;
new L texts;
static ImageSurface is;
void go {
cat.allowedDistance = 0.03f;
int i = cat.addImage(image());
S guess = get(texts, i);
S solution = submit(guess);
if (nempty(solution) && empty(guess)) {
listSet(texts, i, solution);
bool first = is == null;
is = showImage(is, join(texts), mergeImagesHorizontally(cat.rgbImages()));
if (first) {
setFrameWidth(is, 600);
moveToTopRightCorner(is);
}
}
}
}
static L segment(RGBImage img) {
ret autoSegment(new BWImage(img), 3); // 2 is too small
}
//////////////////
// PUZZLE MAKER //
//////////////////
static Puzzle makePuzzle() {
S text = randomID(1);
ret new Puzzle("Enter the lowercase letter you see:", renderSourceCode_1(text), text);
}