Warning: session_start(): open(/var/lib/php/sessions/sess_k649f3hmarftco9klgr4ifir93, 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 {
blunderFPS = 1001; // show all blunders
pGame();
}
//////////////////////////////////////
// Test AIs. Just add your own here //
//////////////////////////////////////
AI > HorizontalAutoSplit {
ExternalTextAI letterAI;
static ImageSurface is;
long lastUpdate;
*() {
loading { letterAI = loadWinnerTextAI(#1007131); }
setOpt(letterAI.ai, lax := true);
}
void go {
horizontalAutoSplit2_threshold = 0.3f;
L letters = horizontalAutoSplitToImages(new BWImage(image()));
new StringBuilder buf;
for (BWImage img : letters)
buf.append(letterAI.call(img.getBufferedImage()));
if (!submitCorrectly(str(buf))) {
//if (sysNow() > lastUpdate+500) {
lastUpdate = sysNow();
is = showZoomedImage_centered(is, "Horizontal Split", mergeBWImagesHorizontally(letters).toRGB());
}
}
}
AI > TryAllSplits {
ExternalTextAI letterAI;
static ImageSurface is;
long lastUpdate;
*() {
loading { letterAI = loadWinnerTextAI(#1007131); }
setOpt(letterAI.ai, lax := true);
}
void go {
int w = w(), mid = w/2;
BWImage bw = bwImage();
new Best best;
for (int splitPoint = 1; splitPoint < w; splitPoint++) {
Rect l = bwAutoCropClip(bw, new Rect(0, 0, splitPoint, h()));
Rect r = bwAutoCropClip(bw, new Rect(splitPoint, 0, w-splitPoint, h()));
S cl = letterAI.call(bw.clip(l).getBufferedImage());
float confidence = getFloat(letterAI.ai, "confidence");
S cr = letterAI.call(bw.clip(r).getBufferedImage());
confidence += getFloat(letterAI.ai, "confidence");
best.put(cl + cr, confidence);
}
submit(best.get());
}
}
//////////////////
// PUZZLE MAKER //
//////////////////
static Puzzle makePuzzle() {
S text = randomID(2);
ret new Puzzle("Enter the lowercase text you see:", renderSourceCode_1(text), text);
}