forked from ioccc-src/temp-test-ioccc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
819 lines (703 loc) · 41.8 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- START: two lines up starts content from: inc/top.default.html -->
<!-- END: this line ends content from: inc/top.default.html -->
<!-- START: this line starts content from: inc/head.default.html -->
<head>
<link rel="stylesheet" href="../../ioccc.css">
<link href="https://fonts.googleapis.com/css2?family=Outfit:[email protected]&display=swap" rel="stylesheet">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<title>2011/dlowe - Most self deprecating</title>
<link rel="icon" type="image/x-icon" href="../../favicon.ico">
<meta name="description" content="2011 IOCCC entry dlowe - Most self deprecating">
<meta name="keywords" content="IOCCC, 2011, IOCCC 2011, IOCCC entry, dlowe, Most self deprecating">
</head>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- END: this line ends content from: inc/head.default.html -->
<!-- -->
<!-- This web page was formed via the tool: bin/readme2index.sh -->
<!-- The content of main section of this web page came from: 2011/dlowe/README.md -->
<!-- -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- !!! Do not modify this web page, instead modify the file: 2011/dlowe/README.md !!! -->
<!-- !!! Do not modify this web page, instead modify the file: 2011/dlowe/README.md !!! -->
<!-- !!! Do not modify this web page, instead modify the file: 2011/dlowe/README.md !!! -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- Markdown content was converted into HTML via the tool: bin/md2html.sh -->
<!-- START: this line starts content from: inc/body.default.html -->
<body>
<!-- END: this line ends content from: inc/body.default.html -->
<!-- START: this line starts content from: inc/topbar.default.html -->
<div class="theader">
<nav class="topbar">
<div class="container">
<div class="logo">
<a href="../../index.html" class="logo-link">
IOCCC
</a>
</div>
<div class="topbar-items">
<div class="item">
<span class="item-header">
Entries
</span>
<div class="sub-item">
<div class="outfit-font">
<a href="../../years.html" class="sub-item-link">
Winning entries
</a>
</div>
<div class="outfit-font">
<a href="../../authors.html" class="sub-item-link">
Winning authors
</a>
</div>
<div class="outfit-font">
<a href="../../location.html" class="sub-item-link">
Location of authors
</a>
</div>
<div class="outfit-font">
<a href="../../bugs.html" class="sub-item-link">
Bugs and (mis)features
</a>
</div>
<div class="outfit-font">
<a href="../../faq.html#fix_an_entry" class="sub-item-link">
Fixing entries
</a>
</div>
<div class="outfit-font">
<a href="../../faq.html#fix_author" class="sub-item-link">
Updating author info
</a>
</div>
</div>
</div>
<div class="item">
<span class="item-header">
Status
</span>
<div class="sub-item">
<div class="outfit-font">
<a href="../../news.html" class="sub-item-link">
News
</a>
</div>
<div class="outfit-font">
<a href="../../status.html" class="sub-item-link">
Contest status
</a>
</div>
<div class="outfit-font">
<a href="../../next/index.html" class="sub-item-link">
Rules and guidelines
</a>
</div>
<div class="outfit-font">
<a href="../../markdown.html" class="sub-item-link">
Markdown guidelines
</a>
</div>
<div class="outfit-font">
<a href="../../SECURITY.html" class="sub-item-link">
Security policy
</a>
</div>
</div>
</div>
<div class="item">
<span class="item-header">
FAQ
</span>
<div class="sub-item">
<div class="outfit-font">
<a href="../../faq.html" class="sub-item-link">
Frequently Asked Questions
</a>
</div>
<div class="outfit-font">
<a href="../../faq.html#submit" class="sub-item-link">
How to enter
</a>
</div>
<div class="outfit-font">
<a href="../../faq.html#compiling" class="sub-item-link">
Compiling entries
</a>
</div>
<div class="outfit-font">
<a href="../../faq.html#running_entries" class="sub-item-link">
Running entries
</a>
</div>
<div class="outfit-font">
<a href="../../faq.html#help" class="sub-item-link">
How to help
</a>
</div>
</div>
</div>
<div class="item">
<span class="item-header">
About
</span>
<div class="sub-item">
<div class="outfit-font">
<a href="../../index.html" class="sub-item-link">
Home page
</a>
</div>
<div class="outfit-font">
<a href="../../about.html" class="sub-item-link">
About the IOCCC
</a>
</div>
<div class="outfit-font">
<a href="../../judges.html" class="sub-item-link">
The Judges
</a>
</div>
<div class="outfit-font">
<a href="../../thanks-for-help.html" class="sub-item-link">
Thanks for the help
</a>
</div>
<div class="outfit-font">
<a href="../../contact.html" class="sub-item-link">
Contact us
</a>
</div>
</div>
</div>
</div>
</div>
</nav>
<div class="header-mobile-menu">
<noscript>
<a href="../../nojs-menu.html" class="topbar-js-label">
Please Enable JavaScript
</a>
</noscript>
<button id="header-open-menu-button" class="topbar-mobile-menu">
<img
src="../../png/hamburger-icon-open.png"
alt="hamburger style menu icon - open state"
width=48
height=48>
</button>
<button id="header-close-menu-button" class="hide-content">
<img
src="../../png/hamburger-icon-closed.png"
alt="hamburger style menu icon - closed state"
width=48
height=48>
</button>
<div id="mobile-menu-panel" class="hide-content">
<div class="mobile-menu-container">
<div class="mobile-menu-wrapper">
<div class="mobile-menu-item">
Entries
</div>
<div class="mobile-submenu-wrapper">
<a class="mobile-submenu-item" href="../../years.html">
Winning entries
</a>
<a class="mobile-submenu-item" href="../../authors.html">
Winning authors
</a>
<a class="mobile-submenu-item" href="../../location.html">
Location of authors
</a>
<a class="mobile-submenu-item" href="../../bugs.html">
Bugs and (mis)features
</a>
<a class="mobile-submenu-item" href="../../faq.html#fix_an_entry">
Fixing entries
</a>
<a class="mobile-submenu-item" href="../../faq.html#fix_author">
Updating author info
</a>
<a class="mobile-submenu-item" href="../../thanks-for-help.html">
Thanks for the help
</a>
</div>
</div>
<div class="mobile-menu-wrapper">
<div class="mobile-menu-item">
Status
</div>
<div class="mobile-submenu-wrapper">
<a class="mobile-submenu-item" href="../../news.html">
News
</a>
<a class="mobile-submenu-item" href="../../status.html">
Contest status
</a>
<a class="mobile-submenu-item" href="../../next/index.html">
Rules and guidelines
</a>
<a class="mobile-submenu-item" href="../../markdown.html">
Markdown guidelines
</a>
<a class="mobile-submenu-item" href="../../SECURITY.html">
Security policy
</a>
</div>
</div>
<div class="mobile-menu-wrapper">
<div class="mobile-menu-item">
FAQ
</div>
<div class="mobile-submenu-wrapper">
<a class="mobile-submenu-item" href="../../faq.html">
Frequently Asked Questions
</a>
<a class="mobile-submenu-item" href="../../faq.html#submit">
How to enter
</a>
<a class="mobile-submenu-item" href="../../faq.html#compiling">
Compiling entries
</a>
<a class="mobile-submenu-item" href="../../faq.html#running_entries">
Running entries
</a>
<a class="mobile-submenu-item" href="../../faq.html#help">
How to help
</a>
</div>
</div>
<div class="mobile-menu-wrapper">
<div class="mobile-menu-item">
About
</div>
<div class="mobile-submenu-wrapper">
<a class="mobile-submenu-item" href="../../index.html">
Home page
</a>
<a class="mobile-submenu-item" href="../../about.html">
About the IOCCC
</a>
<a class="mobile-submenu-item" href="../../judges.html">
The Judges
</a>
<a class="mobile-submenu-item" href="../../contact.html">
Contact us
</a>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
var headerOpenMenuButton = document.getElementById("header-open-menu-button");
var headerCloseMenuButton = document.getElementById("header-close-menu-button");
var mobileMenuPanel = document.getElementById("mobile-menu-panel");
headerOpenMenuButton.addEventListener("click", () => {
headerOpenMenuButton.classList.remove("topbar-mobile-menu");
headerOpenMenuButton.classList.add("hide-content");
headerCloseMenuButton.classList.remove("hide-content");
headerCloseMenuButton.classList.add("topbar-mobile-menu");
mobileMenuPanel.classList.remove("hide-content");
mobileMenuPanel.classList.add("topbar-mobile-panel");
});
headerCloseMenuButton.addEventListener("click", () => {
headerCloseMenuButton.classList.remove("topbar-mobile-menu");
headerCloseMenuButton.classList.add("hide-content");
mobileMenuPanel.classList.add("hide-content");
mobileMenuPanel.classList.remove("topbar-mobile-panel");
headerOpenMenuButton.classList.add("topbar-mobile-menu");
headerOpenMenuButton.classList.remove("hide-content");
});
</script>
<!-- END: this line ends content from: inc/topbar.default.html -->
<!-- START: this line starts content from: inc/header.default.html -->
<div class="header">
<a href="../../2011/zucker/index.html">
<img src="../../png/ioccc.png"
alt="IOCCC image by Matt Zucker"
width=300
height=110>
</a>
<h1>The International Obfuscated C Code Contest</h1>
<h2>2011/dlowe - Most self deprecating</h2>
<h3>Neural network classifier</h3>
</div>
<!-- END: this line ends content from: inc/header.default.html -->
<!-- START: this line starts content from: inc/navbar.mid.html -->
<div class="navbar">
<a class="Left" href="../borsanyi/index.html">← 2011/borsanyi</a>
<a class="Left" href="../index.html">↑ 2011 ↑</a>
<a class="Left" href="../eastman/index.html">2011/eastman →</a>
<a class="Right" href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/dlowe/dlowe.c">C code</a>
<a class="Right" href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/dlowe/Makefile">Makefile</a>
<a class="Right" href="#inventory">Inventory</a>
<a class="Right" href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F2011%2Fdlowe%2Findex.html">✓</a>
</div>
<!-- END: this line ends content from: inc/navbar.mid.html -->
<!-- START: this line starts content from: inc/before-content.default.html -->
<div class="content" id="content">
<!-- END: this line ends content from: inc/before-content.default.html -->
<!-- START: this line starts content for HTML phase 20 by: bin/output-index-author.sh via bin/md2html.sh -->
<!-- START: this line starts content generated by: bin/output-index-author.sh -->
<h2 id="author">Author:</h2>
<ul>
<li>Name: <a href="../../authors.html#J_David_Lowe">J. David Lowe</a><br>
Location: <a href="../../location.html#US">US</a> - <em>United States of America</em> (<em>United States</em>)</li>
</ul>
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
<!-- END: this line ends content for HTML phase 20 by: bin/output-index-author.sh via bin/md2html.sh -->
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
<!-- BEFORE: 1st line of markdown file: 2011/dlowe/README.md -->
<h2 id="to-build">To build:</h2>
<pre><code> make</code></pre>
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
<p>The current status of this entry is:</p>
<blockquote>
<p><strong>STATUS: missing or dead link or links - please provide it or them</strong><br>
<strong>STATUS: INABIAF - please DO NOT fix</strong></p>
</blockquote>
<p>For more detailed information see <a href="../../bugs.html#2011_dlowe">2011/dlowe in bugs.html</a>.</p>
<h2 id="to-use">To use:</h2>
<pre><code> ./dlowe -<n_iterations> corpus1/ [...] corpus0/ < start.net > trained.net</code></pre>
<p><strong>NOTE</strong>: In the above command, the directory args MUST end in a <code>/</code>.</p>
<p>Then to use <code>trained.net</code>:</p>
<pre><code> ./dlowe file [file ...] < trained.net</code></pre>
<h2 id="try">Try:</h2>
<p>Try these pre-trained networks:</p>
<pre><code> ./try.sh</code></pre>
<p><strong>NOTE</strong>: The <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/dlowe/dlowe-aux-data">dlowe-aux-data</a> directory, which <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/dlowe/try.sh">try.sh</a> refers to, was
created by:</p>
<pre><code> tar -jxf dlowe-aux-data.tar.bz2</code></pre>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>This entry is a ghoulish example of a brain (dead?) neural network classifier.
It comes with a set of corpora for you to try.</p>
<h3 id="ioccc-winlose-trained.net"><code>ioccc-winlose-trained.net</code></h3>
<p>You can create your own trained networks. For example, we trained a network
on the C code of entries that were supplied to the 20Th IOCCC.</p>
<p>The <code>ioccc-winlose-trained.net</code> was trained using the
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/dlowe/earlystop.pl">earlystop.pl</a> tool:</p>
<pre><code> rm -f ioccc-winlose-trained.net
./earlystop.pl ioccc-winlose-trained.net ioccc_won_training/ ioccc_lost_training/ ioccc_won_test/ ioccc_lost_test/</code></pre>
<p>where:</p>
<ul>
<li><p><code>ioccc_won_training/</code>
1/2 of C code of the 20th IOCCC entries (except for <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/dlowe/dlowe.c">dlowe.c</a> from 2011)
plus 1/2 of the C code winning entries from prior IOCCC contests</p></li>
<li><p><code>ioccc_won_test/</code>
1/2 of C code of the 20th IOCCC entries (except for <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/dlowe/dlowe.c">dlowe.c</a> from 2011)
plus 1/2 of the C code winning entries from prior IOCCC contests</p></li>
<li><p><code>ioccc_lost_training/</code>
1/2 of C code from entries that that did not win</p></li>
<li><p><code>ioccc_lost_test/</code>
1/2 of C code from entries that that did not win</p></li>
</ul>
<p><strong>NOTE</strong>: The above directories were not shipped and everything from the entries
that did not win were flushed to <code>/dev/null</code>.</p>
<p>The <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/dlowe/earlystop.pl">earlystop.pl</a> tool wrote:</p>
<pre><code> training 1 to 1001...
training 1001 to 2001...
prior error = 56.746974766043; current error = 58.095691135305</code></pre>
<p>The resulting <code>ioccc-winlose-trained.net</code> file was included in the
<a href="dlowe-aux-data.tar.bz2">dlowe-aux-data.tar.bz2</a> tarball.</p>
<p>The <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/dlowe/dlowe.c">dlowe.c</a> was explicitly excluded from this trailing set, so this
test is interesting:</p>
<pre><code> ./dlowe dlowe.c < dlowe-aux-data/ioccc-winlose-trained.net</code></pre>
<p><strong>NOTE</strong>: this is done in <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/dlowe/try.sh">try.sh</a>.</p>
<p>The match of <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/dlowe/dlowe.c">dlowe.c</a> to the lose/win trailed network was:</p>
<pre><code> dlowe.c 0.125108</code></pre>
<p><strong>NOTE</strong>: The non-artificially intelligent decisions of the IOCCC judges include random
quirks and their non-linear judgment calls not found in the ioccc trained network.
Just because C code is or isn’t scored highly by this network does not
mean it will win or lose a future IOCCC. On the other hand … it just might!</p>
<h4 id="other-data-sets-to-try">other data sets to try</h4>
<p>While we cannot supply you with the losing IOCCC source code, the author did supply a number
data sets on which to test:</p>
<p>We created the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/dlowe/dlowe-aux-data/english-trained.net">english-trained.net</a> as follows:</p>
<pre><code> ./dlowe -8000 dlowe-aux-data/english-1/ dlowe-aux-data/english-0/ < /dev/null > dlowe-aux-data/english-trained.net</code></pre>
<ul>
<li><p><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/dlowe/dlowe-aux-data/english-0">dlowe-aux-data/english-0/</a>
Non-English (French) text</p></li>
<li><p><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/dlowe/dlowe-aux-data/english-1">dlowe-aux-data/english-1/</a>
English (non-French) text</p></li>
</ul>
<p>We created the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/dlowe/dlowe-aux-data/png-trained.net">png-trained.net</a> as follows:</p>
<pre><code> ./dlowe -8000 png-1/ png-0/ < /dev/null > dlowe-aux-data/png-trained.net</code></pre>
<ul>
<li><p><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/dlowe/dlowe-aux-data/png-0">dlowe-aux-data/png-0/</a>
Non-png (gif) images</p></li>
<li><p><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/dlowe/dlowe-aux-data/png-1">dlowe-aux-data/png-1/</a>
png (non-gif) images</p></li>
</ul>
<p>We created the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/dlowe/dlowe-aux-data/xor-trained.net">xor-trained.net</a> as follows:</p>
<pre><code> ./dlowe -8000 dlowe-aux-data/xor-1/ dlowe-aux-data/xor-0/ < /dev/null > dlowe-aux-data/xor-trained.net</code></pre>
<ul>
<li><p><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/dlowe/dlowe-aux-data/xor-0">dlowe-aux-data/xor-0</a>
Data that XORs to 0</p></li>
<li><p><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/dlowe/dlowe-aux-data/xor-1">dlowe-aux-data/xor-1/</a>
Data that XORs to 1</p></li>
</ul>
<p><strong>NOTE</strong>: The directory args <strong>must end in a</strong> <code>/</code> for them to work.</p>
<h2 id="authors-remarks">Author’s remarks:</h2>
<h3 id="synopsis">Synopsis</h3>
<p>This is an <a href="https://en.wikipedia.org/wiki/Artificial_intelligence">artificially
intelligent</a> judging tool
to help the IOCCC judges. Here’s to shorter, more frequent contests!</p>
<h3 id="description">Description</h3>
<p>This is a multilayer <a href="https://en.wikipedia.org/wiki/Perceptron">perceptron</a>, a
<a href="https://en.wikipedia.org/wiki/Feedforward_neural_network">feedforward artificial neural
network</a>,
which can be trained, using on-line
<a href="https://en.wikipedia.org/wiki/Backpropagation">backpropagation</a>, to classify input files.</p>
<p>It has a fixed topology of <code>2^16</code> input neurons, 6 hidden neurons and 1 output
neuron.</p>
<p>The neurons’ activation function is the logistic function <code>1 / (1 + e ^ -x)</code>.</p>
<h3 id="classifying">Classifying</h3>
<pre><code> ./dlowe file [file ...] < trained.net</code></pre>
<p>To classify files, one specifies a trained network (on <code>stdin</code>) and one or more
files to classify. The program will output one line per successfully-classified
file to <code>stderr</code>, with the filename and the classification: a number between 0
and 1.</p>
<p>The interpretation of the classification number depends on how the network was
trained, but it’s geared toward interpretation as a <em>probability</em> or a
<em>confidence</em>.</p>
<h3 id="training">Training</h3>
<pre><code> ./dlowe -<n_iterations> corpus1/ [...] corpus0/ < start.net > end.net</code></pre>
<p><strong>NOTE</strong>: The directory args <strong>must end in a</strong> <code>/</code> for them to work.</p>
<p>To train a network, one specifies a starting network (on <code>stdin</code>), two or more
corpora (directories containing training data), and the number of training
iterations to run. The program will write some progress data to <code>stderr</code> and,
when it’s done, will serialize the updated network to <code>stdout</code>.</p>
<p>If no input network is given, a random new network will be generated as a
starting point (i.e. provide an empty <code>stdin</code>).</p>
<p>The first corpus will be assigned a target value of <code>1</code>. The last will be
assigned a target value of <code>0</code>. Intervening directories (if any) will be assigned
intermediate target values.</p>
<p>The learning rate is hard-coded as <code>0.3</code>. No momentum factor is used.</p>
<h4 id="png-corpora">png corpora</h4>
<p>The <code>dlowe-aux-data/png-1</code> corpus was obtained by manually scraping the first results from an
<a href="https://images.google.com" class="uri">https://images.google.com</a> search for “<a href="https://www.google.com/search?tbm=isch&sxsrf=APwXEddqIU34dxhpFdjEa8emNJKHOkYXIw:1683049158657&source=hp&biw=1727&bih=952&ei=xkpRZLapJtLKkPIP8bGKkAk&iflsig=AOEireoAAAAAZFFY1nbmEUHC74Cmg3Y5rEY1fV7ocASZ&ved=0ahUKEwi2pPXZltf-AhVSJUQIHfGYApIQ4dUDCAY&uact=5&oq=obfuscate+filetype:png&gs_lcp=CgNpbWcQA1AAWABg9QNoAHAAeACAATuIATuSAQExmAEAoAECoAEBqgELZ3dzLXdpei1pbWc&sclient=img&q=obfuscate&tbs=ift:png">obfuscate
filetype:png</a>”.</p>
<p>The <code>dlowe-aux-data/png-0</code> corpus was obtained by manually scraping the first results from an
<a href="https://images.google.com" class="uri">https://images.google.com</a> search for “<a href="https://www.google.com/search?tbm=isch&ved=2ahUKEwiowo7fltf-AhXSOUQIHbJBDp8Q2-cCegQIABAA&oq=obfuscate+filetype:gif&gs_lcp=CgNpbWcQAzoECCMQJzoHCAAQigUQQzoFCAAQgARQ6AxY6AxgpBJoAHAAeACAAUeIAcsBkgEBM5gBAKABAaoBC2d3cy13aXotaW1nwAEB&sclient=img&ei=0UpRZOiVINLzkPIPsoO5-Ak&bih=952&biw=1727&q=obfuscate&tbs=ift:gif">obfuscate
filetype:gif</a>”.</p>
<h5 id="results">Results:</h5>
<ul>
<li>Using these corpora as a training set;</li>
<li>Using several hundred random <code>*.gif</code> and <code>*.png</code> files from my home computer as
a test set;</li>
<li>Using the included <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/dlowe/earlystop.pl">earlystop.pl</a> script, which stopped after 67000 iterations.</li>
<li>Interpreting output of <code>> 0.5</code> as “probably a <code>.png</code>” and <code>< 0.5</code> as “probably
a <code>.gif</code>”</li>
</ul>
<p>produced a network with about 87% accuracy</p>
<h4 id="english-corpora">English corpora</h4>
<p>The <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/dlowe/dlowe-aux-data/english-1">english-1</a> corpus was obtained by manually scraping the first results from
a <a href="https://www.google.com/webhp?lr=lang_en" class="uri">https://www.google.com/webhp?lr=lang_en</a> search for “<a href="https://www.google.com/search?q=paris+filetype%3Atxt&lr=lang_en&tbs=lr%3Alang_1en&sxsrf=APwXEdeHXyUYdUxCYQQDHmJhbHzX9aARSA%3A1683049834430&source=hp&ei=ak1RZJHUGN_DkPIP26OtkA8&iflsig=AOEireoAAAAAZFFbejA0Xfqoq__FXx--Ok0S6GQjnGnA&ved=0ahUKEwiRsZOcmdf-AhXfIUQIHdtRC_IQ4dUDCAo&uact=5&oq=paris+filetype%3Atxt&gs_lcp=Cgdnd3Mtd2l6EANQAFgAYN4DaABwAHgAgAE-iAE-kgEBMZgBAKABAqABAQ&sclient=gws-wiz">paris
filetype:txt</a>”.</p>
<p>The <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/dlowe/dlowe-aux-data/english-0">english-0</a> corpus was obtained by manually scraping the first results from
a <a href="https://www.google.com/webhp?lr=lang_fr" class="uri">https://www.google.com/webhp?lr=lang_fr</a> search for “<a href="https://www.google.com/search?q=paris+filetype%3Atxt&lr=lang_fr&tbs=lr%3Alang_1fr&sxsrf=APwXEddcsQ-gMhrqSUJo6omWFUl7jQMASg%3A1683049870736&source=hp&ei=jk1RZLevK_fKkPIPjbWN-AU&iflsig=AOEireoAAAAAZFFbnvExHGkcavB5H8F0xsLAWN2KfYFK&ved=0ahUKEwi3rrutmdf-AhV3JUQIHY1aA18Q4dUDCAo&uact=5&oq=paris+filetype%3Atxt&gs_lcp=Cgdnd3Mtd2l6EANQAFgAYLMDaABwAHgAgAE-iAE-kgEBMZgBAKABAqABAQ&sclient=gws-wiz">paris
filetype:txt</a>”.</p>
<h5 id="results-1">Results:</h5>
<ul>
<li>Using these corpora as a training set;</li>
<li>Using several dozen additional text files (obtained by the same methods) as a
test set;</li>
<li>Using the included <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/dlowe/earlystop.pl">earlystop.pl</a> script, which stopped after
10000 iterations;</li>
<li>Interpreting output of <code>> 0.5</code> as “probably English” and <code>< 0.5</code> as “probably
French”</li>
</ul>
<p>produced a network with 100% accuracy.</p>
<h3 id="xor-corpora">xor corpora</h3>
<p>The <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/dlowe/dlowe-aux-data/xor-1">xor-1</a> corpus consists of two files containing <code>01</code>
and <code>10</code> respectively.</p>
<p>The <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/dlowe/dlowe-aux-data/xor-0">xor-0</a> corpus consists of two files containing <code>00</code>
and <code>11</code> respectively.</p>
<h5 id="results-2">Results:</h5>
<p>Using these corpora as a training set takes about 8000 iterations to learn xor
to within a tolerance of <code><0.01</code>.</p>
<h3 id="limitations">Limitations</h3>
<p>The program can’t tell you anything meaningful about files with less than two
bytes in them (I’m looking at you, <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/smr/smr.c">smr.c</a>!)</p>
<p>You must include the trailing directory separator on training directories
(this allows the program to be portable without wasting precious bytes on
figuring out how to concatenate directory and file names…).</p>
<p>Serialized network files are only portable between systems with the same
<a href="https://en.wikipedia.org/wiki/Floating-point_arithmetic">floating-point</a>
representation and <a href="https://en.wikipedia.org/wiki/Endianness">endianness</a>.</p>
<p>Making sure not to
<a href="https://en.wikipedia.org/wiki/Overfitting#Machine_learning">overfit</a> the network to the training data is a bit of a
black art. I have enclosed <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/dlowe/earlystop.pl">earlystop.pl</a>, a wrapper script that implements
a simple ‘early stopping’ algorithm; other techniques are possible.</p>
<p>Bad input (e.g. nonexistent files, non-numeric number of iterations, etc.)
tends to result in empty output.</p>
<p>Given exactly one corpus, the program will crash or produce garbage.</p>
<p>Leaks memory and file descriptors while processing files.</p>
<p>Will crash and die horribly if it runs out of memory.</p>
<p>The Microsoft C compiler doesn’t provide a <code>dirent</code> API, so to get this working
on a Windows system you’ll need cygwin+gcc (tested) or a <code>dirent</code> compatibility
library (untested, but they do exist).</p>
<p>Backpropagation doesn’t always converge: if you play with this long enough,
you’ll eventually have a training session that completely fails to converge.</p>
<h3 id="obfuscation">Obfuscation</h3>
<ul>
<li><a href="https://en.wikipedia.org/wiki/Zombie">Zombies</a>! (Since neural networks are
modeled after <a href="https://en.wikipedia.org/wiki/Brain">BRAINS</a>, ya know? And
corpus sounds a lot like corpse. And I have 4- and 7-year-old kids ;) )</li>
<li>Neural networks are interesting, and while the math isn’t terribly difficult,
their behavior is difficult to fully understand.</li>
<li>Had some extra space in one of the major data structures, and it seemed a
shame to waste it.</li>
<li>Similarly, I think three file pointers ought to be enough for anyone.</li>
<li>Lots of magic numbers expressed in various ways.</li>
<li>Random abuse of random C trivia.</li>
<li>Some textual changes were made to maximize the classification of this program
by a network trained to recognize <a href="../../authors.html">IOCCC entries</a> ;)</li>
</ul>
<p>… but mostly zombies!</p>
<!--
Copyright © 1984-2024 by Landon Curt Noll. All Rights Reserved.
You are free to share and adapt this file under the terms of this license:
Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
For more information, see:
https://creativecommons.org/licenses/by-sa/4.0/
-->
<!-- AFTER: last line of markdown file: 2011/dlowe/README.md -->
<!-- END: this line ends content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
<!-- START: this line starts content for HTML phase 22 by: bin/output-index-inventory.sh via bin/md2html.sh -->
<!-- START: this line starts content generated by: bin/output-index-inventory.sh -->
<div id="inventory">
<h1 id="inventory-for-2011dlowe">Inventory for 2011/dlowe</h1>
</div>
<h2 id="primary-files">Primary files</h2>
<ul>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/dlowe/dlowe.c">dlowe.c</a> - entry source code</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/dlowe/Makefile">Makefile</a> - entry Makefile</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/dlowe/dlowe.orig.c">dlowe.orig.c</a> - original source code</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/dlowe/earlystop.pl">earlystop.pl</a> - wrapper script to stop training early</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/dlowe/try.sh">try.sh</a> - script to try entry</li>
<li><a href="dlowe-aux-data/png-0/5756029-DMZ-overview-B.gif">dlowe-aux-data/png-0/5756029-DMZ-overview-B.gif</a> - Non-png gif images</li>
<li><a href="dlowe-aux-data/png-0/M2.gif">dlowe-aux-data/png-0/M2.gif</a> - Non-png gif images</li>
<li><a href="dlowe-aux-data/png-0/Obfuscate.gif">dlowe-aux-data/png-0/Obfuscate.gif</a> - Non-png gif images</li>
<li><a href="dlowe-aux-data/png-0/figure_49.gif">dlowe-aux-data/png-0/figure_49.gif</a> - Non-png gif images</li>
<li><a href="dlowe-aux-data/png-0/klockhuset.gif">dlowe-aux-data/png-0/klockhuset.gif</a> - Non-png gif images</li>
<li><a href="dlowe-aux-data/png-0/obfuscate_1.gif">dlowe-aux-data/png-0/obfuscate_1.gif</a> - Non-png gif images</li>
<li><a href="dlowe-aux-data/png-0/podcastimage_150215.gif">dlowe-aux-data/png-0/podcastimage_150215.gif</a> - Non-png gif images</li>
<li><a href="dlowe-aux-data/png-0/prjman1.gif">dlowe-aux-data/png-0/prjman1.gif</a> - Non-png gif images</li>
<li><a href="dlowe-aux-data/png-0/proguard_obfuscate.gif">dlowe-aux-data/png-0/proguard_obfuscate.gif</a> - Non-png gif images</li>
<li><a href="dlowe-aux-data/png-0/scripts_encryptor__screnc_-31918.gif">dlowe-aux-data/png-0/scripts_encryptor_<em>screnc</em>-31918.gif</a> - Non-png gif images</li>
<li><a href="dlowe-aux-data/png-0/visual_panel.gif">dlowe-aux-data/png-0/visual_panel.gif</a> - Non-png gif images</li>
<li><a href="dlowe-aux-data/english-0/040604.txt">dlowe-aux-data/english-0/040604.txt</a> - training text for neural networks</li>
<li><a href="dlowe-aux-data/english-0/2001-2002.txt">dlowe-aux-data/english-0/2001-2002.txt</a> - training text for neural networks</li>
<li><a href="dlowe-aux-data/english-0/CFP_TSI_Graphes_appel.txt">dlowe-aux-data/english-0/CFP_TSI_Graphes_appel.txt</a> - training text for neural networks</li>
<li><a href="dlowe-aux-data/english-0/CIR_APE_08_doc.txt">dlowe-aux-data/english-0/CIR_APE_08_doc.txt</a> - training text for neural networks</li>
<li><a href="dlowe-aux-data/english-0/admin_fr.txt">dlowe-aux-data/english-0/admin_fr.txt</a> - training text for neural networks</li>
<li><a href="dlowe-aux-data/english-0/agenda.txt">dlowe-aux-data/english-0/agenda.txt</a> - training text for neural networks</li>
<li><a href="dlowe-aux-data/english-0/paris2.txt">dlowe-aux-data/english-0/paris2.txt</a> - training text for neural networks</li>
<li><a href="dlowe-aux-data/english-0/paris.txt">dlowe-aux-data/english-0/paris.txt</a> - training text for neural networks</li>
<li><a href="dlowe-aux-data/english-0/structures3D-Paris.txt">dlowe-aux-data/english-0/structures3D-Paris.txt</a> - training text for neural networks</li>
<li><a href="dlowe-aux-data/english-1/02-chronology.txt">dlowe-aux-data/english-1/02-chronology.txt</a> - training text for neural networks</li>
<li><a href="dlowe-aux-data/english-1/36C215.txt">dlowe-aux-data/english-1/36C215.txt</a> - training text for neural networks</li>
<li><a href="dlowe-aux-data/english-1/Wireless_Days_2011_CFP.txt">dlowe-aux-data/english-1/Wireless_Days_2011_CFP.txt</a> - training text for neural networks</li>
<li><a href="dlowe-aux-data/english-1/cpb.txt">dlowe-aux-data/english-1/cpb.txt</a> - training text for neural networks</li>
<li><a href="dlowe-aux-data/english-1/get-there.txt">dlowe-aux-data/english-1/get-there.txt</a> - training text for neural networks</li>
<li><a href="dlowe-aux-data/english-1/pa_fv010.txt">dlowe-aux-data/english-1/pa_fv010.txt</a> - training text for neural networks</li>
<li><a href="dlowe-aux-data/english-1/the_poor_people_of_paris.txt">dlowe-aux-data/english-1/the_poor_people_of_paris.txt</a> - training text for neural networks</li>
<li><a href="dlowe-aux-data/english-1/utmost.txt">dlowe-aux-data/english-1/utmost.txt</a> - training text for neural networks</li>
<li><a href="dlowe-aux-data/english-1/walljpar.txt">dlowe-aux-data/english-1/walljpar.txt</a> - training text for neural networks</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/dlowe/dlowe-aux-data/xor-0/00">dlowe-aux-data/xor-0/00</a> - training digits for neural networks</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/dlowe/dlowe-aux-data/xor-0/11">dlowe-aux-data/xor-0/11</a> - training digits for neural networks</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/dlowe/dlowe-aux-data/xor-1/01">dlowe-aux-data/xor-1/01</a> - training digits for neural networks</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/dlowe/dlowe-aux-data/xor-1/10">dlowe-aux-data/xor-1/10</a> - training digits for neural networks</li>
<li><a href="dlowe-aux-data/png-1/JavaScript-obfuscation-code.png">dlowe-aux-data/png-1/JavaScript-obfuscation-code.png</a> - training image for neural networks</li>
<li><a href="dlowe-aux-data/png-1/control_flow_obfuscation_before.png">dlowe-aux-data/png-1/control_flow_obfuscation_before.png</a> - training image for neural networks</li>
<li><a href="dlowe-aux-data/png-1/deceive-inveigle-obfuscate-t-shirts.png">dlowe-aux-data/png-1/deceive-inveigle-obfuscate-t-shirts.png</a> - training image for neural networks</li>
<li><a href="dlowe-aux-data/png-1/help_obfuscation1.png">dlowe-aux-data/png-1/help_obfuscation1.png</a> - training image for neural networks</li>
<li><a href="dlowe-aux-data/png-1/image_thumb.png">dlowe-aux-data/png-1/image_thumb.png</a> - training image for neural networks</li>
<li><a href="dlowe-aux-data/png-1/jquery_after_deobfuscation.png">dlowe-aux-data/png-1/jquery_after_deobfuscation.png</a> - training image for neural networks</li>
<li><a href="dlowe-aux-data/png-1/obfuscate4e.png">dlowe-aux-data/png-1/obfuscate4e.png</a> - training image for neural networks</li>
<li><a href="dlowe-aux-data/png-1/obfuscation-decoder.png">dlowe-aux-data/png-1/obfuscation-decoder.png</a> - training image for neural networks</li>
<li><a href="dlowe-aux-data/png-1/obfuscation_methods.png">dlowe-aux-data/png-1/obfuscation_methods.png</a> - training image for neural networks</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a href="2011_dlowe.tar.bz2">2011_dlowe.tar.bz2</a> - download entry tarball</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/dlowe/README.md">README.md</a> - markdown source for this web page</li>
<li><a href="dlowe-aux-data/english-trained.net">dlowe-aux-data/english-trained.net</a> - trained neural network for English text</li>
<li><a href="dlowe-aux-data/ioccc-winlose-trained.net">dlowe-aux-data/ioccc-winlose-trained.net</a> - trained neural network for C code from 20th IOCCC</li>
<li><a href="dlowe-aux-data/png-trained.net">dlowe-aux-data/png-trained.net</a> - trained neural network for png-0 and png-1 images</li>
<li><a href="dlowe-aux-data.tar.bz2">dlowe-aux-data.tar.bz2</a> - tarball of IOCCC win lose trained network</li>
<li><a href="dlowe-aux-data/xor-trained.net">dlowe-aux-data/xor-trained.net</a> - trained neural network for xor-0 and xor-1 data</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/dlowe/.entry.json">.entry.json</a> - entry summary and manifest in JSON</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/dlowe/.gitignore">.gitignore</a> - list of files that should not be committed under git</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/dlowe/.path">.path</a> - directory path from top level directory</li>
<li><a href="index.html">index.html</a> - this web page</li>
</ul>
<hr style="width:10%;text-align:left;margin-left:0">
<h4>
Jump to: <a href="#">top</a>
</h4>
<!-- END: next line ends content generated by: bin/output-index-inventory.sh -->
<!-- END: this line ends content for HTML phase 22 by: bin/output-index-inventory.sh via bin/md2html.sh -->
<!-- START: this line starts content from: inc/after-content.default.html -->
</div>
<!-- END: this line ends content from: inc/after-content.default.html -->
<!-- START: this line starts content from: inc/footer.inventory.html -->
<!--
Copyright © 1984-2024 by Landon Curt Noll. All Rights Reserved.
You are free to share and adapt this file under the terms of this license:
Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
For more information, see:
https://creativecommons.org/licenses/by-sa/4.0/
-->
<div class="footer">
<div id="copyright"><h3>Copyright © 1984-2024 by Landon Curt Noll:
<a href="https://creativecommons.org/faq/#what-does-some-rights-reserved-mean"
target="_blank"
rel="license noopener noreferrer">Some Rights Reserved</a></h3>
<p>
This work is <b>licensed by Landon Curt Noll</b> under
<b><a href="https://creativecommons.org/licenses/by-sa/4.0/?ref=chooser-v1"
target="_blank"
rel="license noopener noreferrer"
style="display:inline-block;">CC BY-SA 4.0</a></b>.
<img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;"
src="../../png/cc.png"
alt="cc inside circle symbol">
<img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;"
src="../../png/by.png"
alt="person inside circle symbol">
<img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;"
src="../../png/sa.png"
alt="arrow looping back on itself inside circle symbol"><br>
You should <b>carefully review</b> the
<b><a href="https://creativecommons.org/licenses/by-sa/4.0/legalcode.en"
target="_blank"
rel="license noopener noreferrer">CC BY-SA 4.0 LEGAL CODE</a></b>
before using the licensed material.<br>
You may wish to review the
<b><a href="../../license.html"
target="_blank"
rel="license noopener noreferrer">highlights of some of the key features and terms</a></b>
of <b>CC BY-SA 4.0</b>.<br>
</p>
</div>
<div id="coda"><h3>Coda</h3>
<p>
<a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F2011%2Fdlowe%2Findex.html" rel="nofollow">Nu HTML check this web page</a><br>
<a href="#top">Jump to top</a> <a href="#content">Jump to Content</a> <a href="#inventory">Jump to Inventory</a><br>
</p>
</div>
</div>
<!-- END: this line ends content from: inc/footer.inventory.html -->
<!-- START: this line starts content from: inc/bottom.default.html -->
</body>
</html>
<!-- END: this line ends content from: inc/bottom.default.html -->