Files
ioccc/2024/burton/index.html
T
Cody Boone Ferguson 09ff59ee85 Various typos in 2024/
The following files (not all of these files were checked yet) were
modified (when mentioning README.md I also rebuilt the index.html file):

    2024/burton/README.md
    2024/endoh1/README.md
    2024/endoh1/try.sh
2025-08-08 02:57:17 -07:00

1011 lines
40 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
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>2024/burton - Prize in pentagrammatology</title>
<link rel="icon" type="image/x-icon" href="../../favicon.ico">
<meta name="description" content="2024 IOCCC entry burton - Prize in pentagrammatology">
<meta name="keywords" content="IOCCC, 2024, IOCCC 2024, IOCCC entry, burton, Prize in pentagrammatology">
</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: 2024/burton/README.md -->
<!-- -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- !!! Do not modify this web page, instead modify the file: 2024/burton/README.md !!! -->
<!-- !!! Do not modify this web page, instead modify the file: 2024/burton/README.md !!! -->
<!-- !!! Do not modify this web page, instead modify the file: 2024/burton/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>2024/burton - Prize in pentagrammatology</h2>
<h3>wordle hard mode solver</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="../../2020/yang/index.html">&larr; 2020/yang</a>
<a class="Left" href="../index.html">&uarr; 2024 &uarr;</a>
<a class="Left" href="../cable1/index.html">2024/cable1 &rarr;</a>
<a class="Right" href="https://github.com/ioccc-src/winner/blob/master/2024/burton/prog.c">C code</a>
<a class="Right" href="https://github.com/ioccc-src/winner/blob/master/2024/burton/Makefile">Makefile</a>
<a class="Right" href="#inventory">Inventory</a>
<a class="Right" href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fwww.ioccc.org%2F2024%2Fburton%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#Dave_Burton">Dave Burton</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: 2024/burton/README.md -->
<h2 id="award-presentation">Award presentation:</h2>
<p>Watch the <a href="https://www.youtube.com/@OurFavoriteUniverse">Our Favorite Universe</a>
YouTube show for this entry:</p>
<blockquote>
<p><a href="https://www.youtube.com/watch?v=PQGCfnVmmNA">IOCCC28 - 2024/burton - Prize in pentagrammatology</a></p>
</blockquote>
<h2 id="to-build">To build:</h2>
<pre><code> make all</code></pre>
<h2 id="to-use">To use:</h2>
<pre><code> ./prog dict</code></pre>
<h2 id="try">Try:</h2>
<pre><code> ./try.sh</code></pre>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>We were impressed with the algorithm, but one question remains: is there a
strategy which reduces the probability of a loss even further, at the cost of
requiring a higher average number of guesses?</p>
<h2 id="authors-remarks">Author’s remarks:</h2>
<p>This program is an assistant for solving hard-mode <a href="https://www.nytimes.com/games/wordle/index.html">Wordle(tm)</a>
(you must use any revealed hints in all subsequent guesses)
accurately/efficiently - in the fewest guesses.
The program expects lower case input in two words: <code>guess color</code>,
followed by newline.</p>
<ul>
<li><code>guess</code> is the 5 letter word you guessed,</li>
<li><code>color</code> is 5 letters from the set [g,y,b]</li>
</ul>
<p>that correspond to the colors shown in Wordle: g=green, y=yellow, b=black.</p>
<p>Start the program with a single argument, the name of a dictionary of words.
<code>/usr/share/dict/words</code> is a perfectly cromulent dictionary,
but the included file <code>dict</code> contains the 2315 target words from the original
Wordle game and consistently provides the fewest guesses.</p>
<p>As an example session, Wordle 226 has the target word <code>light</code>.
The recommended first guess (for all Wordle puzzles) is <code>blast</code>, <code>terns</code>,
or <code>crate</code> (see the <a href="extra.html">extra.html</a> that accompanies this entry for details).</p>
<p>Enter <code>terns</code> in game 226 of Wordle, and click the enter button.
The letters will turn yellow, black, black, black, black.
This assistant prompts “?”, and the input expected is the guessed word
followed by the first letters of the color revealed for that guess:</p>
<pre><code> $ ./prog dict
? terns ybbbb
loath
? loath gbbyy
light
$</code></pre>
<p>The program responds with the recommended next guess. Enter
this word <code>loath</code> into the game, which then reveals the colors
green, black, black, yellow, yellow. Typing <code>loath gbbyy</code> into
this assistant shows the solution is <code>light</code>, and exits.
Type this word into the game, click enter, and viola!
Solved in 3 guesses: terns &gt; loath &gt; light.</p>
<p>This program averages better than 4 guesses on the 1566 starting words
without duplicate letters created by <code>./dups -n &lt; dict</code>,
ranging from 3.587 to 3.997, with an overall average of 3.748 guesses.</p>
<p>This is excellent performance, and close to optimal.
See this YouTube presentation on <a href="https://www.youtube.com/watch?v=v68zYyaEmEA">solving Wordle using information theory</a>,
which shows a hard mode average of 3.562 when using <code>crane</code>
(time offset 29:58). There is a small correction video changing
<a href="https://www.youtube.com/watch?v=fRed0Xmc2Wg"><code>crane</code> to <code>salet</code>, <code>trace</code> or <code>crate</code></a>.
NB: These videos are NOT spoilers for this algorithm.</p>
<p><code>prog</code> does NOT require you to use its offered guess.
If you think you have a better guess than offered,
simply type your guess and the Wordle/<code>gen</code> responses into <code>prog</code>;
it will internally re-adjust using your input instead of its guess,
and produce what it thinks is the best next guess after your input.</p>
<h3 id="a-feature">A Feature</h3>
<p>Caution: When there are duplicate letters in the guess word,
and one of them is marked black and the other non-black,
this program MUST have the black letter marked <em>yellow</em>.
The example session (Wordle 228) below demonstrates this:</p>
<pre><code> # do NOT do this
$ ./prog dict
? terns bbbby
shoal
? shoal gggbb
shook
? shook gggbg &lt;&lt;-- this is what Wordle shows
xyzzy &lt;&lt;-- no candidate words match
# do THIS instead
$ ./prog dict
? terns bbbby
shoal
? shoal gggbb
shook
? shook gggyg &lt;&lt;-- not gggbg as shown in the game
shock
? shock ggggg
shock</code></pre>
<p>In the guess word <code>shook</code>, there are 2 ‘o’s, but only one shown valid in
the puzzle. If you mark the leftmost ’o’ as black (as according to the
Wordle game), this program cannot find the winning word (<code>shock</code>),
producing the error word <code>xyzzy</code>.</p>
<p>The included simulator <code>gen</code> produces the required transformation of b -&gt; y.</p>
<p>The extra program <code>run</code> connects <code>gen</code> and <code>prog</code>, allowing for quick tests.</p>
<pre><code> make tools
./run dict terns shock # test starting guess `terns` against target `shock`</code></pre>
<p>Using <code>run</code> allows one to quickly and easily experiment with different
starting words for different target words, seeing how the guesses progress.</p>
<p>(A late tweak to the program improved its accuracy, and in the above example,
the progression is now terns &gt; shoal &gt; shock. However, the caution remains
for any duplicate letter guesses.)</p>
<h3 id="failure-mode">Failure mode</h3>
<p>The following 4 words from the included file <code>dict</code> are not guessed correctly
within 6 guesses when using the recommended (via exhaustive testing)
starting guess of <code>blast</code>. Since this program is deterministic, these
four words always require 7 guesses when starting with <code>blast</code>, yielding
a failure rate of 4/2315, or a success rate of 99.8%.</p>
<pre><code> foyer jaunt shave wound</code></pre>
<p>Using the ancillary programs <code>run</code>, <code>exhaust</code>, and <code>mkresults</code>,
the starting word <code>blast</code> yields the fewest misses at these four words,
with an accuracy/efficiency of 3.67. See <a href="extra.html">extra.html</a>
for more detail.</p>
<p>This program also has a benefit the game Wordle does not:
Wordle allows several thousand extra words to use in guesses not in <code>dict</code>.
This program does not restrict <em>any</em> words, so one could enter any
combination of 5 letters as input, except these are unlikely to be accepted
by the Wordle game, and this program selects its words from the much more
limited set that is present in <code>dict</code>. Using an expanded dictionary like
<code>/usr/share/dict/words</code> provides a richer set of guesses, but generally
increases the average number of guesses and the failure rate.</p>
<h3 id="interesting-questions">Interesting questions</h3>
<ul>
<li><p>How are candidate words chosen?</p></li>
<li><p>How does the array of numbers relate to finding a word?</p></li>
<li><p>It is interesting to see the final stages of picking a word.
You might be interested to add observability? (Hint: <code>make tfmt</code>)
Although <code>clang-format</code> is unlikely to help you understand the code,
<code>printf</code>’s will help you understand how the “tables” are used:</p>
<p>“Show me your flowcharts and conceal your tables,
and I shall continue to by mystified;
show me your tables and I won’t usually need your flowcharts….”
– Fred Brooks</p></li>
<li><p>There is a plausible “tunable”, not exposed. It selects when to
discard certain words. What is this value, and how important is this
value in optimizing results?</p></li>
<li><p>There is a debatable “bug” in the code, but it actually <em>improves</em> the
results. Where and why?
Hint: the limit <code>for</code> a loop. ;-)</p></li>
<li><p>This solver/assistant is pretty interesting to play with, experiment with.
Can you improve it?</p></li>
</ul>
<h3 id="did-you-notice">Did you notice?</h3>
<ul>
<li>Wordle is spelled in the code several different ways, one is obscure.
If you need help, try this command (which requires <code>clang-format</code>):</li>
</ul>
<pre><code> make spoiler</code></pre>
<ul>
<li>My second favorite language is spelled out thrice in the source code.</li>
<li>Variables are mostly generic a,b,c and i,j,k,l and reused in different
scopes. Have fun!</li>
<li>The Sierpinski<a href="https://planetmath.org/sierpinskinumber">4</a> number? What in the world is a Sierpinski number?</li>
</ul>
<h3 id="time-passages-apologies-to-al-stewart">Time Passages (Apologies to Al Stewart)</h3>
<p>This code was written in mid January 2022, before the NYT purchased Wordle[tm].</p>
<p>I have since used this assistant to play the game for more than a year,
confirming my local experiments.</p>
<figure>
<img src="./2024_01_18_wordle_stats.png" alt="wordle stats" />
<figcaption aria-hidden="true">wordle stats</figcaption>
</figure>
<p>The dictionary changed in 2023! In late March 2023, I encountered the first
word not in <code>dict</code>: <code>guano</code>. In a bit of a surprise, I tried:</p>
<pre><code> blast bbgbb
reach bbgbb
piano bbggg
xyzzy</code></pre>
<p>What? The only word in <code>dict</code> ending in <code>ano</code> is <code>piano</code>. So I tried again
using <code>/usr/share/dict/words</code>:</p>
<pre><code> blast bbgbb
crane bbggb
guano ggggg</code></pre>
<p>Blending the two, the puzzle was guessed in 4 tries total:</p>
<pre><code> blast &gt; reach &gt; piano &gt; guano</code></pre>
<p>So caveat emptor: while <code>dict</code> used to be authoritative, we know some words
were deemed offensive and removed. More problematic, some words were added,
although I am presently unaware of which words. The existence proof is the
above mentioned <code>guano</code>. There are almost certainly other words missing.</p>
<p>With <code>guano</code> added to <code>dict</code>, it is guessed in 3 using <code>blast</code> as the
starting word:</p>
<pre><code> blast bbgbb
reach bbgbb
guano ggggg</code></pre>
<p>NB: <code>dict</code> has not been changed. <code>gauno</code> was NOT added to <code>dict</code>.
Adding this word changes the statistics, and thus requires a change
to all this material. It has a <em>slightly</em> negative impact, except
for it finds the word <code>guano</code>. Essentially, as you add new words
to <code>dict</code>, the permutations expand, and the scores decrease. This is
why <code>/usr/share/dict/words</code> scores worse than <code>dict</code> - and loses more often.</p>
<p>April 9, 2023, this problem repeated with the target word <code>snafu</code>.
That seems apropos.</p>
<pre><code> $ ./prog dict
blast bbgyb
share gbgbb
spank gbgyb
xyzzy
$ ./prog /usr/share/dict/words
blast bbgyb
share gbgbb
spank gbgyb
snafu ggggg</code></pre>
<p>And on June 9, 2023, again. This time, it cost nothing, and won on the
second guess.</p>
<pre><code> $ ./prog dict
blast gyygb
xyzzy
$ ./prog /usr/share/dict/words
blast gyygb
balsa ggggg</code></pre>
<p>June 19, 2023, another one wasn’t working, so time for a better dictionary:</p>
<pre><code> $ ./prog dict
blast bbybb
ramen bgbbb
vapid bgbbb
wacky bgbyb
xyzzy
# a copy of /usr/share/dict/words with five letters and no capitals:
grep &#39;^.....$&#39; /usr/share/dict/words | grep -v &#39;[A-Z]&#39; &gt; ./usdw
$ ./prog usdw
blast bbybb
redan bbbyb
campo bgbbg
wahoo bgbgg
kazoo ggggg</code></pre>
<p>As of June 19, 2023, it is known that at least these words have been added
(more are likely). Using <code>./usdw</code> as above, <code>prog</code> guesses these words in:</p>
<pre><code> guano 3
snafu 4
balsa 2
kazoo 5</code></pre>
<p>See the <a href="extra.html">extra.html</a> for more details on the program <code>run</code>:</p>
<pre><code> for n in guano snafu balsa kazoo; do
./run usdw blast $n;
done | grep good</code></pre>
<p>As of April 22, 2024, add the word <code>laser</code> in 3 guesses.</p>
<pre><code> $ ./prog usdw
blast byyyb
solea ybygy
laser ggggg</code></pre>
<p>And May 8, 2024 brings on <code>pious</code> in 4 guesses (after the failure with <code>dict</code>):</p>
<pre><code> $ prog dict
blast bbbyb
siren ygbbb
ficus bgbgg
xyzzy
$ prog usdw
? blast bbbyb
serio
? siren ygbbb
pisco
? ficus bgbgg
pious
? pious ggggg</code></pre>
<p>Notice here that the suggested word was NOT used, instead the original
guesses were used, and it found the correct answer in 4 guesses.
However, doing</p>
<pre><code> ./run usdw blast pious</code></pre>
<p>gets the answer correct in 3 guesses: blast &gt; serio &gt; pious.</p>
<p>And Sep 17, 2024 brings us the word <code>beaut</code>.</p>
<pre><code> $ prog dict
blast gbgbg
xyzzy
$ prog usdw
blast gbgbgb
beant -- not allowed, so removed beant from usdw
brant gbgbg
beaut ggggg</code></pre>
<p>Three guesses using an alternate dictionary and having to remove <code>beant</code>.
This word isn’t even a word I can find in Webster’s. I hope your version
of <code>/usr/share/dict/words</code> has more cromulent words.</p>
<p>Oct 9, 2024 brings the word <code>mommy</code>.</p>
<pre><code> $ prog dict
blast bbbbb
drone bbybb
pouch bgbbb
foggy bgbbg
$ prog usdw
blast bbbbb
drone bbybb
pouch bgbbb
foggy bgbbg
mommy ggggg</code></pre>
<p>Fortunately, the program is good enough that failing with one
dictionary still allows you to switch dictionaries and win.</p>
<p>Nov 13, 2024 brings <code>primp</code>.</p>
<pre><code> $ ./prog dict
blast bbbbb
drone bgbbb
crimp bgggg
xyzzy
$ ./prog usdw
blast bbbbb
drone bgbbb
crimp bgggg
primp ggggg</code></pre>
<p>Jan 20, 2025 brings the word <code>squid</code>.</p>
<pre><code> $ ./prog dict
blast bbbyb
siren gybbb
skimp gbybb
sushi &lt;&lt;-- last plausible word
$ ./prog usdw
blast bbbyb
siren gybbb
skimp gbybb
sushi sgbby
squid ggggg</code></pre>
<p>As of Jan 20, 2025, the ten known words not in <code>dict</code> are
(scores are using <code>usdw</code>, not <code>dict</code>, which lacks these words):</p>
<pre><code> guano 4
snafu 5
balsa 3
kazoo 4
laser 3
pious 4
beaut 3
mommy 4
primp 5
squid 4</code></pre>
<p>Feb 18, 2025 adds a word not in <code>dict</code> nor <code>usdw</code>. “indie”.</p>
<pre><code> $ ./prog dict
blast bbbbb
drone ybbyg
undue bggbg
xyzzy
$ ./prog usdw
blast bbbbb
drone ybbyg
undue bggbg
xyzzy
I grep&#39;d the dictionaries. No plausbile hits.
So I solved it the old fashioned way: I guessed.
blast bbbbb
drone ybbyg
undue bggbg
indie ggggg
This solved it in 4, but the program could not win.
So add to the summary list above:
indie 4</code></pre>
<h3 id="compilation">Compilation</h3>
<p>Compiles cleanly with <code>-Wall -Wpedantic -Wextra</code>,
on MACOS M2 Clang/GCC 14 and Linux X86 Gcc 8.5.</p>
<p>If you are using <code>-Weverything</code>,
which IMHO is exceptionally noisy about non-problems,
and given the requirements of obfuscation and layout,
there are a few <code>-Wno-</code> flags required to achieve a
quiet compilation:</p>
<pre><code> -Wno-poison-system-directories \
-Wno-missing-variable-declarations \
-Wno-shadow \
-Wno-vla \
-Wno-missing-prototypes \
-Wno-shorten-64-to-32 \
-Wno-format-nonliteral \
-Wno-implicit-int-conversion \
-Wno-declaration-after-statement \
-Wno-comma \
-Wno-array-bounds-pointer-arithmetic \
-Wno-sign-conversion</code></pre>
<p>The code uses variable length arrays, omitted the keyword <code>static</code>
for functions and global variables, and collide <code>size_t</code> with <code>int</code>
for return types. There are no pedantic prototypes for functions.
There is no misuse of the comma operator, but try getting the compiler
to ignore it. The code has been run on MacOS M2 and Linux x86 with
no failures observed. And as documented in <a href="deobfuscated.html">deobfuscated.html</a>,
pointer bounds are intentionally abused for obfuscation, but the
code is correct as documented.
This is obfuscated C, so yes, variables are intentionally shadowed.
<code>printf()</code> is also abused, passing in non-literals as the format.</p>
<p>Perhaps there is some platform out there that won’t work correctly
due to the omissions noted above, but I am unaware of these.</p>
<!--
Copyright © 1984-2025 by Landon Curt Noll and Leonid A. Broukhis. 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: 2024/burton/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-2024burton">Inventory for 2024/burton</h1>
</div>
<h2 id="primary-files">Primary files</h2>
<ul>
<li><a href="https://github.com/ioccc-src/winner/blob/master/2024/burton/prog.c">prog.c</a> - entry source code</li>
<li><a href="https://github.com/ioccc-src/winner/blob/master/2024/burton/Makefile">Makefile</a> - entry Makefile</li>
<li><a href="https://github.com/ioccc-src/winner/blob/master/2024/burton/prog.orig.c">prog.orig.c</a> - original source code</li>
<li><a href="https://github.com/ioccc-src/winner/blob/master/2024/burton/deobfuscated.html">deobfuscated.html</a> - about deobfuscation</li>
<li><a href="https://github.com/ioccc-src/winner/blob/master/2024/burton/dict">dict</a> - 5-letter wordle dictionary</li>
<li><a href="extra.html">extra.html</a> - description of the extra files</li>
<li><a href="https://github.com/ioccc-src/winner/blob/master/2024/burton/reveal.c">reveal.c</a> - reveal wordle hints</li>
<li><a href="https://github.com/ioccc-src/winner/blob/master/2024/burton/try.sh">try.sh</a> - script to try entry</li>
<li><a href="https://github.com/ioccc-src/winner/blob/master/2024/burton/deobfuscated.c">deobfuscated.c</a> - deobfuscated source code</li>
<li><a href="https://github.com/ioccc-src/winner/blob/master/2024/burton/gen.c">gen.c</a> - simulate wordle games</li>
<li><a href="https://github.com/ioccc-src/winner/blob/master/2024/burton/worst">worst</a> - determine worst target words</li>
<li><a href="https://github.com/ioccc-src/winner/blob/master/2024/burton/2024_01_18_wordle_stats.png">2024_01_18_wordle_stats.png</a> - wordle stats</li>
<li><a href="https://github.com/ioccc-src/winner/blob/master/2024/burton/avg">avg</a> - simple analysis script</li>
<li><a href="https://github.com/ioccc-src/winner/blob/master/2024/burton/comp.avg">comp.avg</a> - compute averages</li>
<li><a href="https://github.com/ioccc-src/winner/blob/master/2024/burton/dups.c">dups.c</a> - remove repeated letters</li>
<li><a href="https://github.com/ioccc-src/winner/blob/master/2024/burton/exhaust">exhaust</a> - exhaustive test of all wordle words</li>
<li><a href="https://github.com/ioccc-src/winner/blob/master/2024/burton/extra_guesses">extra_guesses</a> - allow extra wordle guesses</li>
<li><a href="https://github.com/ioccc-src/winner/blob/master/2024/burton/freq">freq</a> - letter frequency in wordle words</li>
<li><a href="https://github.com/ioccc-src/winner/blob/master/2024/burton/mkresults">mkresults</a> - report showing average word accuracy</li>
<li><a href="https://github.com/ioccc-src/winner/blob/master/2024/burton/rank">rank</a> - how averages are calculated and missed words</li>
<li><a href="https://github.com/ioccc-src/winner/blob/master/2024/burton/run.c">run.c</a> - automated testing tool</li>
<li><a href="https://github.com/ioccc-src/winner/blob/master/2024/burton/unob.c">unob.c</a> - unobfuscator tool source code</li>
<li><a href="https://github.com/ioccc-src/winner/blob/master/2024/burton/wavg">wavg</a> - weigh six scores</li>
<li><a href="https://github.com/ioccc-src/winner/blob/master/2024/burton/word.result">word.result</a> - produce results of a</li>
<li><a href="https://github.com/ioccc-src/winner/blob/master/2024/burton/wrank">wrank</a> - weighted rank tool</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a href="2024_burton.tar.bz2">2024_burton.tar.bz2</a> - download entry tarball</li>
<li><a href="https://github.com/ioccc-src/winner/blob/master/2024/burton/README.md">README.md</a> - markdown source for this web page</li>
<li><a href="https://github.com/ioccc-src/winner/blob/master/2024/burton/correct.test.abode">correct.test.abode</a> - correct test of the word abode</li>
<li><a href="https://github.com/ioccc-src/winner/blob/master/2024/burton/correct.test.jaunt">correct.test.jaunt</a> - correct test of the word jaunt</li>
<li><a href="https://github.com/ioccc-src/winner/blob/master/2024/burton/correct.test.light">correct.test.light</a> - correct test of the word light</li>
<li><a href="https://github.com/ioccc-src/winner/blob/master/2024/burton/deobfuscated.md">deobfuscated.md</a> - markdown source for deobfuscated.html</li>
<li><a href="https://github.com/ioccc-src/winner/blob/master/2024/burton/.entry.json">.entry.json</a> - entry summary and manifest in JSON</li>
<li><a href="https://github.com/ioccc-src/winner/blob/master/2024/burton/extra.md">extra.md</a> - markdown source for extra.html</li>
<li><a href="https://github.com/ioccc-src/winner/blob/master/2024/burton/.gitignore">.gitignore</a> - list of files that should not be committed under git</li>
<li><a href=".path">.path</a> - directory path from top level directory</li>
<li><a href="https://github.com/ioccc-src/winner/blob/master/2024/burton/r.blast">r.blast</a> - analysis for the word blast</li>
<li><a href="https://github.com/ioccc-src/winner/blob/master/2024/burton/r.crate">r.crate</a> - analysis for the word crate</li>
<li><a href="https://github.com/ioccc-src/winner/blob/master/2024/burton/r.query">r.query</a> - analysis for the word query</li>
<li><a href="https://github.com/ioccc-src/winner/blob/master/2024/burton/r.terns">r.terns</a> - analysis for the word terns</li>
<li><a href="https://github.com/ioccc-src/winner/blob/master/2024/burton/test.abode">test.abode</a> - analysis for the word</li>
<li><a href="https://github.com/ioccc-src/winner/blob/master/2024/burton/test.jaunt">test.jaunt</a> - analysis for the jaunt</li>
<li><a href="https://github.com/ioccc-src/winner/blob/master/2024/burton/test.light">test.light</a> - analysis for the word light</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%2F2024%2Fburton%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 -->