Libraryless. Click here for Pure Java version (4655L/30K/101K).
1 | !752 |
2 | |
3 | static BWImage bw; |
4 | static Thread producer; |
5 | static Reproducing rp; |
6 | static ImageSurface imageSurface; |
7 | |
8 | !include #1004562 // column prediction |
9 | !include #1004570 // predictors |
10 | |
11 | p {
|
12 | rp = new Reproducing; |
13 | //bw = loadBWImage("#1004541");
|
14 | //bw = makeTriangle(); |
15 | Font font = loadFont("#1004569"); // "Ticketing"
|
16 | bw = new BWImage(renderText(font, 20f, "ABC 123 + 456 = 789")); |
17 | imageSurface = showBWImage(bw); |
18 | rp.bw = bw; |
19 | //rp.imageSurfaceToUpdateWithBest = showImage(bw.getBufferedImage()); |
20 | |
21 | //rp.startProduction = r { produce() };
|
22 | //rp.search(); |
23 | |
24 | //showColumnErrors("LookLeft(width=8)");
|
25 | |
26 | produce(); |
27 | while licensed {
|
28 | S desc = grabFromQueue(rp.newProducts); |
29 | Predictor p = makePredictor(desc); |
30 | float[][] cols = rp.getCols(); |
31 | double score = testColumnRange(p, cols, 0, 15, l(cols)); |
32 | print(desc); |
33 | print(" " + score);
|
34 | //imageSurface.setImage(renderPrediction(desc, cols)); |
35 | } |
36 | } |
37 | |
38 | static void produce() {
|
39 | cancelThread(producer); |
40 | producer = new Thread(r {
|
41 | // STRATEGY! |
42 | |
43 | rp.push("RepeatColumn");
|
44 | rp.push("ShiftDown");
|
45 | rp.push("LookLeft(width=7)");
|
46 | rp.push("LookLeft(width=8)");
|
47 | rp.push("LookLeft(width=9)");
|
48 | rp.push("LookLeft(width=10)");
|
49 | }, "Producer"); |
50 | producer.start(); |
51 | } |
Began life as a copy of #1004563
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1004567 |
| Snippet name: | Try Column Prediction 2 (with actual text) |
| Eternal ID of this version: | #1004567/1 |
| Text MD5: | 63e9d4fefe56d26651a8d301dab3d877 |
| Transpilation MD5: | 0edcda68a025bbe30d4f061f3d94312f |
| Author: | stefan |
| Category: | javax / a.i. |
| Type: | JavaX source code |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2016-08-21 17:09:59 |
| Source code size: | 1314 bytes / 51 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 843 / 1005 |
| Referenced in: | [show references] |