Libraryless. Click here for Pure Java version (4783L/31K/104K).
1 | !752 |
2 | |
3 | static BWImage bw; |
4 | static Thread producer; |
5 | static Reproducing rp; |
6 | |
7 | !include #1004556 // class Reproducing |
8 | |
9 | p {
|
10 | rp = new Reproducing; |
11 | bw = rp.bw = loadBWImage("#1004541");
|
12 | rp.imageSurfaceToUpdateWithBest = showImage(bw.getBufferedImage()); |
13 | |
14 | rp.startProduction = r { produce() };
|
15 | |
16 | // Note: This doesn't terminate as it keeps looking for better |
17 | // solutions. It does write the shortest100.txt file in the mean |
18 | // time which is your real output. |
19 | rp.findShortest100_openEnd(); |
20 | } |
21 | |
22 | static void produce() {
|
23 | cancelThread(producer); |
24 | producer = new Thread(r {
|
25 | // STRATEGY! |
26 | |
27 | rp.push(fullGrab(bw)); |
28 | int w = 1; |
29 | while licensed {
|
30 | rp.push(new RandomSolid().reproduce(bw)); |
31 | S best = rp.bestDesc(); |
32 | if (best != null) |
33 | rp.push(varyFloat(best)); |
34 | if (w < bw.getWidth()) |
35 | rp.push(hrepeat(bw, w++)); |
36 | } |
37 | }, "Producer"); |
38 | producer.start(); |
39 | } |
Began life as a copy of #1004551
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: | #1004557 |
| Snippet name: | Reproduce Image 5 (using include) |
| Eternal ID of this version: | #1004557/1 |
| Text MD5: | 8aabe0a55d6fce457e272060e5c28ff0 |
| Transpilation MD5: | cdfd0c4205db69fe4a84d2f9728eb71d |
| 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 15:12:18 |
| Source code size: | 949 bytes / 39 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 874 / 989 |
| Referenced in: | [show references] |