Files
ioccc/2011/dlowe/index.html
T
Landon Curt Noll a1c86c8a7a add original C links to entry navigation bars
The navigation bar for a winning entry now has a "_Original C_" link
(between the ✅ and the Inventory on the right hand side) so that one
may easily view the original C code that was submitted for IOCCC judging.

Ran `make www timestamp` to perform the above.
2025-08-10 12:46:23 -07:00

849 lines
42 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!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:wght@100..900&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/rules.html" class="sub-item-link">
IOCCC rules
</a>
</div>
<div class="outfit-font">
<a href="../../next/guidelines.html" class="sub-item-link">
IOCCC 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="../../quick-start.html#enter" class="sub-item-link">
Enter the IOCCC
</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="../../social.html" class="sub-item-link">
IOCCC social media
</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/rules.html">
IOCCC rules
</a>
<a class="mobile-submenu-item" href="../../next/guidelines.html">
IOCCC 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="../../quick-start.html#enter">
Enter the IOCCC
</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="../../social.html">
IOCCC social media
</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">&larr; 2011/borsanyi</a>
<a class="Left" href="../index.html">&uarr; 2011 &uarr;</a>
<a class="Left" href="../eastman/index.html">2011/eastman &rarr;</a>
<a class="Right" href="https://github.com/ioccc-src/winner/blob/master/2011/dlowe/dlowe.c">C code</a>
<a class="Right" href="https://github.com/ioccc-src/winner/blob/master/2011/dlowe/Makefile">Makefile</a>
<a class="Right" href="#inventory">Inventory</a>
<a class="Right" href="https://github.com/ioccc-src/winner/blob/master/2011/dlowe/dlowe.orig.c">Original C</a>
<a class="Right" href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fwww.ioccc.org%2F2011%2Fdlowe%2Findex.html">&#x2713;</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 -&lt;n_iterations&gt; corpus1/ [...] corpus0/ &lt; start.net &gt; 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 ...] &lt; 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/winner/blob/master/2011/dlowe/dlowe-aux-data">dlowe-aux-data</a> directory, which <a href="https://github.com/ioccc-src/winner/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/winner/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/winner/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/winner/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/winner/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/winner/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 &lt; dlowe-aux-data/ioccc-winlose-trained.net</code></pre>
<p><strong>NOTE</strong>: this is done in <a href="https://github.com/ioccc-src/winner/blob/master/2011/dlowe/try.sh">try.sh</a>.</p>
<p>The match of <a href="https://github.com/ioccc-src/winner/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/winner/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/ &lt; /dev/null &gt; dlowe-aux-data/english-trained.net</code></pre>
<ul>
<li><p><a href="https://github.com/ioccc-src/winner/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/winner/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/winner/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/ &lt; /dev/null &gt; dlowe-aux-data/png-trained.net</code></pre>
<ul>
<li><p><a href="https://github.com/ioccc-src/winner/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/winner/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/winner/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/ &lt; /dev/null &gt; dlowe-aux-data/xor-trained.net</code></pre>
<ul>
<li><p><a href="https://github.com/ioccc-src/winner/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/winner/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 ...] &lt; 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 -&lt;n_iterations&gt; corpus1/ [...] corpus0/ &lt; start.net &gt; 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&amp;sxsrf=APwXEddqIU34dxhpFdjEa8emNJKHOkYXIw:1683049158657&amp;source=hp&amp;biw=1727&amp;bih=952&amp;ei=xkpRZLapJtLKkPIP8bGKkAk&amp;iflsig=AOEireoAAAAAZFFY1nbmEUHC74Cmg3Y5rEY1fV7ocASZ&amp;ved=0ahUKEwi2pPXZltf-AhVSJUQIHfGYApIQ4dUDCAY&amp;uact=5&amp;oq=obfuscate+filetype:png&amp;gs_lcp=CgNpbWcQA1AAWABg9QNoAHAAeACAATuIATuSAQExmAEAoAECoAEBqgELZ3dzLXdpei1pbWc&amp;sclient=img&amp;q=obfuscate&amp;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&amp;ved=2ahUKEwiowo7fltf-AhXSOUQIHbJBDp8Q2-cCegQIABAA&amp;oq=obfuscate+filetype:gif&amp;gs_lcp=CgNpbWcQAzoECCMQJzoHCAAQigUQQzoFCAAQgARQ6AxY6AxgpBJoAHAAeACAAUeIAcsBkgEBM5gBAKABAaoBC2d3cy13aXotaW1nwAEB&amp;sclient=img&amp;ei=0UpRZOiVINLzkPIPsoO5-Ak&amp;bih=952&amp;biw=1727&amp;q=obfuscate&amp;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/winner/blob/master/2011/dlowe/earlystop.pl">earlystop.pl</a> script, which stopped after 67000 iterations.</li>
<li>Interpreting output of <code>&gt; 0.5</code> as “probably a <code>.png</code>” and <code>&lt; 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/winner/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&amp;lr=lang_en&amp;tbs=lr%3Alang_1en&amp;sxsrf=APwXEdeHXyUYdUxCYQQDHmJhbHzX9aARSA%3A1683049834430&amp;source=hp&amp;ei=ak1RZJHUGN_DkPIP26OtkA8&amp;iflsig=AOEireoAAAAAZFFbejA0Xfqoq__FXx--Ok0S6GQjnGnA&amp;ved=0ahUKEwiRsZOcmdf-AhXfIUQIHdtRC_IQ4dUDCAo&amp;uact=5&amp;oq=paris+filetype%3Atxt&amp;gs_lcp=Cgdnd3Mtd2l6EANQAFgAYN4DaABwAHgAgAE-iAE-kgEBMZgBAKABAqABAQ&amp;sclient=gws-wiz">paris
filetype:txt</a>”.</p>
<p>The <a href="https://github.com/ioccc-src/winner/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&amp;lr=lang_fr&amp;tbs=lr%3Alang_1fr&amp;sxsrf=APwXEddcsQ-gMhrqSUJo6omWFUl7jQMASg%3A1683049870736&amp;source=hp&amp;ei=jk1RZLevK_fKkPIPjbWN-AU&amp;iflsig=AOEireoAAAAAZFFbnvExHGkcavB5H8F0xsLAWN2KfYFK&amp;ved=0ahUKEwi3rrutmdf-AhV3JUQIHY1aA18Q4dUDCAo&amp;uact=5&amp;oq=paris+filetype%3Atxt&amp;gs_lcp=Cgdnd3Mtd2l6EANQAFgAYLMDaABwAHgAgAE-iAE-kgEBMZgBAKABAqABAQ&amp;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/winner/blob/master/2011/dlowe/earlystop.pl">earlystop.pl</a> script, which stopped after
10000 iterations;</li>
<li>Interpreting output of <code>&gt; 0.5</code> as “probably English” and <code>&lt; 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/winner/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/winner/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>&lt;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/winner/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/winner/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/winner/blob/master/2011/dlowe/dlowe.c">dlowe.c</a> - entry source code</li>
<li><a href="https://github.com/ioccc-src/winner/blob/master/2011/dlowe/Makefile">Makefile</a> - entry Makefile</li>
<li><a href="https://github.com/ioccc-src/winner/blob/master/2011/dlowe/dlowe.orig.c">dlowe.orig.c</a> - original source code</li>
<li><a href="https://github.com/ioccc-src/winner/blob/master/2011/dlowe/earlystop.pl">earlystop.pl</a> - wrapper script to stop training early</li>
<li><a href="https://github.com/ioccc-src/winner/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/winner/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/winner/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/winner/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/winner/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/winner/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/winner/blob/master/2011/dlowe/.entry.json">.entry.json</a> - entry summary and manifest in JSON</li>
<li><a href="https://github.com/ioccc-src/winner/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/winner/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-2025 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 &copy; 1984-2025 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%2Fwww.ioccc.org%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 -->