<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Max Fierro</title><link>https://www.maxfierro.me/</link><description>Recent content on Max Fierro</description><generator>Hugo -- gohugo.io</generator><language>en-US</language><lastBuildDate>Tue, 30 Dec 2025 00:00:00 +0000</lastBuildDate><atom:link href="https://www.maxfierro.me/index.xml" rel="self" type="application/rss+xml"/><item><title>Poem 13. "Carlos"</title><link>https://www.maxfierro.me/poem-13.-carlos/</link><pubDate>Sun, 28 Dec 2025 00:00:00 +0000</pubDate><guid>https://www.maxfierro.me/poem-13.-carlos/</guid><description>&lt;p>Dedicated to my dear friend, Carlos Rodríguez.&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt"> 1
&lt;/span>&lt;span class="lnt"> 2
&lt;/span>&lt;span class="lnt"> 3
&lt;/span>&lt;span class="lnt"> 4
&lt;/span>&lt;span class="lnt"> 5
&lt;/span>&lt;span class="lnt"> 6
&lt;/span>&lt;span class="lnt"> 7
&lt;/span>&lt;span class="lnt"> 8
&lt;/span>&lt;span class="lnt"> 9
&lt;/span>&lt;span class="lnt">10
&lt;/span>&lt;span class="lnt">11
&lt;/span>&lt;span class="lnt">12
&lt;/span>&lt;span class="lnt">13
&lt;/span>&lt;span class="lnt">14
&lt;/span>&lt;span class="lnt">15
&lt;/span>&lt;span class="lnt">16
&lt;/span>&lt;span class="lnt">17
&lt;/span>&lt;span class="lnt">18
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-text" data-lang="text">&lt;span class="line">&lt;span class="cl">piedra angular sin esquinas
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">tu videncia es abundante
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> y de color azul:
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">en tierras lejanas desmigajaste
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">la esencia de un reino podrido;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> eres cierto, tenaz,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> y súmamente nítido:
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">a cuero y tezontle, vital como la ceiba
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> hundes raíces por donde vas pisando:
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">tuerces los manantiales enterrados
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> de agua que mana por tu mente,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> y que es de color azul:
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">contra el horizonte de tu luz admiro
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> el fruto esperanzado de tus manos:&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div></description></item><item><title>Poem 12. "Templo"</title><link>https://www.maxfierro.me/poem-12.-templo/</link><pubDate>Sat, 20 Dec 2025 00:00:00 +0000</pubDate><guid>https://www.maxfierro.me/poem-12.-templo/</guid><description>&lt;p>I was thinking about the nature of art, and concluded that my artistic vision with regards to any particular medium should stem from a single total transmedial aesthetic that is consistent with and inspired by my values. I wanted to write something that would prove that, if abstraction is morally accepted (which I personally do), such a transmedial aesthetic could be allowed to live in full breadth even in single-medium works. My success is unkown, as usual.&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt"> 1
&lt;/span>&lt;span class="lnt"> 2
&lt;/span>&lt;span class="lnt"> 3
&lt;/span>&lt;span class="lnt"> 4
&lt;/span>&lt;span class="lnt"> 5
&lt;/span>&lt;span class="lnt"> 6
&lt;/span>&lt;span class="lnt"> 7
&lt;/span>&lt;span class="lnt"> 8
&lt;/span>&lt;span class="lnt"> 9
&lt;/span>&lt;span class="lnt">10
&lt;/span>&lt;span class="lnt">11
&lt;/span>&lt;span class="lnt">12
&lt;/span>&lt;span class="lnt">13
&lt;/span>&lt;span class="lnt">14
&lt;/span>&lt;span class="lnt">15
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-text" data-lang="text">&lt;span class="line">&lt;span class="cl">veo las columnas de un sonido diáfano
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">instituyéndose al profundo respirar
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> del órgano:
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">desde los balcones de mi mente,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">veo el espectro de tu voz
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">de innumerables tonos hecho:
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">veo los arcos, arcadas sobrepuestas,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">componiéndose con cada palabra escrita
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> por mi mano:
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">desde las palabras con mi puño hechas
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">veo la presencia de tu nombre
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">reverberando por este templo:&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div></description></item><item><title>Poem 11. "Tabachín"</title><link>https://www.maxfierro.me/poem-11.-tabach%C3%ADn/</link><pubDate>Fri, 19 Dec 2025 00:00:00 +0000</pubDate><guid>https://www.maxfierro.me/poem-11.-tabach%C3%ADn/</guid><description>&lt;p>Dedicated to a person-like concept I considered while meditating as a recipient to feelings of love.&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;span class="lnt">2
&lt;/span>&lt;span class="lnt">3
&lt;/span>&lt;span class="lnt">4
&lt;/span>&lt;span class="lnt">5
&lt;/span>&lt;span class="lnt">6
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-text" data-lang="text">&lt;span class="line">&lt;span class="cl">tu piel se irisaba en la luz
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">y el aire trepidaba al tocarte,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">todo se reflejaba en tus ojos
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">que surtía el sol de imágenes:
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">entre las flamas del horizonte,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">te vi sentada bajo un tabachín.&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div></description></item><item><title>Poem 10. "Zopilotes"</title><link>https://www.maxfierro.me/poem-10.-zopilotes/</link><pubDate>Sun, 16 Nov 2025 00:00:00 +0000</pubDate><guid>https://www.maxfierro.me/poem-10.-zopilotes/</guid><description>&lt;p>I am on the more depressive side of personhood.&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt"> 1
&lt;/span>&lt;span class="lnt"> 2
&lt;/span>&lt;span class="lnt"> 3
&lt;/span>&lt;span class="lnt"> 4
&lt;/span>&lt;span class="lnt"> 5
&lt;/span>&lt;span class="lnt"> 6
&lt;/span>&lt;span class="lnt"> 7
&lt;/span>&lt;span class="lnt"> 8
&lt;/span>&lt;span class="lnt"> 9
&lt;/span>&lt;span class="lnt">10
&lt;/span>&lt;span class="lnt">11
&lt;/span>&lt;span class="lnt">12
&lt;/span>&lt;span class="lnt">13
&lt;/span>&lt;span class="lnt">14
&lt;/span>&lt;span class="lnt">15
&lt;/span>&lt;span class="lnt">16
&lt;/span>&lt;span class="lnt">17
&lt;/span>&lt;span class="lnt">18
&lt;/span>&lt;span class="lnt">19
&lt;/span>&lt;span class="lnt">20
&lt;/span>&lt;span class="lnt">21
&lt;/span>&lt;span class="lnt">22
&lt;/span>&lt;span class="lnt">23
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-text" data-lang="text">&lt;span class="line">&lt;span class="cl"> días de nada,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">semanas perdidas
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">como perros en la calle:
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> los relojes del invierno
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> son noches sin cuerda,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> estos días
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> estoy hecho de aire, o de polvo:
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> mis palabras se vuelan
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> y todo lo que pienso
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> se vuelve pétalos de loto,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> escuelas de peces traslúcidos
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> que pronto se desvanecen:
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> voy absorto por el mundo
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> que me da vértigo la nada,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> entonces pienso
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> para tener mi ración
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> de paraíso terrestre,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> que aquellos zopilotes
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> van bajando del cielo:
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> buscan horas huecas,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> comen huesos vacíos:
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> desperdicios
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> días de nada,&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div></description></item><item><title>Poem 9. "Sugerencias"</title><link>https://www.maxfierro.me/poem-9.-sugerencias/</link><pubDate>Mon, 13 Oct 2025 00:00:00 +0000</pubDate><guid>https://www.maxfierro.me/poem-9.-sugerencias/</guid><description>&lt;p>Mostly nonsense.&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt"> 1
&lt;/span>&lt;span class="lnt"> 2
&lt;/span>&lt;span class="lnt"> 3
&lt;/span>&lt;span class="lnt"> 4
&lt;/span>&lt;span class="lnt"> 5
&lt;/span>&lt;span class="lnt"> 6
&lt;/span>&lt;span class="lnt"> 7
&lt;/span>&lt;span class="lnt"> 8
&lt;/span>&lt;span class="lnt"> 9
&lt;/span>&lt;span class="lnt">10
&lt;/span>&lt;span class="lnt">11
&lt;/span>&lt;span class="lnt">12
&lt;/span>&lt;span class="lnt">13
&lt;/span>&lt;span class="lnt">14
&lt;/span>&lt;span class="lnt">15
&lt;/span>&lt;span class="lnt">16
&lt;/span>&lt;span class="lnt">17
&lt;/span>&lt;span class="lnt">18
&lt;/span>&lt;span class="lnt">19
&lt;/span>&lt;span class="lnt">20
&lt;/span>&lt;span class="lnt">21
&lt;/span>&lt;span class="lnt">22
&lt;/span>&lt;span class="lnt">23
&lt;/span>&lt;span class="lnt">24
&lt;/span>&lt;span class="lnt">25
&lt;/span>&lt;span class="lnt">26
&lt;/span>&lt;span class="lnt">27
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-text" data-lang="text">&lt;span class="line">&lt;span class="cl">son soledades entre columnas de piedra
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">vacíos entre las personas del mundo
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">las cumbres de la tierra, sus árboles
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">venas de fuego que mueren en el mar
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">un silencio eterno en la cima del cielo
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">pensamientos perdidos bajo palabras
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">instantes que tocan la piel del futuro
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">otras manos, sentidas por última vez
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">las nubes se desmoronan y son lluvia
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">espacios vivos en volúmenes sin nada
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">bosques de noche, un verde sin ocaso
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">la luz de una estrella que ya no existe
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">verdades absolutas entre los detalles
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">las miradas y su amor incandescente
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">desvíos de vida, la soledad inminente
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">ley del sol en el desierto, y un charco
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">libre misericordia de un océano cruel
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">el fruto sanguíneo de labios efímeros
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">sueño fugaz, los ríos ya desembocan
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">las hojas mojadas se surten de brillo
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">el suelo se nutre y las raíces respiran
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">la gente vive y se abraza con fuerza
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">ceñido, todo está aquí y es completo
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">de día se siente en todos lados calor
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">ya con compañía, fosforece la noche
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">nuestra piel está cubierta de energía
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">somos indistinguibles entre nosotros&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div></description></item><item><title>Poem 8. "Cáliz"</title><link>https://www.maxfierro.me/poem-8.-c%C3%A1liz/</link><pubDate>Sun, 21 Sep 2025 00:00:00 +0000</pubDate><guid>https://www.maxfierro.me/poem-8.-c%C3%A1liz/</guid><description>&lt;p>Dedicated to a person-like concept I considered while meditating as a recipient to feelings of loss and affection.&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt"> 1
&lt;/span>&lt;span class="lnt"> 2
&lt;/span>&lt;span class="lnt"> 3
&lt;/span>&lt;span class="lnt"> 4
&lt;/span>&lt;span class="lnt"> 5
&lt;/span>&lt;span class="lnt"> 6
&lt;/span>&lt;span class="lnt"> 7
&lt;/span>&lt;span class="lnt"> 8
&lt;/span>&lt;span class="lnt"> 9
&lt;/span>&lt;span class="lnt">10
&lt;/span>&lt;span class="lnt">11
&lt;/span>&lt;span class="lnt">12
&lt;/span>&lt;span class="lnt">13
&lt;/span>&lt;span class="lnt">14
&lt;/span>&lt;span class="lnt">15
&lt;/span>&lt;span class="lnt">16
&lt;/span>&lt;span class="lnt">17
&lt;/span>&lt;span class="lnt">18
&lt;/span>&lt;span class="lnt">19
&lt;/span>&lt;span class="lnt">20
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-text" data-lang="text">&lt;span class="line">&lt;span class="cl">te recuerdo en mi sangre,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">calidez que fluye por mi cuello
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> derriba mi cabeza;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">te recuerdo en mis lágrimas,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> cierro mis ojos, y te veo
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> entre formas familiares;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">siento que te abrazo,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> existes entre mis brazos
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> abrazándose a sí mismos,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> siento
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> que te cubro de lágrimas,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> siento la calidez
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> de tu sangre;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">en mi mente
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> te recojo y te defiendo
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> del tiempo,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> te junto en un cáliz
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> hecho con mis manos,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> que poco a poco
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> te derrama:&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div></description></item><item><title>Poem 7. "Absoluto"</title><link>https://www.maxfierro.me/poem-7.-absoluto/</link><pubDate>Mon, 15 Sep 2025 00:00:00 +0000</pubDate><guid>https://www.maxfierro.me/poem-7.-absoluto/</guid><description>&lt;p>Thoughts after the night sky of Joshua Tree National Park, which I visited with my sister Mara.&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt"> 1
&lt;/span>&lt;span class="lnt"> 2
&lt;/span>&lt;span class="lnt"> 3
&lt;/span>&lt;span class="lnt"> 4
&lt;/span>&lt;span class="lnt"> 5
&lt;/span>&lt;span class="lnt"> 6
&lt;/span>&lt;span class="lnt"> 7
&lt;/span>&lt;span class="lnt"> 8
&lt;/span>&lt;span class="lnt"> 9
&lt;/span>&lt;span class="lnt">10
&lt;/span>&lt;span class="lnt">11
&lt;/span>&lt;span class="lnt">12
&lt;/span>&lt;span class="lnt">13
&lt;/span>&lt;span class="lnt">14
&lt;/span>&lt;span class="lnt">15
&lt;/span>&lt;span class="lnt">16
&lt;/span>&lt;span class="lnt">17
&lt;/span>&lt;span class="lnt">18
&lt;/span>&lt;span class="lnt">19
&lt;/span>&lt;span class="lnt">20
&lt;/span>&lt;span class="lnt">21
&lt;/span>&lt;span class="lnt">22
&lt;/span>&lt;span class="lnt">23
&lt;/span>&lt;span class="lnt">24
&lt;/span>&lt;span class="lnt">25
&lt;/span>&lt;span class="lnt">26
&lt;/span>&lt;span class="lnt">27
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-text" data-lang="text">&lt;span class="line">&lt;span class="cl">desde ya distantes astros
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">por un volumen transparente
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> se derrama
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> un cuerpo que mi visión sostiene;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">mi mirada atraviesa el cielo
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> y se filtra por un medio invisible;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">se somete a su estructura,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> y se concreta,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> se cristaliza:
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> si lo busco,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">todo existe en ese cuerpo;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> cada cosa
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> es una de sus caras,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> cada perspectiva
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> es una de sus esquinas,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> y dentro de su totalidad
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">se encuentra a si misma
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> mi mirada:
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">ser que se yergue
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> entre patrones que yo elijo,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> tu cara lo es todo
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> y existe en la nada,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> tu mirada me ve
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> y me concreta,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> me cristaliza:&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div></description></item><item><title>Poem 6. "Lena"</title><link>https://www.maxfierro.me/poem-6.-lena/</link><pubDate>Mon, 08 Sep 2025 00:00:00 +0000</pubDate><guid>https://www.maxfierro.me/poem-6.-lena/</guid><description>&lt;p>Dedicated to Lena, who passed away of old age. (I love you, darling.)&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt"> 1
&lt;/span>&lt;span class="lnt"> 2
&lt;/span>&lt;span class="lnt"> 3
&lt;/span>&lt;span class="lnt"> 4
&lt;/span>&lt;span class="lnt"> 5
&lt;/span>&lt;span class="lnt"> 6
&lt;/span>&lt;span class="lnt"> 7
&lt;/span>&lt;span class="lnt"> 8
&lt;/span>&lt;span class="lnt"> 9
&lt;/span>&lt;span class="lnt">10
&lt;/span>&lt;span class="lnt">11
&lt;/span>&lt;span class="lnt">12
&lt;/span>&lt;span class="lnt">13
&lt;/span>&lt;span class="lnt">14
&lt;/span>&lt;span class="lnt">15
&lt;/span>&lt;span class="lnt">16
&lt;/span>&lt;span class="lnt">17
&lt;/span>&lt;span class="lnt">18
&lt;/span>&lt;span class="lnt">19
&lt;/span>&lt;span class="lnt">20
&lt;/span>&lt;span class="lnt">21
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-text" data-lang="text">&lt;span class="line">&lt;span class="cl">entrevista criatura echada en la baldosa,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">la luz penetraba el follaje
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> del helecho donde te resguardabas:
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">en ese entonces, los dos éramos niños y
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> nos ceñía la juventud de nuestra familia,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">ese hogar llevaba tu color,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> y en ese jardín
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> nos vestía el espacio de una piel
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> más radiante y transparente
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">criatura entrevista entre las décadas,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> tiempo tenaz que fluye a mi costado:
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> todavía soy un niño, pero sin ti
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> ya no soy joven,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> mi familia ya no es joven
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> ahora que tú no estás,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> te resguardo dentro de mí,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> y en ti siempre se encontrarán
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> aquellas joyas de nuestra juventud
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> dentro de las cuales centellea
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">la luz que compartimos&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div></description></item><item><title>Poem 5. "Zoe"</title><link>https://www.maxfierro.me/poem-5.-zoe/</link><pubDate>Mon, 28 Jul 2025 00:00:00 +0000</pubDate><guid>https://www.maxfierro.me/poem-5.-zoe/</guid><description>&lt;p>Dedicated to Zoe, with whom I shared a relationship.&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt"> 1
&lt;/span>&lt;span class="lnt"> 2
&lt;/span>&lt;span class="lnt"> 3
&lt;/span>&lt;span class="lnt"> 4
&lt;/span>&lt;span class="lnt"> 5
&lt;/span>&lt;span class="lnt"> 6
&lt;/span>&lt;span class="lnt"> 7
&lt;/span>&lt;span class="lnt"> 8
&lt;/span>&lt;span class="lnt"> 9
&lt;/span>&lt;span class="lnt">10
&lt;/span>&lt;span class="lnt">11
&lt;/span>&lt;span class="lnt">12
&lt;/span>&lt;span class="lnt">13
&lt;/span>&lt;span class="lnt">14
&lt;/span>&lt;span class="lnt">15
&lt;/span>&lt;span class="lnt">16
&lt;/span>&lt;span class="lnt">17
&lt;/span>&lt;span class="lnt">18
&lt;/span>&lt;span class="lnt">19
&lt;/span>&lt;span class="lnt">20
&lt;/span>&lt;span class="lnt">21
&lt;/span>&lt;span class="lnt">22
&lt;/span>&lt;span class="lnt">23
&lt;/span>&lt;span class="lnt">24
&lt;/span>&lt;span class="lnt">25
&lt;/span>&lt;span class="lnt">26
&lt;/span>&lt;span class="lnt">27
&lt;/span>&lt;span class="lnt">28
&lt;/span>&lt;span class="lnt">29
&lt;/span>&lt;span class="lnt">30
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-text" data-lang="text">&lt;span class="line">&lt;span class="cl">caudaloso río de la memoria;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">sacrificio, derrota clavada,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">memoria total, pensamiento
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">que me abruma,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> te vas
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">para regresar una vez más,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">siempre una vez más, nunca
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">te vas,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> pero tampoco llegas;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">ya te fuiste, y aún sigues
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">aquí, sigues en el instante,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">la hora te produce siempre,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">ya no sueño, recordar tu luz
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">me despierta, me carcome,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">lo pagué todo para pensarte,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">símbolo del olvido,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> cara
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">atorada siempre en el pasado,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">sólo te pienso en el pasado,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">palabras que escribo pensando
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">en el pasado;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> ahí perteneces,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">que el instante es una nada;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">el futuro toca ya la puerta
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">de mi alma, y no lo escucho;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> silencio que me abruma,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">pensamientos que me gritan,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> memorias que me ahogan
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">en su caudal, río perdido
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> que te sigue buscando &lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div></description></item><item><title>Poem 4. "Consuelo"</title><link>https://www.maxfierro.me/poem-4.-consuelo/</link><pubDate>Sun, 27 Jul 2025 00:00:00 +0000</pubDate><guid>https://www.maxfierro.me/poem-4.-consuelo/</guid><description>&lt;p>Words given to me by my mother over the phone.&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;span class="lnt">2
&lt;/span>&lt;span class="lnt">3
&lt;/span>&lt;span class="lnt">4
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-text" data-lang="text">&lt;span class="line">&lt;span class="cl">Ay, mijo. Que te bendiga Dios.
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">No eres de ule ni de fierro.
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Te amo con todo mi ser.
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Eres mi corazón.&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div></description></item><item><title>Poem 3. "Lucy"</title><link>https://www.maxfierro.me/poem-3.-lucy/</link><pubDate>Sat, 12 Jul 2025 00:00:00 +0000</pubDate><guid>https://www.maxfierro.me/poem-3.-lucy/</guid><description>&lt;p>Dedicated to my dear friend, Lucy Revina.&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt"> 1
&lt;/span>&lt;span class="lnt"> 2
&lt;/span>&lt;span class="lnt"> 3
&lt;/span>&lt;span class="lnt"> 4
&lt;/span>&lt;span class="lnt"> 5
&lt;/span>&lt;span class="lnt"> 6
&lt;/span>&lt;span class="lnt"> 7
&lt;/span>&lt;span class="lnt"> 8
&lt;/span>&lt;span class="lnt"> 9
&lt;/span>&lt;span class="lnt">10
&lt;/span>&lt;span class="lnt">11
&lt;/span>&lt;span class="lnt">12
&lt;/span>&lt;span class="lnt">13
&lt;/span>&lt;span class="lnt">14
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-text" data-lang="text">&lt;span class="line">&lt;span class="cl">Marsupial madre de un amor tenaz
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">que se resguarda entre mis costillas;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">me llena de un sentimiento líquido
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">que se construye al cerrar mis ojos.
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Llueves gotas de ideas inmarcesibles.
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Toda la noche llueves sobre mi rostro;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">gotas de lluvia que veo ya sobre mi piel
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">son transparentes, por tu transparencia.
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Cómo te extraño, querida amiga;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">que convertiste nuestra vivienda en hogar,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">y cuidas siempre de mí, así cómo yo de ti.
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Pronto nos veremos otra vez.&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div></description></item><item><title>Poem 2. "Occidental"</title><link>https://www.maxfierro.me/poem-2.-occidental/</link><pubDate>Wed, 30 Apr 2025 00:00:00 +0000</pubDate><guid>https://www.maxfierro.me/poem-2.-occidental/</guid><description>&lt;p>Failed attempt at processing a concept that I still can&amp;rsquo;t quite explain.&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;span class="lnt">2
&lt;/span>&lt;span class="lnt">3
&lt;/span>&lt;span class="lnt">4
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-text" data-lang="text">&lt;span class="line">&lt;span class="cl">Son trayectorias que trazan entre los átomos,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">son curvas que desnudan misterios paralelos.
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Es hipótesis de tiempo escrita en el espacio,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">información que se filtra entre la materia.&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div></description></item><item><title>The Elo Rating System through Likelihood Gradient Ascent</title><link>https://www.maxfierro.me/the-elo-rating-system-through-likelihood-gradient-ascent/</link><pubDate>Wed, 30 Apr 2025 00:00:00 +0000</pubDate><guid>https://www.maxfierro.me/the-elo-rating-system-through-likelihood-gradient-ascent/</guid><description>&lt;aside id="toc">
&lt;details>
&lt;summary>&amp;nbsp;&lt;strong> Table of contents&lt;/strong>&lt;/summary>
&lt;nav id="TableOfContents">
&lt;ul>
&lt;li>&lt;a href="#abstract">Abstract&lt;/a>&lt;/li>
&lt;li>&lt;a href="#background">Background&lt;/a>
&lt;ul>
&lt;li>&lt;a href="#mathematical-orderings">Mathematical Orderings&lt;/a>&lt;/li>
&lt;li>&lt;a href="#elo-ratings-and-updates">Elo Ratings and Updates&lt;/a>&lt;/li>
&lt;li>&lt;a href="#maximum-likelihood-estimation">Maximum Likelihood Estimation&lt;/a>&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>&lt;a href="#derivation">Derivation&lt;/a>
&lt;ul>
&lt;li>&lt;a href="#map-estimation-1">MAP Estimation&lt;/a>&lt;/li>
&lt;li>&lt;a href="#discussion">Discussion&lt;/a>&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>&lt;a href="#appendix">Appendix&lt;/a>
&lt;ul>
&lt;li>&lt;a href="#gaussian-convolution">Gaussian Convolution&lt;/a>&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;/nav>
&lt;/details>
&lt;/aside>
&lt;h2 id="abstract">Abstract&lt;/h2>
&lt;p>Probability and optimization are strong monsters. The &lt;a href="https://en.wikipedia.org/wiki/Elo_rating_system">Elo rating system&lt;/a>, used to estimate performance in &lt;a href="https://en.wikipedia.org/wiki/FIDE_rankings">competitive chess&lt;/a>, &lt;a href="https://www.vox.com/2019/2/7/18210998/tinder-algorithm-swiping-tips-dating-app-science">online dating&lt;/a>, and &lt;a href="https://lmsys.org/blog/2023-05-03-arena/">AI agents&lt;/a>, is an under-the-hood reminder of this fact that operates within many of the systems that need to establish comparative metrics. This piece is my contribution to the endless pile of explainers on the topic. I exercise an emphasis on bayesian statistics and optimization that should ring a bell for anyone familiar with the basics of machine learning.&lt;/p>
&lt;hr>
&lt;h2 id="background">Background&lt;/h2>
&lt;h3 id="mathematical-orderings">Mathematical Orderings&lt;/h3>
&lt;p>At the risk of including a needless dependency on the topic of this piece, I introduce you to the idea of an ordering.
Colloquially, we take this to mean an arrangement (i.e., &lt;a href="https://en.wikipedia.org/wiki/Permutation">a permutation&lt;/a>) of a set of things.
We will replace that with its formal meaning, which is a specific kind of &lt;a href="https://en.wikipedia.org/wiki/Binary_relation">binary relation&lt;/a>.&lt;/p>
&lt;style>
.box-body > :last-child {
margin-bottom: 0 !important;
}
.box-body > :first-child {
margin-top: 0 !important;
}
&lt;/style>
&lt;div
class="hint-box"
style="
border: 1px solid #000000;
padding: 10px;
border-radius: 5px;
margin: 16px 0;
background-color: rgba(0, 0, 0, 0.05);
"
>
&lt;strong style="display: block; margin-bottom: 5px"
>Definition&lt;/strong
>
&lt;hr
style="
border: none;
border-top: 1px solid #000000;
margin: 10px 0;
width: calc(100%);
"
/>
&lt;div style="font-size: 0.92em" class="box-body">
&lt;p>A &lt;strong>binary relation&lt;/strong> $R$ from a set $X$ to another $Y$ is a subset of $X \times Y$, where it is possible that $X = Y$.&lt;/p>
&lt;/div>
&lt;/div>
&lt;p>This should seem odd, as a subset is in no obvious way reminiscent of a permutation. But introducing some new syntax to indicate membership in a relation,&lt;/p>
$$
(x, y) \in R \vdash xRy,
$$&lt;p>we are an example away from making sense. In particular, consider $R = \, \leq$ (less-than). When we say things like &amp;ldquo;$x \leq y$,&amp;rdquo; we are in fact using syntactic sugar for &amp;ldquo;$(x, y) \in \, \leq$.&amp;rdquo; With this in mind, we can take a look at &lt;a href="https://en.wikipedia.org/wiki/Partially_ordered_set">partial orders&lt;/a>.&lt;/p>
&lt;style>
.box-body > :last-child {
margin-bottom: 0 !important;
}
.box-body > :first-child {
margin-top: 0 !important;
}
&lt;/style>
&lt;div
class="hint-box"
style="
border: 1px solid #000000;
padding: 10px;
border-radius: 5px;
margin: 16px 0;
background-color: rgba(0, 0, 0, 0.05);
"
>
&lt;strong style="display: block; margin-bottom: 5px"
>Definition&lt;/strong
>
&lt;hr
style="
border: none;
border-top: 1px solid #000000;
margin: 10px 0;
width: calc(100%);
"
/>
&lt;div style="font-size: 0.92em" class="box-body">
&lt;p>A &lt;strong>partial order&lt;/strong> $R$ is a binary relation over a set $X$ and itself which satisfies the following:&lt;/p>
&lt;ol>
&lt;li>Reflexivity. This means that $\forall x \in X, \, xRx$.&lt;/li>
&lt;li>Antisymmetry. This means that $\forall (x, y) \in X^2, \, xRy \wedge yRx \implies x = y$.&lt;/li>
&lt;li>Transitivity. This means that $\forall (x, y, z) \in X^3, \, xRy \wedge yRz \implies xRz$.&lt;/li>
&lt;/ol>
&lt;/div>
&lt;/div>
&lt;p>The canonical example of a partial order is $\subseteq$ over $\mathcal P(S)$. Importantly, a partial order over a set does not imply a permutation over it, because of the possibility for two elements $x$ and $y$ to be &lt;em>unrelated&lt;/em>, or in other words, for $\neg xRy$ and $\neg yRx$. In a &lt;a href="https://en.wikipedia.org/wiki/Total_order">total order&lt;/a>, we simply do not allow this.&lt;/p>
&lt;style>
.box-body > :last-child {
margin-bottom: 0 !important;
}
.box-body > :first-child {
margin-top: 0 !important;
}
&lt;/style>
&lt;div
class="hint-box"
style="
border: 1px solid #000000;
padding: 10px;
border-radius: 5px;
margin: 16px 0;
background-color: rgba(0, 0, 0, 0.05);
"
>
&lt;strong style="display: block; margin-bottom: 5px"
>Definition&lt;/strong
>
&lt;hr
style="
border: none;
border-top: 1px solid #000000;
margin: 10px 0;
width: calc(100%);
"
/>
&lt;div style="font-size: 0.92em" class="box-body">
&lt;p>A &lt;strong>total order&lt;/strong> $R$ is a partial order that is also total, which means that $\forall (x, y) \in X^2, \, xRy \vee yRx$.&lt;/p>
&lt;/div>
&lt;/div>
&lt;p>The canonical example of a total order is $\leq$ over $\mathbb{R}$. With a total order, there is a single valid ordering $\bold{x}$ (i.e. arrangement or permutation) over its set $X$ such that $x_iRx_{i + 1}$ for all $i = 0, \ldots, |X| - 1$. One more variation we can make on the idea of an order is that of a &lt;a href="https://en.wikipedia.org/wiki/Weak_ordering">weak order&lt;/a>.&lt;/p>
&lt;style>
.box-body > :last-child {
margin-bottom: 0 !important;
}
.box-body > :first-child {
margin-top: 0 !important;
}
&lt;/style>
&lt;div
class="hint-box"
style="
border: 1px solid #000000;
padding: 10px;
border-radius: 5px;
margin: 16px 0;
background-color: rgba(0, 0, 0, 0.05);
"
>
&lt;strong style="display: block; margin-bottom: 5px"
>Definition&lt;/strong
>
&lt;hr
style="
border: none;
border-top: 1px solid #000000;
margin: 10px 0;
width: calc(100%);
"
/>
&lt;div style="font-size: 0.92em" class="box-body">
&lt;p>A &lt;strong>weak order&lt;/strong> $R$ is a total order that is not necessarily antisymmetric.&lt;/p>
&lt;/div>
&lt;/div>
&lt;p>In other words, it is possible that for distinct elements $x$ and $y$, both $xRy$ and $yRx$. This is conceptually aligned with allowing &amp;ldquo;ties&amp;rdquo; in any resulting ordering, potentially sacrificing their uniqueness.&lt;/p>
&lt;h3 id="elo-ratings-and-updates">Elo Ratings and Updates&lt;/h3>
&lt;p>We can take a look at the question that &lt;a href="https://en.wikipedia.org/wiki/Arpad_Elo">Arpad Elo&lt;/a> (kind of) answered: How can you compare the skill level of two chess players?&lt;/p>
&lt;style>
.halign-container {
display: flex;
width: 100%;
justify-content: center;
}
&lt;/style>
&lt;div class="halign-container">
&lt;figure>
&lt;img loading="lazy" src="arpad_elo.jpg"
alt="Arpad Elo (August 25, 1903 – November 5, 1992)" width="256"/> &lt;figcaption>
&lt;p>Arpad Elo (August 25, 1903 – November 5, 1992)&lt;/p>
&lt;/figcaption>
&lt;/figure>
&lt;/div>
&lt;p>His proposed procedure is straightforward. Each player $i \in N$ will have a real-valued rating $r_i$, which will be a proxy for their skill level. These ratings will be initialized at some predetermined value for all players. Then, when there is a match between player $i$ and $j$, the following updates are made:&lt;/p>
$$
\begin{align*}
&amp;r_j \gets r_j + k(s_j - e_j), \\
&amp;r_i \gets r_i + k(s_i - e_i),
\end{align*}
$$&lt;p>where&lt;sup id="fnref:1">&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref">1&lt;/a>&lt;/sup>,&lt;/p>
$$
e_p = \frac{1}{1 + e^{-(r_p - r_{\text{other}})}}, \;\;\;\;
s_p =
\begin{cases}
1 &amp;\text{if \(p\) wins},\\
0.5 &amp;\text{if draw},\\
0 &amp;\text{if \(p\) loses},\\
\end{cases}
$$&lt;p>and $k$ is a constant chosen arbitrarily. So, as players accrue matches with other players, their ratings are updated according to the above rules with the hope that they will eventually stabilize. Now, the difference between players&amp;rsquo; ratings can be used to compare their skill levels via the ordering $\leq$ on $\mathbb{R}$.&lt;/p>
&lt;h3 id="maximum-likelihood-estimation">Maximum Likelihood Estimation&lt;/h3>
&lt;p>&lt;a href="https://en.wikipedia.org/wiki/Maximum_likelihood_estimation">Maximum likelihood estimation (MLE)&lt;/a> is a method used to fit distribution parameters to samples. The setup for MLE is a random variable $Y$ of known distribution $\mathcal{D_\theta}$ (parameterized by $\theta$), with access to &lt;a href="https://en.wikipedia.org/wiki/Independent_and_identically_distributed_random_variables">IID&lt;/a> samples $\langle y_i \rangle \sim \mathcal{D}_\theta$. The objective is to estimate $\hat\theta$ such that the &lt;a href="https://en.wikipedia.org/wiki/Likelihood_function">likelihood function&lt;/a> $\mathcal{L}$ is maximized,&lt;/p>
$$
\begin{equation}
\hat\theta_\mathrm{MLE}
= \argmax_\theta \, \mathcal{L}(\theta; \langle y_i \rangle)
= \argmax_\theta \, \prod_i \mathbb{P}_\theta[Y = y_i].
\end{equation}
$$&lt;p>In other words, MLE is the optimization procedure associated with finding the distribution parameters that were most likely to generate observed data, provided that we know or assume its distribution.&lt;/p>
&lt;h4 id="map-estimation">MAP Estimation&lt;/h4>
&lt;p>When there is access to a (known or assumed) prior $p(\theta)$ on the distribution of parameters, we can fold it into our optimization process by doing MLE on the posterior distribution, which by &lt;a href="https://en.wikipedia.org/wiki/Bayes%27_theorem">Bayes&amp;rsquo; theorem&lt;/a>,&lt;/p>
$$
\begin{align*}
p(\theta \mid \langle y_i\rangle)
&amp;= \frac{p(\langle y_i \rangle \mid \theta) p(\theta)}{p(\langle y_i \rangle)}
\; \propto \; \underbrace{p(\langle y_i \rangle \mid \theta)}_{\displaystyle{\mathcal{L}(\theta; \langle y_i \rangle)}} p(\theta).
\end{align*}
$$&lt;p>The resulting parameters $\hat\theta_\mathrm{MAP}$ are then a &lt;a href="https://en.wikipedia.org/wiki/Maximum_a_posteriori_estimation">maximum a posteriori (MAP)&lt;/a> estimate,&lt;/p>
$$
\begin{align*}
\hat\theta_{\mathrm{MAP}}
&amp;= \argmax_\theta\;p\bigl(\theta \mid \langle y_i\rangle\bigr) \\
&amp;= \argmax_\theta\;\Bigl[\mathcal{L}\bigl(\theta;\langle y_i\rangle\bigr)\,p(\theta)\Bigr] \\
&amp;= \argmax_\theta\;\Bigl[\prod_{i=1}^n \mathbb{P}_\theta\bigl[Y=y_i\bigr] \times p(\theta)\Bigr].
\end{align*}
$$&lt;h4 id="optimization">Optimization&lt;/h4>
&lt;p>Sometimes, it is possible to find closed-form solutions for $\hat\theta_\mathrm{MAP}$ and $\hat\theta_\mathrm{MLE}$ through convex optimization. For example, samples with gaussian noise lead to the closed-form solution of the &lt;a href="https://en.wikipedia.org/wiki/Ordinary_least_squares">OLS problem&lt;/a> through the process of MLE.&lt;/p>
&lt;p>However, most of the time the resulting optimization objective of MLE (and hence also MAP estimation) is not convex. Here, gradient-based approaches (along with all other non-convex optimization techniques) are helpful for finding local maxima of the likelihood objective.&lt;/p>
&lt;hr>
&lt;h2 id="derivation">Derivation&lt;/h2>
&lt;p>The derivation presented here will depart from the usual in hopes of contributing some kind of novelty. We begin with the game-theory-native idea of payoff, which we will take to be a numeric value representing a player&amp;rsquo;s utility differential with respect to the start of a game $G$,&lt;/p>
$$
\text{payoff of player i} = p_i.
$$&lt;p>Next, we will consider player performance. Just as Elo, we take the performance of a player $i$ on a game $G$ to be a real-valued random variable $X_i$, independent to other players.&lt;/p>
&lt;style>
.box-body > :last-child {
margin-bottom: 0 !important;
}
.box-body > :first-child {
margin-top: 0 !important;
}
&lt;/style>
&lt;div
class="hint-box"
style="
border: 1px solid #000000;
padding: 10px;
border-radius: 5px;
margin: 16px 0;
background-color: rgba(0, 0, 0, 0.05);
"
>
&lt;strong style="display: block; margin-bottom: 5px"
>Observation&lt;/strong
>
&lt;hr
style="
border: none;
border-top: 1px solid #000000;
margin: 10px 0;
width: calc(100%);
"
/>
&lt;div style="font-size: 0.92em" class="box-body">
&lt;p>Perhaps Elo motivated this decision after noticing the variance of his own performance over the chess board.&lt;/p>
&lt;/div>
&lt;/div>
&lt;p>Then, we will expand our setup by allowing players to outperform others, which we will present through the difference between the performance of two players during $G$ (which is another RV),&lt;/p>
$$
\delta_{i, \, j} = X_i - X_j.
$$&lt;p>We will also establish a relationship between $\delta_{i , \, j}$ and $p_i$. For this purpose, we introduce a game-specific mapping $g$ with a noise term $\epsilon \sim \mathcal{N}(0, \sigma_\epsilon^2)$, which together form the generative process of payoffs:&lt;/p>
$$
p_i = g(\delta_{i, \, j}) + \epsilon.
$$&lt;p>Finally, we will assert a prior on the distribution of $X_i$, which we will refer to as $\mathcal{D}(\theta_i)$ without yet deciding on a particular distribution (just that it is parameterized by $\theta_i$). This prior $\pi(x)$ will be global for all players, and its distribution parameters will be $\theta_\pi$.&lt;/p>
&lt;style>
.box-body > :last-child {
margin-bottom: 0 !important;
}
.box-body > :first-child {
margin-top: 0 !important;
}
&lt;/style>
&lt;div
class="hint-box"
style="
border: 1px solid #000000;
padding: 10px;
border-radius: 5px;
margin: 16px 0;
background-color: rgba(0, 0, 0, 0.05);
"
>
&lt;strong style="display: block; margin-bottom: 5px"
>Note&lt;/strong
>
&lt;hr
style="
border: none;
border-top: 1px solid #000000;
margin: 10px 0;
width: calc(100%);
"
/>
&lt;div style="font-size: 0.92em" class="box-body">
&lt;p>While this is a global prior, notice that none of the following breaks if it were player-specific from the start.&lt;/p>
&lt;/div>
&lt;/div>
&lt;p>So far, none of this has helped us answer the question that Elo answered. For that, we will introduce one last artifact on top of our setup; each player $i$ will have a &amp;ldquo;rating&amp;rdquo; $r_i$, which we will ultimately use to order players by skill in our system or organization:&lt;/p>
$$
r_i = \mathbb{E}[X_i].
$$&lt;h3 id="map-estimation-1">MAP Estimation&lt;/h3>
&lt;p>Clearly, since our goal is to know players&amp;rsquo; ratings, the only additional information we will need to get them are the distribution parameters $\theta_i$. Of course, at a lack of observations, we can assert from our prior&lt;/p>
$$
r_i = \mathbb{E}_{X \, \sim \, \pi}[X].
$$&lt;p>But what if at the end of a game $G$ between players $i$ and $j$, we observe &lt;a href="https://en.wikipedia.org/wiki/Without_loss_of_generality">WLOG&lt;/a> the payoff $p_i$? Here, we will be wishing that $g$ is neatly invertible. Assuming it is, we arrive at the following MLE for their difference in performance via application of $(1)$:&lt;/p>
$$
\begin{equation}
\hat\delta_{i, \, j}
= \argmax_{\delta} \exp\!\Bigl(-\frac{(p_i-g(\delta))^2}{2\sigma_\epsilon^2}\Bigr)
= g^{-1}(p_i).
\end{equation}
$$&lt;style>
.box-body > :last-child {
margin-bottom: 0 !important;
}
.box-body > :first-child {
margin-top: 0 !important;
}
&lt;/style>
&lt;div
class="hint-box"
style="
border: 1px solid #000000;
padding: 10px;
border-radius: 5px;
margin: 16px 0;
background-color: rgba(0, 0, 0, 0.05);
"
>
&lt;strong style="display: block; margin-bottom: 5px"
>Note&lt;/strong
>
&lt;hr
style="
border: none;
border-top: 1px solid #000000;
margin: 10px 0;
width: calc(100%);
"
/>
&lt;div style="font-size: 0.92em" class="box-body">
&lt;p>Notice &lt;strong>we did not use a prior&lt;/strong> when estimating $\hat\delta_{i, \, j}$. This assumption is due to Elo; we will not use players&amp;rsquo; history when calculating their performance for a single game. This is the design decision that, by omission, accounts for sudden changes in player skill (as a result of learning, etc.).&lt;/p>
&lt;/div>
&lt;/div>
&lt;style>
.box-body > :last-child {
margin-bottom: 0 !important;
}
.box-body > :first-child {
margin-top: 0 !important;
}
&lt;/style>
&lt;div
class="hint-box"
style="
border: 1px solid #000000;
padding: 10px;
border-radius: 5px;
margin: 16px 0;
background-color: rgba(0, 0, 0, 0.05);
"
>
&lt;strong style="display: block; margin-bottom: 5px"
>Note&lt;/strong
>
&lt;hr
style="
border: none;
border-top: 1px solid #000000;
margin: 10px 0;
width: calc(100%);
"
/>
&lt;div style="font-size: 0.92em" class="box-body">
&lt;p>We just estimated the difference between the performance of the players from the payoff of a single player. The invertibility of $g$ has the hidden implication that &lt;strong>it is strictly monotonic&lt;/strong>; no two differences in performance lead to the same payoff, and the greater the difference, the greater the payoff for the outperforming player.&lt;/p>
&lt;/div>
&lt;/div>
&lt;p>Knowing this, we can perform a bayesian update to our prior through MAP estimation. Writing down the joint posterior of the parameters of $X_i$ and $X_j$,&lt;/p>
$$
\begin{equation}
p(\theta_i, \, \theta_j \mid \hat\delta_{i, \, j})
\propto
\underbrace{
p(\hat\delta_{i, \, j} \mid \theta_i, \, \theta_j)
}_{
\displaystyle{p(\hat\delta_{i, \, j} \mid X_i - X_j)}
}
p(\theta_i)p(\theta_j).
\end{equation}
$$&lt;p>Notice that we already have access to priors $p(\theta_i)$ and $p(\theta_j)$; those are quite simply $\pi(\theta_i)$ and $\pi(\theta_j)$, which we assume per our initial setup.&lt;/p>
&lt;h4 id="gaussian-performance">Gaussian Performance&lt;/h4>
&lt;p>We proceed by considering the case where $X_i \sim \mathcal{N}(r_i, \, \sigma_i^2)$, such that $\theta_i = (r_i, \, \sigma_i^2)$. That is, player performance is gaussian-distributed,&lt;/p>
$$
\begin{equation}
p_{X_i}(x_i \mid \theta_i)
= \frac{1}{\sqrt{2\pi} \, \sigma_i}
\exp\!\Bigl(-\frac{(x_i - r_i)^2}{2\,\sigma_i^2}\Bigr).
\end{equation}
$$&lt;p>Our next goal is to set up an analytic function for the likelihood $p(\hat\delta_{i, \, j} \mid \theta_i, \, \theta_j)$. We observe that we have access to the conditional density of $\hat\delta_{i, \, j}$&lt;/p>
$$
\begin{equation}
p(\hat\delta_{i, \, j} \mid x_i, \, x_j)
= \frac{1}{\sqrt{2\pi}\,\sigma_\varepsilon}
\exp\!\Bigl(-\frac{\bigl(g(\hat\delta_{i, \, j}) - (x_i - x_j)\bigr)^2}{2\,\sigma_\varepsilon^2}\Bigr)
\;|g'(\hat\delta_{i, \, j})|
\end{equation}
$$&lt;p>by using $(2)$ implicitly through the change of variables&lt;/p>
$$
p(\hat\delta_{i, \, j} \mid x_i, \, x_j)
= p_{p_i}\bigl(g(\hat\delta_{i, \, j}) \mid x_i, \, x_j \bigr)
\;\Bigl|\frac{d}{d\hat\delta_{i, \, j}}\,g(\hat\delta_{i, \, j})\Bigr|,
$$&lt;p>where we take&lt;/p>
$$
p\bigl(p_i \mid x_i, \, x_j \bigr)
= \frac{1}{\sqrt{2\pi}\,\sigma_\varepsilon}
\exp\!\Bigl(-\frac{\bigl(p_i - g(x_i - x_j)\bigr)^2}{2\,\sigma_\varepsilon^2}\Bigr).
$$&lt;p>Now, we can use $(4)$ and $(5)$ to derive the desired likelihood by marginalizing,&lt;/p>
$$
\begin{align*}
p\bigl(\hat\delta_{i, \, j} \mid \theta_i,\theta_j\bigr)
&amp;= \iint
p\bigl(\hat\delta_{i, \, j}\mid x_i,x_j\bigr)\;
p_{X_i}(x_i \mid \theta_i)\;p_{X_j}(x_j \mid \theta_j)\,
dx_i\,dx_j \\
&amp;= \iint
\frac{1}{\sqrt{2\pi}\,\sigma_\varepsilon}
\exp\!\Bigl(-\frac{\bigl(g(\hat\delta_{i, \, j}) - (x_i - x_j)\bigr)^2}
{2\,\sigma_\varepsilon^2}\Bigr)\,
\bigl|g'(\hat\delta_{i, \, j})\bigr|
\\[-2pt]
&amp;\quad\;\times\,
\frac{1}{\sqrt{2\pi}\,\sigma_i}
\exp\!\Bigl(-\frac{(x_i - r_i)^2}{2\,\sigma_i^2}\Bigr)
\;\frac{1}{\sqrt{2\pi}\,\sigma_j}
\exp\!\Bigl(-\frac{(x_j - r_j)^2}{2\,\sigma_j^2}\Bigr)
\,dx_i\,dx_j.
\\[6pt]
\end{align*}
$$&lt;p>After another cup of coffee, we arrive at the following version of our joint likelihood $p\bigl(\hat\delta_{i, , j} \mid \theta_i,\theta_j\bigr)$,&lt;/p>
$$
\begin{aligned}
&amp;= \int
\frac{1}{\sqrt{2\pi}\,\sigma_\varepsilon}
\exp\!\Bigl(-\frac{\bigl(g(\hat\delta_{i, \, j}) - d\bigr)^2}{2\,\sigma_\varepsilon^2}\Bigr)
\;|g'(\hat\delta_{i, \, j})|\; \\
&amp;\quad\;\quad\;\times \frac{1}{\sqrt{2\pi(\sigma_i^2+\sigma_j^2)}}
\exp\!\Bigl(-\frac{(d - (r_i - r_j))^2}{2(\sigma_i^2+\sigma_j^2)}\Bigr)
\,dd
\end{aligned}
$$&lt;p>where $d = x_i - x_j$ (hinted at in equation $(3)$) is possible because $X_i - X_j \sim \mathcal{N}(r_i - r_j, \sigma_i^2 + \sigma_j^2)$. Finally, we obtain the following after remembering an &lt;a href="#gaussian-convolution">important fact&lt;/a> from signal processing,&lt;/p>
$$
\begin{align}
\mathcal{J}_\mathrm{MLE}(\theta_i, \, \theta_j; \, \hat\delta_{i, \, j})
= \frac{|g'(\hat\delta_{i, \, j})|}{\sqrt{2\pi\,\bigl(\sigma_\varepsilon^2 + \sigma_i^2 + \sigma_j^2\bigr)}}\,
\exp\!\Biggl(-\frac{\bigl(g(\hat\delta_{i, \, j}) - (r_i - r_j)\bigr)^2}
{2\,\bigl(\sigma_\varepsilon^2 + \sigma_i^2 + \sigma_j^2\bigr)}\Biggr).
\end{align}
$$&lt;p>Wonderful. We then attend to the reflexes drilled into our brains from machine learning, and find the gradient of the log-likelihood with respect to learned&amp;hellip; ahem, the ratings $\bold{r} = [r_i, \, r_j]^\top$:&lt;/p>
$$
\begin{equation}
\nabla_\bold{r}\log\mathcal{J}_\mathrm{MLE}(\theta_i, \, \theta_j; \, \hat\delta_{i, \, j}) =
\begin{bmatrix}
\displaystyle\frac{g(\hat\delta_{i, \, j}) - (r_i - r_j)}{\sigma_\varepsilon^2 + \sigma_i^2 + \sigma_j^2} \\[8pt]
\\
\displaystyle-\frac{g(\hat\delta_{i, \, j}) - (r_i - r_j)}{\sigma_\varepsilon^2 + \sigma_i^2 + \sigma_j^2}
\end{bmatrix}.
\end{equation}
$$&lt;style>
.box-body > :last-child {
margin-bottom: 0 !important;
}
.box-body > :first-child {
margin-top: 0 !important;
}
&lt;/style>
&lt;div
class="hint-box"
style="
border: 1px solid #000000;
padding: 10px;
border-radius: 5px;
margin: 16px 0;
background-color: rgba(0, 0, 0, 0.05);
"
>
&lt;strong style="display: block; margin-bottom: 5px"
>Note&lt;/strong
>
&lt;hr
style="
border: none;
border-top: 1px solid #000000;
margin: 10px 0;
width: calc(100%);
"
/>
&lt;div style="font-size: 0.92em" class="box-body">
&lt;p>By taking the $\log$ of the joint likelihood we achieve nothing, but we respect a very important tradition&lt;sup id="fnref:2">&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref">2&lt;/a>&lt;/sup>.&lt;/p>
&lt;/div>
&lt;/div>
&lt;p>Using $\nabla_\bold{r}\log\mathcal{J}(\theta_i, \, \theta_j; \, \hat\delta_{i, \, j})$ as it stands to adjust $\bold{r}$ would be tantamount to MLE on $\bold{r}$. To turn this into a proper MAP estimate we must also fold in our prior terms into $(6)$, which we assume to be gaussian:&lt;/p>
$$
\begin{aligned}
\mathcal{J}_\mathrm{MAP}(\theta_i, \, \theta_j; \, \hat\delta_{i, \, j})
&amp;= \frac{\lvert g'(\hat\delta_{i,j})\rvert}
{\sqrt{2\pi\,\bigl(\sigma_\varepsilon^2 + \sigma_i^2 + \sigma_j^2\bigr)}}
\exp\!\Bigl(-\frac{\bigl(g(\hat\delta_{i, \, j}) - (r_i - r_j)\bigr)^2}
{2\,\bigl(\sigma_\varepsilon^2 + \sigma_i^2 + \sigma_j^2\bigr)}\Bigr)\\
&amp;\quad\;\times\;
\frac{1}{\sqrt{2\pi}\,\sigma_\pi}
\exp\!\Bigl(-\frac{(r_i - r_\pi)^2}{2\,\sigma_\pi^2}\Bigr)
\;\times\;
\frac{1}{\sqrt{2\pi}\,\sigma_\pi}
\exp\!\Bigl(-\frac{(r_j - r_\pi)^2}{2\,\sigma_\pi^2}\Bigr).
\end{aligned}
$$&lt;p>Being again unable to ignore our instincts,&lt;/p>
$$
\begin{equation}
\nabla_{\mathbf r}\log \mathcal{J}_{\mathrm{MAP}}(\theta_i,\theta_j;\hat\delta_{i, \, j})
= \begin{bmatrix}
\displaystyle
\frac{g(\hat\delta_{i, \, j}) - (r_i - r_j)}{\sigma_\varepsilon^2 + \sigma_i^2 + \sigma_j^2}
\\\\
\displaystyle
-\frac{g(\hat\delta_{i, \, j}) - (r_i - r_j)}{\sigma_\varepsilon^2 + \sigma_i^2 + \sigma_j^2}
\end{bmatrix}
-
\begin{bmatrix}
\displaystyle
\frac{r_i - r_\pi}{\sigma_\pi^2}
\\\\
\displaystyle
\frac{r_j - r_\pi}{\sigma_\pi^2}
\end{bmatrix}.
\end{equation}
$$&lt;style>
.box-body > :last-child {
margin-bottom: 0 !important;
}
.box-body > :first-child {
margin-top: 0 !important;
}
&lt;/style>
&lt;div
class="hint-box"
style="
border: 1px solid #000000;
padding: 10px;
border-radius: 5px;
margin: 16px 0;
background-color: rgba(0, 0, 0, 0.05);
"
>
&lt;strong style="display: block; margin-bottom: 5px"
>Checkpoint&lt;/strong
>
&lt;hr
style="
border: none;
border-top: 1px solid #000000;
margin: 10px 0;
width: calc(100%);
"
/>
&lt;div style="font-size: 0.92em" class="box-body">
&lt;p>Let us take a step back for a second, and roughly see what is on the table. Intuitively, we are:&lt;/p>
&lt;ol>
&lt;li>&lt;strong>Observing&lt;/strong> a materialized payoff $p_i$.&lt;/li>
&lt;li>&lt;strong>Inverting&lt;/strong> $g$ to recover the latent skill gap $\hat\delta_{i, \, j}$ that was most likely to produce $p_i$.&lt;/li>
&lt;li>&lt;strong>Comparing&lt;/strong> that inferred gap to our current belief of the skill gap $r_i - r_j$.&lt;/li>
&lt;li>&lt;strong>Deriving&lt;/strong> the change to $r_i$ and $r_j$ would bring our belief closer to $\hat\delta_{i, \, j}$.&lt;/li>
&lt;/ol>
&lt;/div>
&lt;/div>
&lt;p>Then, the gradient-ascent update with step size $k$,&lt;/p>
$$
\begin{equation}
\bold{r}_{t + 1}
\gets
\bold{r}_{t}
+ k\nabla_{\bold{r}}\log\mathcal{J}_\mathrm{MAP}(\theta_i, \, \theta_j; \, \hat\delta_{i, \, j}),
\end{equation}
$$&lt;p>offers a complete recovery (and generalization) of the Elo update after an observed payoff $p_i$.&lt;/p>
&lt;h3 id="discussion">Discussion&lt;/h3>
&lt;h4 id="procedural-discrepancy">Procedural Discrepancy&lt;/h4>
&lt;p>Usually, implementations of Elo updates do not consider a prior. Instead, they simply initialize parameters at some default amount, then do MLE (as opposed to MAP estimation) to produce gradient updates. I decided to display the full MAP estimate because I think it is more principled; if you believe that ratings &amp;ldquo;start off&amp;rdquo; at some amount, that constitutes a bayesian prior in my eyes.&lt;/p>
&lt;h4 id="distribution-discrepancy">Distribution Discrepancy&lt;/h4>
&lt;p>The Elo rating system assumes a logistic distribution on player performance, not gaussian. However, the above procedure will invariantly recover Elo updates as presented in the &lt;a href="#elo-ratings-and-updates">background section&lt;/a> with both distributions (at least in form). I thought it would be somewhat interesting to make it gaussian.&lt;/p>
&lt;h4 id="fixed-parameters">Fixed Parameters&lt;/h4>
&lt;p>In theory, one could estimate the variance parameters using the exact same procedure, by taking the gradient of the joint likelihood with respect to them in addition to the means (the ratings). Surprisingly, people do things similar to this &amp;ndash; although not in this particular way. See the &lt;a href="https://en.wikipedia.org/wiki/Glicko_rating_system">Glicko rating system&lt;/a>.&lt;/p>
&lt;h4 id="redundancy-with-g">Redundancy with $g$&lt;/h4>
&lt;p>You may have noticed that throughout our derivations (most notably in equations $(7)$ and $(8)$) there are $g(\hat\delta_{i, \, j})$ terms that can be safely replaced with $p_i$ by definition, and can be therefore seen as redundant. This is a completely accurate observation.&lt;/p>
&lt;p>I decided to make $g$ explicit to make the fundamental link between payoffs and performance differentials also explicit, which is something I consider to be a lot more principled. In fact, $g$ does not need to be strictly monotonic, as we never explicitly evaluate $g^{-1}(\small\bullet)$. However, not satisfying this property may result in a lack of parameter identifiability, which is easy to forget if you discard the symbol early on.&lt;/p>
&lt;h4 id="weak-ordering">Weak Ordering&lt;/h4>
&lt;p>It is important to acknowledge that mapping player skill to $\mathbb{R}$ and then using $\leq$ to order players is a fundamentally misguided approach to how the world works. In doing so, we establish a weak ordering among players, but completely ignore that some players have qualities that make them strong against some players and weak against others (in a manner that is potentially cyclic).&lt;/p>
&lt;style>
.box-body > :last-child {
margin-bottom: 0 !important;
}
.box-body > :first-child {
margin-top: 0 !important;
}
&lt;/style>
&lt;div
class="hint-box"
style="
border: 1px solid #000000;
padding: 10px;
border-radius: 5px;
margin: 16px 0;
background-color: rgba(0, 0, 0, 0.05);
"
>
&lt;strong style="display: block; margin-bottom: 5px"
>Example&lt;/strong
>
&lt;hr
style="
border: none;
border-top: 1px solid #000000;
margin: 10px 0;
width: calc(100%);
"
/>
&lt;div style="font-size: 0.92em" class="box-body">
&lt;p>To illustrate this, consider three players of rock-paper-scissors. One always plays rock, one always plays paper, and the other scissors. You will find that there is no way of assigning them a real number such that the player with the highest number beats both of the other players in expectation.&lt;/p>
&lt;/div>
&lt;/div>
&lt;p>Still, sometimes we are forced to make rankings which make sense &lt;em>in expectation&lt;/em>. In the real world, there is sufficient variance in player attributes that there are actors that can consistently beat some others. Here, systems such as Elo&amp;rsquo;s bring real utility. But as a human, you should trust your intuition more than some potentially senseless number.&lt;/p>
&lt;h4 id="outcome-prediciton">Outcome Prediciton&lt;/h4>
&lt;p>Further expanding on the inadequacy of ranking players via weak order, consider the very plausible machine learning task of outcome prediction, say, for the game of &lt;a href="https://en.wikipedia.org/wiki/Basketball">Basketball&lt;/a>.&lt;/p>
&lt;p>It is tempting to, for example, train a network $f_\theta : \mathbb{R}^n \to \mathbb{R}$ on $n$-dimensional encodings of teams to predict a scalar value, where you then train in tandem over historic game outcomes $\langle ((a, b), \, y)_i \rangle_{i \in D}$.&lt;/p>
&lt;p>Here, teams $a, \, b \in \mathbb{R}^n$ played each other and achieved outcome $y \in \{-1, 1\}$ for each match $i \in D$. One could optimize under the following loss,&lt;/p>
$$
\mathcal{L}((a, \, b), \, y; \, \theta)
= \log\exp\bigl( 1 + y(f_\theta(a) - f_\theta(b))\bigr)
+ \lambda(f_\theta(a) + f_\theta(b)),
$$&lt;p>where the regularization term helps with stability. Then, $f_\theta$ would essentially become a rating estimator. Whoever does this, however, will have the same fundamental problem as the Elo system; a weak order cannot capture the potentialy cyclic structure of actors&amp;rsquo; dominance on each other.&lt;/p>
&lt;p>The solution, of course, is to instead train another model $f_\theta : \mathbb{R}^{2n} \to \mathbb{R}$ that admits pairings as an input via concatentaion, and implements typical binary cross-entropy loss:&lt;/p>
$$
\mathcal{L}((a, \, b), \, y; \, \theta)
= -\bold{I}_y\,\log\bigl(\sigma(f_\theta(a \Vert b))\bigr) - (1 - \bold{I}_y)\,\log\bigl(1-\sigma(f_\theta(a \Vert b))\bigr).
$$&lt;p>However, there is no free lunch &amp;ndash; when training over &lt;em>pairs&lt;/em> of teams in $T$, the sample space of the task grows with the size of $T \times T$, naturally increasing the amount of out-of-distribution data for your model quadratically. Of course, this problem was ignored by the first formulation too, just in a different way.&lt;/p>
&lt;hr>
&lt;h2 id="appendix">Appendix&lt;/h2>
&lt;h3 id="gaussian-convolution">Gaussian Convolution&lt;/h3>
&lt;p>Here, I justify equation $(6)$ by instantiating a proof of the fact that the convolution of two gaussians is another gaussian determined by the parameters of the original gaussians.&lt;/p>
&lt;h4 id="proof">Proof&lt;/h4>
&lt;p>This was made via ChatGPT with &lt;code>o4-mini-high&lt;/code> and adjusted by me, because you can probably find it in a textbook somewhere. Let&lt;/p>
$$
f(d)=\frac{1}{\sqrt{2\pi}\,\sigma_1}\exp\!\Bigl(-\frac{(d-\mu_1)^2}{2\,\sigma_1^2}\Bigr),
\quad
g(d)=\frac{1}{\sqrt{2\pi}\,\sigma_2}\exp\!\Bigl(-\frac{(d-\mu_2)^2}{2\,\sigma_2^2}\Bigr).
$$&lt;p>We wish to show&lt;/p>
$$
\int_{-\infty}^{\infty} f(d)\,g(d)\,dd
=\frac{1}{\sqrt{2\pi\,(\sigma_1^2+\sigma_2^2)}}\,
\exp\!\Bigl(-\frac{(\mu_1-\mu_2)^2}{2\,(\sigma_1^2+\sigma_2^2)}\Bigr).
$$&lt;p>Set $A=\sigma_1^2$ and $B=\sigma_2^2$. Then,&lt;/p>
$$
f(d)\,g(d)
=\frac{1}{2\pi\sqrt{AB}}
\exp\!\Bigl(-\tfrac12\bigl[\tfrac{(d-\mu_1)^2}{A}+\tfrac{(d-\mu_2)^2}{B}\bigr]\Bigr).
$$&lt;p>Combine quadratic terms:&lt;/p>
$$
B(d-\mu_1)^2 + A(d-\mu_2)^2
=(A+B)\Bigl(d-\frac{B\mu_1 + A\mu_2}{A+B}\Bigr)^2
+\frac{AB}{A+B}(\mu_1-\mu_2)^2.
$$&lt;p>Define&lt;/p>
$$
m=\frac{B\mu_1 + A\mu_2}{A+B},
\quad
C=\frac{AB}{A+B}.
$$&lt;p>Then,&lt;/p>
$$
\int f(d)\,g(d)\,dd
=\frac{1}{2\pi\sqrt{AB}}
\int
\exp\!\Bigl(-\tfrac12\bigl[\tfrac{(d-m)^2}{C}+\tfrac{(\mu_1-\mu_2)^2}{A+B}\bigr]\Bigr)
\,dd.
$$&lt;p>Factor out the constant term and use&lt;/p>
$$
\int \exp\Bigl(-\frac{(d-m)^2}{2C}\Bigr) \, dd
=\sqrt{2\pi\,C}.
$$&lt;p>Hence,&lt;/p>
$$
\begin{aligned}
\int f(d)\,g(d)\,dd
&amp;=\frac{\sqrt{2\pi\,C}}{2\pi\sqrt{AB}}
\exp\!\Bigl(-\frac{(\mu_1-\mu_2)^2}{2\,(A+B)}\Bigr)\\
&amp;=\frac{1}{\sqrt{2\pi\,(A+B)}}
\exp\!\Bigl(-\frac{(\mu_1-\mu_2)^2}{2\,(A+B)}\Bigr). \quad \square
\end{aligned}
$$&lt;h4 id="instantiation">Instantiation&lt;/h4>
&lt;p>Consider the expression which $(6)$ was derived from,&lt;/p>
$$
\begin{aligned}
&amp;\int
\frac{1}{\sqrt{2\pi}\,\sigma_\varepsilon}
\exp\!
\overbrace{
\Bigl(-\frac{\bigl(g(\hat\delta_{i, \, j}) - d\bigr)^2}{2\,\sigma_\varepsilon^2}\Bigr)
}^{
\text{Quadratic term is symmetric.}
}
\;|g'(\hat\delta_{i, \, j})|\; \\
&amp;\quad\;\quad\;\times \frac{1}{\sqrt{2\pi(\sigma_i^2+\sigma_j^2)}}
\exp\!\Bigl(-\frac{(d - (r_i - r_j))^2}{2(\sigma_i^2+\sigma_j^2)}\Bigr)
\,dd.
\end{aligned}
$$&lt;p>Now, use the substitutions&lt;/p>
$$
\mu_1 = g(\hat\delta_{i, \, j}),
\quad
\mu_2 = r_i - r_j,
\quad
A = \sigma_\varepsilon^2,
\quad
B = \sigma_i^2 + \sigma_j^2,
$$&lt;p>and re-attach the Jacobian factor $|g^\prime(\hat\delta_{i, \, j})|$ to recover&lt;/p>
$$
\mathcal{J}(\theta_i,\theta_j;\hat\delta_{i, \, j})
=\frac{|g'(\hat\delta_{i, \, j})|}
{\sqrt{2\pi\,(\sigma_\varepsilon^2 + \sigma_i^2 + \sigma_j^2)}}\,
\exp\!\Bigl(-\frac{(g(\hat\delta_{i, \, j}) - (r_i - r_j))^2}
{2\,(\sigma_\varepsilon^2 + \sigma_i^2 + \sigma_j^2)}\Bigr).
$$&lt;div class="footnotes" role="doc-endnotes">
&lt;hr>
&lt;ol>
&lt;li id="fn:1">
&lt;p>I modified a term in $e_p$ to exclude scaling factors, to make it look less crazy. These scaling factors make the resulting ratings quite practical by allowing one to make comparisons like &amp;ldquo;player $i$ is 10x better than $j$ if $i$&amp;rsquo;s rating is 400 points higher.&amp;rdquo;&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:2">
&lt;p>Taking the $\log$ makes it easier to deal with multiple samples, as it turns the product in $(1)$ into a sum. But here, we only use one sample, so it is useless. However, tradition is important for learning.&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;/ol>
&lt;/div></description></item><item><title>Poem 1. "Delia"</title><link>https://www.maxfierro.me/poem-1.-delia/</link><pubDate>Sun, 27 Apr 2025 00:00:00 +0000</pubDate><guid>https://www.maxfierro.me/poem-1.-delia/</guid><description>&lt;p>Dedicated to my beautiful mother, Delia García.&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt"> 1
&lt;/span>&lt;span class="lnt"> 2
&lt;/span>&lt;span class="lnt"> 3
&lt;/span>&lt;span class="lnt"> 4
&lt;/span>&lt;span class="lnt"> 5
&lt;/span>&lt;span class="lnt"> 6
&lt;/span>&lt;span class="lnt"> 7
&lt;/span>&lt;span class="lnt"> 8
&lt;/span>&lt;span class="lnt"> 9
&lt;/span>&lt;span class="lnt">10
&lt;/span>&lt;span class="lnt">11
&lt;/span>&lt;span class="lnt">12
&lt;/span>&lt;span class="lnt">13
&lt;/span>&lt;span class="lnt">14
&lt;/span>&lt;span class="lnt">15
&lt;/span>&lt;span class="lnt">16
&lt;/span>&lt;span class="lnt">17
&lt;/span>&lt;span class="lnt">18
&lt;/span>&lt;span class="lnt">19
&lt;/span>&lt;span class="lnt">20
&lt;/span>&lt;span class="lnt">21
&lt;/span>&lt;span class="lnt">22
&lt;/span>&lt;span class="lnt">23
&lt;/span>&lt;span class="lnt">24
&lt;/span>&lt;span class="lnt">25
&lt;/span>&lt;span class="lnt">26
&lt;/span>&lt;span class="lnt">27
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-text" data-lang="text">&lt;span class="line">&lt;span class="cl">Madre que no me suelta el estandarte,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">madre de selva que me cubre como yedra,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">estás completamente marcada en mí;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">me arrullas desde mi penumbra,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">me susurras el nombre de Dios.
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Ya quítame de aquí que me muero, madre,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">dame las palabras que me corresponden,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">sacude desde tu sigilo mi sangre
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">y hazme llegar tu amor.
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Soledad eterna y vida corta,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">nunca te me vayas a ir.
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Madre que a ciegas todo lo ve;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">corazón de parota, palabras de luz.
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Eres la cumbre de este desierto,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">autora del método mío;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">eres madre de todo.
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Águila de quinientas virtudes,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">reguilete infinito de colores,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">piedra de orgullo inexorable.
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Árbol terrestre que toca el cielo;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">sosiego inminente,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">calor solar.&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div></description></item><item><title>N-Gram Model of Optimal Policy on Interpretable Abstractions</title><link>https://www.maxfierro.me/n-gram-model-of-optimal-policy-on-interpretable-abstractions/</link><pubDate>Fri, 21 Feb 2025 00:00:00 +0000</pubDate><guid>https://www.maxfierro.me/n-gram-model-of-optimal-policy-on-interpretable-abstractions/</guid><description>&lt;aside id="toc">
&lt;details>
&lt;summary>&amp;nbsp;&lt;strong> Table of contents&lt;/strong>&lt;/summary>
&lt;nav id="TableOfContents">
&lt;ul>
&lt;li>&lt;a href="#abstract">Abstract&lt;/a>&lt;/li>
&lt;li>&lt;a href="#background">Background&lt;/a>
&lt;ul>
&lt;li>&lt;a href="#n-gram-modeling">$N$-Gram Modeling&lt;/a>&lt;/li>
&lt;li>&lt;a href="#rules-of-thumb">Rules of Thumb&lt;/a>&lt;/li>
&lt;li>&lt;a href="#markov-abstractions">Markov Abstractions&lt;/a>&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>&lt;a href="#model">Model&lt;/a>&lt;/li>
&lt;li>&lt;a href="#training">Training&lt;/a>
&lt;ul>
&lt;li>&lt;a href="#sources">Sources&lt;/a>&lt;/li>
&lt;li>&lt;a href="#sinks">Sinks&lt;/a>&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>&lt;a href="#inference">Inference&lt;/a>&lt;/li>
&lt;li>&lt;a href="#remarks">Remarks&lt;/a>
&lt;ul>
&lt;li>&lt;a href="#explorations">Explorations&lt;/a>&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>&lt;a href="#credits">Credits&lt;/a>&lt;/li>
&lt;/ul>
&lt;/nav>
&lt;/details>
&lt;/aside>
&lt;h2 id="abstract">Abstract&lt;/h2>
&lt;p>Generally, the choice of functional form of a policy model and of the domain that it operates on forms the basis of interpretability. Domains that are the image of class-valued abstractions of the observable state space are desireable because humans excel at visual classification tasks that map onto (largely) discrete characteristics. Hence, we provide an interpretable functional form that is valid over multiclass spaces in the form of an $n$-gram model approximation of dynamics under optimal policy.&lt;/p>
&lt;hr>
&lt;h2 id="background">Background&lt;/h2>
&lt;h3 id="n-gram-modeling">$N$-Gram Modeling&lt;/h3>
&lt;p>$n$-gram models were developed as a rudimentary statistical model of language. Assuming an $n^{th}$-order &lt;a href="https://en.wikipedia.org/wiki/Markov_property">Markov property&lt;/a> on the probability of a word $w_{t + 1}$ at discrete time $t + 1$ given a history $\langle w_i \rangle_{i \in [1, \, t]}$,&lt;/p>
$$
\begin{equation}
P(w_1, \, \ldots, w_{t + 1}) =
P(w_1, \dots, w_{t - n - 1}) \prod_{i = 0}^{n - 1} P(w_{t+1} \mid w_{t-n}, \dots, w_t),
\end{equation}
$$&lt;p>straightforward &lt;a href="https://en.wikipedia.org/wiki/Maximum_likelihood_estimation">maximum likelihood estimation&lt;/a> shows that this probability is the proportion of times that the sequence $\langle w_{t-n}, \, \ldots, w_t \rangle$ appears before $w_{t + 1}$ in observations. This is can be seen as frequentist inference, making the probability measure intuitive.&lt;/p>
&lt;p>When applied to a set of symbols (words) $S$, such a model implies a Markov chain over the product $S^n = S \times \cdots \times S$. It follows that the chain&amp;rsquo;s &lt;a href="https://en.wikipedia.org/wiki/Stochastic_matrix">stochastic matrix&lt;/a> $\Pi$ is an element of $\mathbb{R}^{k \times k^n}$ with $k = |S|$, so the number of learnable parameters grows exponentially with the order of the model for a fixed $S$.&lt;/p>
&lt;p>As a result of upholding the Markov property, $n$-gram models are stationary&lt;sup id="fnref:1">&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref">1&lt;/a>&lt;/sup>. This flaw makes them incompatible with natural language to any useful extent, and is directly addressed by modern language models through mechanisms like &lt;a href="https://en.wikipedia.org/wiki/Attention_(machine_learning)">attention&lt;/a>.&lt;/p>
&lt;h3 id="rules-of-thumb">Rules of Thumb&lt;/h3>
&lt;p>Many heuristics taught in strategic decision-making can be described to be conditionals on the result of classification exercises. For example, there is a rule of thumb in Chess which calls for protecting one&amp;rsquo;s own king if it is open.&lt;/p>
&lt;p>When implementing this heuristic, a player performs classification via a mapping $\phi : S \to \{\text{Yes}, \, \text{No}\}$ from the set of board states to an answer to the heuristic&amp;rsquo;s condition, where experience insists that if a player&amp;rsquo;s $\phi$ is sufficiently close to ground truth, they obtain a performance improvement in expectation.&lt;/p>
&lt;p>Naturally, the complexity involved in evaluating a classification $\phi_h(s)$ for some state $s \in S$ should be minimal so that its heuristic $h$ can be implemented without computer assistance. In many cases, their simplicity to humans (i.e., how intuitive they are) directly translates to the simplicity of implementing them in other models of computation. Put simply, it is generally easy to program such functions.&lt;/p>
&lt;p>However, humans can obtain an &lt;em>unexplainable&lt;/em> intuitive understanding of a game. In such cases, the classification exercises they carry out for their expert heuristics are mappings onto a set of abstract characteristics (e.g., area &amp;lsquo;crowdedness&amp;rsquo; in Chess). This can be seen as &lt;a href="https://en.wikipedia.org/wiki/Feature_learning">representation learning&lt;/a>.&lt;/p>
&lt;p>But even in these cases, it is relatively simple to train a model which replicates a human&amp;rsquo;s capacity to perform classification for their own expert-level heuristics by having them label training datasets by hand. Hence, one can generally assume access to efficient classifiers for human-interpretable features.&lt;/p>
&lt;h3 id="markov-abstractions">Markov Abstractions&lt;/h3>
&lt;p>Given an abstraction $\phi : S \to Z$ over a state set $S$, the lack of an injectivity constraint could produce a situation where, for a policy $\pi_S : S \to S$ with $\pi(s) = a$ and $\pi(s^\prime) = b$ on distinct $a, \, b, \, s, \, s^\prime \in S$,&lt;/p>
$$
\begin{equation}
\phi(s) = \phi(s^\prime) \;\; \text{and} \;\; \phi(a) \neq \phi(b).
\end{equation}
$$&lt;p>Hence, learning a counterpart $\pi_Z : Z \to Z$ which preserves the information in $\pi_S$ could be impossible, as $\pi_Z(\alpha(s)) = \pi_Z(\alpha(s^\prime))$ would have to &amp;lsquo;retain&amp;rsquo; the information of both $\pi_S(s) = a$ and $\pi_S(s^\prime) = b$. Such an abstraction $\phi$ is said to not be Markov, as its image contains insufficient information to induce a dynamics that corresponds to the behavior specified by $\pi_S$ in $S$.&lt;/p>
&lt;p>In the context of interpretable rules of thumb, reducing the state space $S$ to significantly smaller abstract spaces (e.g., taking decision in $\{\text{Yes}, \, \text{No}\}$ while implementing a heuristic) nearly guarantees that the abstraction which mediated the reduction is not Markov&lt;sup id="fnref:2">&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref">2&lt;/a>&lt;/sup>.&lt;/p>
&lt;hr>
&lt;h2 id="model">Model&lt;/h2>
&lt;p>Let $\langle \phi^{(\alpha)} : S \to Z^{(\alpha)} \rangle_{\alpha \in \Alpha}$ be a collection of abstractions enumerated in $\Alpha$, and $\pi_S : S \to S$ a policy over $S$. We propose modeling class-conditional transition probability distributions,&lt;/p>
$$
\begin{equation}
P^{(\alpha)}_{t+1}(k) = P[\phi^{(\alpha)}(\pi^{t + 1}(s)) = k \; | \; \phi^{(\alpha)}(\pi^t(s)) = k_t, \, \ldots, \, \phi^{(\alpha)}(\pi^0(s)) = k_0],
\end{equation}
$$&lt;p>of the elements $k_i \in Z^{(\alpha)}$ via an $n$-gram model. This effectively establishes sequences in $\phi^{(\alpha)}(S)$ via repeated aplication of $\pi$ within $S$ (following the dynamics of $\pi$), so that in the above equation, we allow $\pi^t(s) = \pi_t(\pi_{t-1}(\ldots\pi_1(s)))$.
This yields a collection of stochastic matrices $\langle \Pi^{(\alpha)} \rangle_{\alpha \in \Alpha}$ with&lt;/p>
$$
\Pi^{(\alpha)}_{i, j} = P[\, i \text{ is observed at time } t \; | \; j \text{ is observed immediately before}\,],
$$&lt;p>where $i \in Z^{(\alpha)}$ and $j \in (Z^{(\alpha)})^n$. The amount of learnable parameters (i.e., the size) of such a model $M = \langle \Pi^{(a)} \rangle_{\alpha \in \Alpha}$ is therefore&lt;/p>
$$
\begin{equation}
|M| = \sum_{\alpha \in \Alpha} |Z^{(\alpha)}|^n \, (|Z^{(\alpha)}| - 1).
\end{equation}
$$&lt;p>The finalized abstract policy $\pi_Z$ would use this model to operate on $Z = \large{\times_{\alpha \in \Alpha}} Z^{(\alpha)}$ (see the &lt;a href="#inference">inference section&lt;/a> for a high-level overview of evaluation). By operating on the cross-product of multiple sufficiently independent heuristics, $\pi_Z$ could closely approximate $\pi_S$ while remaining interpretable.&lt;/p>
&lt;hr>
&lt;h2 id="training">Training&lt;/h2>
&lt;p>The parameter space for a model $M$ of order $n$ is precisely&lt;/p>
$$
\begin{equation}
\Theta =
\large{\times_{\alpha \in \Alpha}}
\large{\times_{k \in Z^{(\alpha)}}}
\bold{S}^{|Z^{(\alpha)}|^n},
\end{equation}
$$&lt;p>(where $\bold{S}^d$ denotes the $d$-dimensional unit sphere). Finding optimal parameters $\theta^* \in \Theta$ follows standard procedure as in any $n$-gram model. Hence, we simply provide the generic closed-form solution written in terms of the objects at hand,&lt;/p>
$$
\begin{equation}
\Pi^{(\alpha)}_{i, j} = \frac{1}{N}
\sum_{s \in S}
I^{(\alpha)}_{i,j}(\pi^n(s), \langle \pi^i(s) \rangle_{i \in [0, \, n)}),
\end{equation}
$$&lt;p>where&lt;/p>
$$
\begin{equation*}
I^{(\alpha)}_{i,j}(a, \langle b_i \rangle_{i \in [0, \, n)}) =
\begin{cases}
1 &amp; \text{if } \; \phi^{(\alpha)}(a) = i \; \text{ and } \; \phi^{(\alpha)}(b) = j, \\
0 &amp; \text{otherwise},
\end{cases}
\end{equation*}
$$&lt;p>and $N$ is the number of length-$(n + 1)$ contiguous subsequences in the dynamics of $\pi$, which can be easily sketched while computing the sum in $(5)$.&lt;/p>
&lt;h3 id="sources">Sources&lt;/h3>
&lt;p>The nature of the policy operator $\pi$ is such that there exists some $s \in S$ wihtout an $s^\prime$ with $\pi(s^\prime) = s$. Here, $s$ is called a source within the dynamics of $\pi$. This constitutes a problem, as the start $s_0$ of the game for which $S$ is a state space is necessarily a source (which may not be unique); therefore, an attempt to find an $n$-length sequence of moves leading up to a state less than $n$ applications of $\pi$ away from a source in its dynamics may fail.&lt;/p>
&lt;p>This is important because it is a step necessary to compute the $\Pi^{(\alpha)}_{i, j}$$^{\text{th}}$ parameter of the model, where $i$ is the parameter that is too close to a source to have a valid $n$-gram history. A solution which does not significantly alter transition distributions of $\Pi^{(\alpha)}$ is to sample missing elements of $n$-gram histories from a uniform distribution while computing its entries. If this measure is taken, $N$ can be set to $|S|$ in $(5)$, avoiding the need for sketching proportions.&lt;/p>
&lt;h3 id="sinks">Sinks&lt;/h3>
&lt;p>In many traditional definitions of a policy $\pi$, there may exist elements $s^\prime_i$ of $S$ over which $\pi$ is not defined, as they are terminal in the game under representation. These are sinks in the dynamics of $\pi$, and should never be considered as part of a history while computing model parameters.&lt;/p>
&lt;hr>
&lt;h2 id="inference">Inference&lt;/h2>
&lt;p>When at a state $s \in S$, a human player can consider the set of next possible states $t(s)$ (where the transition function $t : S \to \mathcal{P}(S)$ is set-valued). Optimally, combinatorial optimization would be done across all elements $s^\prime \in t(s)$ under the MLE objective of maximizing the probability that their action is observed across all abstract state space transitions.&lt;/p>
&lt;p>While this is possible to an extent due to the simplicity of the abstractions in consideration (which map onto small sets of classes, reducing maximization objectives during MLE), the true value of the model is in the subjective analysis of each $\Pi^{(\alpha)}$. Additionally, quantitative techniques (such as finding the static distribution and convergence rate of these matrices) may illustrate interpretable patterns in the dynamics of $\pi$, depending on $\langle \phi^{(\alpha)} \rangle$.&lt;/p>
&lt;hr>
&lt;h2 id="remarks">Remarks&lt;/h2>
&lt;p>Establishing an approximation of optimal policy in the form of a Markov process provides an interpretable functional representation that is able to work with intuitive abstractions. Thus, it is a valid representation of a praxis, and the above methods effectively &amp;rsquo;translate&amp;rsquo; from policies of arbitrary form.&lt;/p>
&lt;h3 id="explorations">Explorations&lt;/h3>
&lt;p>The following are left as potential avenues of analysis relating to the model family.&lt;/p>
&lt;ul>
&lt;li>Smoothing techniques, and an analysis of their benefit in the context of optimal policy.&lt;/li>
&lt;li>Non-interpretability of $n$-gram model successors; in particular transformer attention.&lt;/li>
&lt;li>Skip-gram models as an extension of this family.&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h2 id="credits">Credits&lt;/h2>
&lt;p>Thank you to my good friend Humberto Gutierrez for spending late nights discussing the concept of policy abstraction with me, and helping me organize many ideas about policies over continuous abstractions.&lt;/p>
&lt;div class="footnotes" role="doc-endnotes">
&lt;hr>
&lt;ol>
&lt;li id="fn:1">
&lt;p>A stationary model&amp;rsquo;s probability assignments are invariant with respect to shifts in the time index.&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:2">
&lt;p>Which is a way of saying that rules of thumb are not globally applicable.&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;/ol>
&lt;/div></description></item><item><title>Representation Concepts in Game-Theoretic Systems</title><link>https://www.maxfierro.me/representation-concepts-in-game-theoretic-systems/</link><pubDate>Sat, 20 Apr 2024 00:00:00 +0000</pubDate><guid>https://www.maxfierro.me/representation-concepts-in-game-theoretic-systems/</guid><description>&lt;aside id="toc">
&lt;details>
&lt;summary>&amp;nbsp;&lt;strong> Table of contents&lt;/strong>&lt;/summary>
&lt;nav id="TableOfContents">
&lt;ul>
&lt;li>&lt;a href="#abstract">Abstract&lt;/a>&lt;/li>
&lt;li>&lt;a href="#materials">Materials&lt;/a>
&lt;ul>
&lt;li>&lt;a href="#errata">Errata&lt;/a>&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>&lt;a href="#background">Background&lt;/a>
&lt;ul>
&lt;li>&lt;a href="#game-theory">Game theory&lt;/a>&lt;/li>
&lt;li>&lt;a href="#computer-science">Computer science&lt;/a>&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>&lt;a href="#representation">Representation&lt;/a>
&lt;ul>
&lt;li>&lt;a href="#rulesets">Rulesets&lt;/a>&lt;/li>
&lt;li>&lt;a href="#abstraction">Abstraction&lt;/a>&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>&lt;a href="#design">Design&lt;/a>
&lt;ul>
&lt;li>&lt;a href="#interface-items">Interface items&lt;/a>&lt;/li>
&lt;li>&lt;a href="#parallel-dp">Parallel DP&lt;/a>&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>&lt;a href="#meta-content">Meta-content&lt;/a>&lt;/li>
&lt;/ul>
&lt;/nav>
&lt;/details>
&lt;/aside>
&lt;h2 id="abstract">Abstract&lt;/h2>
&lt;p>I gave an introductory talk about how computer systems represent, compute, and store noteworthy attributes about a particular class of games. This was part of &lt;a href="http://kyleburke.info/sprouts/">Sprouts &amp;lsquo;24&lt;/a>, an undergraduate-oriented conference primarily dedicated to combinatorial game theory.&lt;/p>
&lt;p>Here, I share the materials I used during my presentation and share a longer-form (but very different) exploration of the topic I covered. Generically, it can be useful for all problems where one must run a domain-specific algorithm on a graph that is not materialized in memory, but can be traversed in linear time from a starting node and a set of functions that derive adjacent edges and nodes from existing ones (a so-called &lt;a href="https://en.wikipedia.org/wiki/Implicit_graph">implicit graph&lt;/a>).&lt;/p>
&lt;p>As a concrete case of this abstract class of problems, I present concepts that support the process of finding a Nash Equilibrium for a specific subclass of games through cousins of the minimax algorithm. However, these concepts are also applicable to other such problems (e.g., the membership problem&lt;sup id="fnref:1">&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref">1&lt;/a>&lt;/sup> for decidable subclasses of context-free grammars).&lt;/p>
&lt;hr>
&lt;h2 id="materials">Materials&lt;/h2>
&lt;p>The slides I used during my talk can be found below. Anyone can use them without my permission.&lt;/p>
&lt;script type="text/javascript" src= '/js/pdf-js/build/pdf.js'>&lt;/script>
&lt;style>
#embed-pdf-container {
position: relative;
width: 100%;
height: auto;
min-height: 20vh;
}
.pdf-canvas {
border: 1px solid black;
direction: ltr;
width: 100%;
height: auto;
display: none;
}
#the-canvas {
border: 1px solid black;
direction: ltr;
width: 100%;
height: auto;
display: none;
}
.pdf-loadingWrapper {
display: none;
justify-content: center;
align-items: center;
width: 100%;
height: 350px;
}
.pdf-loading {
display: inline-block;
width: 50px;
height: 50px;
border: 3px solid #d2d0d0;;
border-radius: 50%;
border-top-color: #383838;
animation: spin 1s ease-in-out infinite;
-webkit-animation: spin 1s ease-in-out infinite;
}
#overlayText {
word-wrap: break-word;
display: grid;
justify-content: end;
}
#overlayText a {
position: relative;
top: 10px;
right: 4px;
color: #000;
margin: auto;
background-color: #eeeeee;
padding: 0.3em 1em;
border: solid 2px;
border-radius: 12px;
border-color: #00000030;
text-decoration: none;
}
#overlayText svg {
height: clamp(1em, 2vw, 1.4em);
width: clamp(1em, 2vw, 1.4em);
}
@keyframes spin {
to { -webkit-transform: rotate(360deg); }
}
@-webkit-keyframes spin {
to { -webkit-transform: rotate(360deg); }
}
&lt;/style>&lt;div class="embed-pdf-container" id="embed-pdf-container-de1ff50c">
&lt;div class="pdf-loadingWrapper" id="pdf-loadingWrapper-de1ff50c">
&lt;div class="pdf-loading" id="pdf-loading-de1ff50c">&lt;/div>
&lt;/div>
&lt;canvas class="pdf-canvas" id="pdf-canvas-de1ff50c">&lt;/canvas>
&lt;/div>
&lt;div class="pdf-paginator" id="pdf-paginator-de1ff50c">
&lt;button id="pdf-prev-de1ff50c">Previous&lt;/button>
&lt;button id="pdf-next-de1ff50c">Next&lt;/button> &amp;nbsp; &amp;nbsp;
&lt;span>
&lt;span class="pdf-pagenum" id="pdf-pagenum-de1ff50c">&lt;/span> / &lt;span class="pdf-pagecount" id="pdf-pagecount-de1ff50c">&lt;/span>
&lt;/span>
&lt;a class="pdf-source" id="pdf-source-de1ff50c" href="https://www.maxfierro.me/pdf/slides-sprouts-2024.pdf">[pdf]&lt;/a>
&lt;/div>
&lt;noscript>
View the PDF file &lt;a class="pdf-source" id="pdf-source-noscript-de1ff50c" href="https://www.maxfierro.me/pdf/slides-sprouts-2024.pdf">here&lt;/a>.
&lt;/noscript>
&lt;script type="text/javascript">
(function(){
var url = '\/pdf\/slides-sprouts-2024.pdf';
var hidePaginator = "" === "true";
var hideLoader = "" === "true";
var selectedPageNum = parseInt("") || 1;
var pdfjsLib = window['pdfjs-dist/build/pdf'];
if (pdfjsLib.GlobalWorkerOptions.workerSrc == '')
pdfjsLib.GlobalWorkerOptions.workerSrc = "https:\/\/www.maxfierro.me\/" + 'js/pdf-js/build/pdf.worker.js';
var pdfDoc = null,
pageNum = selectedPageNum,
pageRendering = false,
pageNumPending = null,
scale = 3,
canvas = document.getElementById('pdf-canvas-de1ff50c'),
ctx = canvas.getContext('2d'),
paginator = document.getElementById("pdf-paginator-de1ff50c"),
loadingWrapper = document.getElementById('pdf-loadingWrapper-de1ff50c');
showPaginator();
showLoader();
function renderPage(num) {
pageRendering = true;
pdfDoc.getPage(num).then(function(page) {
var viewport = page.getViewport({scale: scale});
canvas.height = viewport.height;
canvas.width = viewport.width;
var renderContext = {
canvasContext: ctx,
viewport: viewport
};
var renderTask = page.render(renderContext);
renderTask.promise.then(function() {
pageRendering = false;
showContent();
if (pageNumPending !== null) {
renderPage(pageNumPending);
pageNumPending = null;
}
});
});
document.getElementById('pdf-pagenum-de1ff50c').textContent = num;
}
function showContent() {
loadingWrapper.style.display = 'none';
canvas.style.display = 'block';
}
function showLoader() {
if(hideLoader) return
loadingWrapper.style.display = 'flex';
canvas.style.display = 'none';
}
function showPaginator() {
if(hidePaginator) return
paginator.style.display = 'block';
}
function queueRenderPage(num) {
if (pageRendering) {
pageNumPending = num;
} else {
renderPage(num);
}
}
function onPrevPage() {
if (pageNum &lt;= 1) {
return;
}
pageNum--;
queueRenderPage(pageNum);
}
document.getElementById('pdf-prev-de1ff50c').addEventListener('click', onPrevPage);
function onNextPage() {
if (pageNum >= pdfDoc.numPages) {
return;
}
pageNum++;
queueRenderPage(pageNum);
}
document.getElementById('pdf-next-de1ff50c').addEventListener('click', onNextPage);
pdfjsLib.getDocument(url).promise.then(function(pdfDoc_) {
pdfDoc = pdfDoc_;
var numPages = pdfDoc.numPages;
document.getElementById('pdf-pagecount-de1ff50c').textContent = numPages;
if(pageNum > numPages) {
pageNum = numPages
}
renderPage(pageNum);
});
})();
&lt;/script>
&lt;h3 id="errata">Errata&lt;/h3>
&lt;p>Here are the mistakes I have found in the slides:&lt;/p>
&lt;ol>
&lt;li>In slide 10, the first bullet point should also restrain the set of games under consideration to be extensive-form and non-collaborative, as implied by the subsequent definition in slides 11-15.&lt;/li>
&lt;li>In slide 20, the formulation $\langle N, S, p, u \rangle$ should also include a transition function $t : S \to \mathcal{P}(S)$, where if $s$ is a state corresponding to history $h$, then the history $h&amp;rsquo;$ corresponding to $s&amp;rsquo;$ should be the same as $h$ with an additional action appended for all $s&amp;rsquo; \in t(s)$.&lt;/li>
&lt;li>In slide 28, the partition should not necessarily minimize the sum of the conductance of all cuts that produce the partition. Instead, the ideal partition would be a solution to the &lt;a href="https://en.wikipedia.org/wiki/Graph_partition#:~:text=%5B4%5D-,Problem,-%5Bedit%5D">balanced partition problem&lt;/a>, where optimal parameters are determined from hardware-related constraints (such as the cost of inter-process communication). The goal is to balance parallelism with its own overhead.&lt;/li>
&lt;/ol>
&lt;hr>
&lt;h2 id="background">Background&lt;/h2>
&lt;p>In the interest of accessibility, I will briefly cover useful basics in game theory and computer science that seldom find their way into students&amp;rsquo; syllabi or are otherwise worth refreshing. If you think you can safely skip this, you are probably right.&lt;/p>
&lt;h3 id="game-theory">Game theory&lt;/h3>
&lt;p>The generic setup of a game is some amount of &amp;ldquo;players&amp;rdquo; taking actions according to their own interests or preferences, potentially affecting other players in the process. From the point of view of a single player, a game is an optimization problem that seeks to find an &amp;ldquo;optimal strategy&amp;rdquo; from the information available to them. This is an assumption known as &amp;ldquo;individual rationality&amp;rdquo; that pervades most of game theory.&lt;/p>
&lt;p>But from a global point of view, there is no obvious question to ask about a game. This is why games are not problems; they are situations that we can ask different questions about. But &lt;em>per se&lt;/em>, games are not aching to be solved. To ask specific questions with some hope of rigor, a lot of effort has been placed into defining classes of games that posses different characteristics.&lt;/p>
&lt;h4 id="taxonomy-of-games">Taxonomy of games&lt;/h4>
&lt;p>There are a lot of classes of games. They are separated by the mathematical properties of their setting and participants, among other factors.&lt;/p>
&lt;p>There is no global dictionary or atlas for game classes, as interpretations can become nuanced to the extent of opinion. Hence, anytime someone makes a statement in game theory they must specify the class of games it targets. In this article, we will target games that are:&lt;/p>
&lt;ol>
&lt;li>
&lt;p>&lt;strong>Perfect-information.&lt;/strong> Here, all players know everything in the universe that could possibly help them make or avoid any decision, except the decisions that other players will make. Most forms of Poker are not perfect-information, as the exact location of the cards is unknown.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Deterministic.&lt;/strong> Here, if all players choose a strategy and never change it, there is only one possible outcome for the game. Chess is deterministic, because if players make the exact same moves in two different games they are guaranteed to achieve the same result.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Sequential.&lt;/strong> More intuitive superset of &lt;a href="https://cdn.nba.com/headshots/nba/latest/1040x760/2544.png" style="color: inherit; text-decoration: none">extensive-form games&lt;/a>. Here, all actions that players can take are indivisible. Soccer is not discrete, because players&amp;rsquo; movements constitute their actions and it is possible to divide any movement into a shorter one.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Extensive-form.&lt;/strong> The adjective &amp;ldquo;extensive-form&amp;rdquo; refers to games that can be written in extensive form, which is a kind of mathematical template. Here, games are defined in terms of the histories of actions that could be observed by the players, and the preferences each player has among them.&lt;/p>
&lt;/li>
&lt;/ol>
&lt;h4 id="solution-concepts">Solution concepts&lt;/h4>
&lt;p>There are some questions that are so broadly-applicable in terms of the classes of games they can target that they achieve the special status of a &lt;strong>solution concept.&lt;/strong> This is a term that refers to a characteristic can be observed in a useful set of game classes.&lt;/p>
&lt;p>A very human thing to ask about broad categories of games is who will win. As it turns out, there is no real answer to this question most of the time, because it can come across obstacles like chance, incomplete information, and lack of clarity around the word &amp;ldquo;win.&amp;rdquo; An equally important yet more applicable question, however, is what strategy each player should take to achieve the best possible result for themselves.&lt;/p>
&lt;p>In many cases, it is necessary to tack on additional nuances to this question to be able to answer it. One such refinement of the question (which revolutionized economics) asks which strategy each player should adopt so that no single player could change their own and benefit from it. A pairing of players to strategies is known as a &lt;strong>strategy profile&lt;/strong>, and those that satisfy the above property are known as &lt;strong>Nash Equilibria&lt;/strong>.&lt;/p>
&lt;p>The strategies and strategy profiles that allow players to act probabilistically are called &lt;strong>mixed&lt;/strong>. Mixed strategies are tantamount to sampling &lt;a href="https://en.wikipedia.org/wiki/Probability_distribution">probability distributions&lt;/a> of &lt;strong>pure strategies&lt;/strong>, which themselves specify deterministic actions. In 1950, John Nash defined the concept of a Nash Equilibrium (NE), additionally proving that there exists such a mixed strategy profile in all games &lt;sup id="fnref:2">&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref">2&lt;/a>&lt;/sup>.&lt;/p>
&lt;style>
.box-body > :last-child {
margin-bottom: 0 !important;
}
.box-body > :first-child {
margin-top: 0 !important;
}
&lt;/style>
&lt;div
class="hint-box"
style="
border: 1px solid #000000;
padding: 10px;
border-radius: 5px;
margin: 16px 0;
background-color: rgba(0, 0, 0, 0.05);
"
>
&lt;strong style="display: block; margin-bottom: 5px"
>Note&lt;/strong
>
&lt;hr
style="
border: none;
border-top: 1px solid #000000;
margin: 10px 0;
width: calc(100%);
"
/>
&lt;div style="font-size: 0.92em" class="box-body">
&lt;p>Nash Equilibrium is an overloaded term, as it refers to both a solution concept and a strategy profile that satisfies the solution concept. You will need to tell which is which from context.&lt;/p>
&lt;/div>
&lt;/div>
&lt;h3 id="computer-science">Computer science&lt;/h3>
&lt;p>The possibility of players taking actions simultaneously (among other things) can make the existence of a pure-strategy NE impossible. But if sequential play is assumed, it is straightforward to show that there always exists a pure-strategy NE &lt;sup id="fnref:3">&lt;a href="#fn:3" class="footnote-ref" role="doc-noteref">3&lt;/a>&lt;/sup>. As mentioned above, this article benefits from this assumption.&lt;/p>
&lt;p>Because finding a NE is such a popular desire, most of the discussion here will focus on the procedure of finding a pure-strategy NE in the class of games we specified previously. This is a costly process, which is why it calls for techniques that help minimize use of computational resources. However, you will notice that the things that make this an inherently costly process for some games are actually factors that have nothing to do with game theory.&lt;/p>
&lt;p>Hence, it is possible that the concepts I will discuss are applicable beyond the problem of finding a pure-strategy NE. To elaborate, a maximally generic yet snobby version of this article would perhaps be titled &lt;em>Techniques for Implementing Solutions to Search Problems on Implicit Graphs&lt;/em>. The meanings of these terms are:&lt;/p>
&lt;ol>
&lt;li>
&lt;p>&lt;strong>Implementing.&lt;/strong> Bring into the real world.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Solutions.&lt;/strong> In this context, algorithms that solve problems.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Search Problem.&lt;/strong> A problem that asks you to find something.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Implicit Graph.&lt;/strong> &lt;a href="https://en.wikipedia.org/wiki/Graph_(abstract_data_type)">Graph&lt;/a> representation in terms of an initial element and a collection of functions which allow you to perform a traversal. Useful but unconventional term.&lt;/p>
&lt;/li>
&lt;/ol>
&lt;p>In particular, the section titled &amp;ldquo;Representation&amp;rdquo; will explain the link between the definition of an extensive game and the representation of its structure as an implicit graph, and will introduce a trick that can be used to end up with a significantly simpler traversals. This trick is also applicable to problem domains other than games, but I only present it with regard to games because its implementation depends on the underlying problem. Everything else is applicable as soon as you have an implicit graph in your hands.&lt;/p>
&lt;p>While explaining these concepts, it will be useful to have access to ideas in complexity theory. Below are some domain-specific remarks and definitions introducing language that will be of relevance later.&lt;/p>
&lt;h4 id="complexity-theory">Complexity theory&lt;/h4>
&lt;p>In computer science, complexity is a measure&lt;sup id="fnref:4">&lt;a href="#fn:4" class="footnote-ref" role="doc-noteref">4&lt;/a>&lt;/sup> of the minimal number of elementary operations that must be composed to complete a target operation. The relevant elementary operations correspond to the kind of complexity in question:&lt;/p>
&lt;ol>
&lt;li>
&lt;p>&lt;strong>Time complexity.&lt;/strong> Here, elementary operations are other operations whose time is assumed to be a known constant. Elementary operations should always be specified.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Space complexity.&lt;/strong> Here, the elementary operation is setting a bit. A more formal definition of space complexity depends on the &lt;a href="https://en.wikipedia.org/wiki/Model_of_computation">model of computation&lt;/a>.&lt;/p>
&lt;/li>
&lt;/ol>
&lt;p>For the sake of expressibility, complexity is usually expressed in terms of &lt;a href="https://en.wikipedia.org/wiki/Asymptotic_analysis">asymptotic characteristics&lt;/a>. In particular, symbolisms like &lt;a href="https://web.mit.edu/16.070/www/lecture/big_o.pdf">Big-O notation&lt;/a> help compare the asymptotic complexity of different algorithms.&lt;/p>
&lt;p>&lt;a href="https://en.wikipedia.org/wiki/Computational_problem">Computational problems&lt;/a> can be put into &lt;a href="https://en.wikipedia.org/wiki/Complexity_class">complexity classes&lt;/a>. For example, the problem of finding a mixed-strategy NE, known as $\text{N}\small{\text{ASH}}$, is in the time complexity class &lt;a href="https://en.wikipedia.org/wiki/FNP_(complexity)">$\text{FNP}$&lt;/a>, which has led many people to look for other solution concepts that are more computationally favorable&lt;sup id="fnref:5">&lt;a href="#fn:5" class="footnote-ref" role="doc-noteref">5&lt;/a>&lt;/sup>. The equivalent problem for the class of games we are considering, however, is in &lt;a href="https://en.wikipedia.org/wiki/FP_(complexity)">$FP$&lt;/a>. In other words, $\text{N}\small{\text{ASH}}$ can be solved &lt;a href="https://en.wikipedia.org/wiki/Algorithmic_efficiency">efficiently&lt;/a> on this restricted domain of games&lt;sup id="fnref:6">&lt;a href="#fn:6" class="footnote-ref" role="doc-noteref">6&lt;/a>&lt;/sup>.&lt;/p>
&lt;hr>
&lt;h2 id="representation">Representation&lt;/h2>
&lt;p>One can find solutions to instances of many search and decision problems over games without incurring large computational expenses. This is possible by deriving a logical analysis on a case-by-case basis, using the mathematical properties of the components of the game in question.&lt;/p>
&lt;style>
.box-body > :last-child {
margin-bottom: 0 !important;
}
.box-body > :first-child {
margin-top: 0 !important;
}
&lt;/style>
&lt;div
class="hint-box"
style="
border: 1px solid #000000;
padding: 10px;
border-radius: 5px;
margin: 16px 0;
background-color: rgba(0, 0, 0, 0.05);
"
>
&lt;strong style="display: block; margin-bottom: 5px"
>Definition&lt;/strong
>
&lt;hr
style="
border: none;
border-top: 1px solid #000000;
margin: 10px 0;
width: calc(100%);
"
/>
&lt;div style="font-size: 0.92em" class="box-body">
&lt;p>An &lt;strong>extensive-form game&lt;/strong> is a 4-tuple $\langle N, H, p, (\succsim_i) \rangle$, where:&lt;/p>
&lt;ul>
&lt;li>$N$ is a set of players, usually $\{1, \; \ldots, \; n\}$ for simplicity.&lt;/li>
&lt;li>$H$ is a set of strings of actions where $h \in H \implies h&amp;rsquo; \in H$ where $h&amp;rsquo;$ is the string resulting from removing the last action from the string $h$.&lt;/li>
&lt;li>$p : H \to N$ assigns a player to each non-terminal history.&lt;/li>
&lt;li>The player $i \in N$ has a preference relation $\succsim_i$ on the set $Z \subseteq H$ of terminal histories (which is reflexive and transitive).&lt;/li>
&lt;/ul>
&lt;/div>
&lt;/div>
&lt;p>For a game provided in the extensive form, its instantiation of the above abstractions can be logically leveraged to prove statements about the game. But given that it can be defined arbitrarily, sometimes it is impossible to achieve this solely through formal rewriting.&lt;/p>
&lt;p>In some of these cases it is possible to simply expand the component definitions into their explicit forms in order to later compute a solution using these expansions. But of course, doing this can also be extremely impractical. For example, it is common for $H$ to be of very high cardinality.&lt;/p>
&lt;style>
.box-body > :last-child {
margin-bottom: 0 !important;
}
.box-body > :first-child {
margin-top: 0 !important;
}
&lt;/style>
&lt;div
class="hint-box"
style="
border: 1px solid #000000;
padding: 10px;
border-radius: 5px;
margin: 16px 0;
background-color: rgba(0, 0, 0, 0.05);
"
>
&lt;strong style="display: block; margin-bottom: 5px"
>Example&lt;/strong
>
&lt;hr
style="
border: none;
border-top: 1px solid #000000;
margin: 10px 0;
width: calc(100%);
"
/>
&lt;div style="font-size: 0.92em" class="box-body">
&lt;p>Consider a &lt;a href="https://en.wikipedia.org/wiki/Rubik%27s_Cube">Rubik&amp;rsquo;s Cube&lt;/a> that is initialized to specific starting colors, which can be set into the extensive form via the following instantiations:&lt;/p>
&lt;ul>
&lt;li>$N = \{1\}$.&lt;/li>
&lt;li>$H = \{ h \; | \; h \text{ is a sequence of 90° rotations of a plane in the cube} \}$.&lt;/li>
&lt;li>$p : h \mapsto 1$ for all $h \in H$.&lt;/li>
&lt;li>$h_i \succsim_1 h_j$ for all $h_i$ that leave the cube solved.&lt;/li>
&lt;/ul>
&lt;p>Here, the set $H$ is countably infinite, so it is impossible to expand it to its elements in order to later compute a property of this puzzle. One such property is the smallest number of actions that can solve the cube&lt;sup id="fnref:7">&lt;a href="#fn:7" class="footnote-ref" role="doc-noteref">7&lt;/a>&lt;/sup>.&lt;/p>
&lt;/div>
&lt;/div>
&lt;h3 id="rulesets">Rulesets&lt;/h3>
&lt;p>Before introducing tools to deal with this, there is another representation that is common when dealing with &lt;a href="https://en.wikipedia.org/wiki/Abstract_strategy_game">abstract strategy games&lt;/a>. A ruleset, as it is known in &lt;a href="https://en.wikipedia.org/wiki/Combinatorial_game_theory">combinatorial game theory&lt;/a>, is the most familiar kind of representation of a game.&lt;/p>
&lt;p>In particular, a ruleset specifies exactly what actions are permitted to whom and when. It also explains the &lt;a href="https://en.wikipedia.org/wiki/Utility">utility&lt;/a> obtained by each participating player when no further actions are available. These characteristics are expressed in terms of the mutable state of a proxy (e.g., a board with pieces).&lt;/p>
&lt;style>
.box-body > :last-child {
margin-bottom: 0 !important;
}
.box-body > :first-child {
margin-top: 0 !important;
}
&lt;/style>
&lt;div
class="hint-box"
style="
border: 1px solid #000000;
padding: 10px;
border-radius: 5px;
margin: 16px 0;
background-color: rgba(0, 0, 0, 0.05);
"
>
&lt;strong style="display: block; margin-bottom: 5px"
>Example&lt;/strong
>
&lt;hr
style="
border: none;
border-top: 1px solid #000000;
margin: 10px 0;
width: calc(100%);
"
/>
&lt;div style="font-size: 0.92em" class="box-body">
&lt;p>The game &lt;code>10-to-0-by-1-or-2&lt;/code> is generated by the following ruleset:&lt;/p>
&lt;ul>
&lt;li>There is a collection of 10 items.&lt;/li>
&lt;li>2 players take alternating turns removing either 1 or 2 items from the collection.&lt;/li>
&lt;li>Player 1 starts. The player who takes the last item from the collection wins.&lt;/li>
&lt;/ul>
&lt;p>In this game, the collection of items that is mutated by players&amp;rsquo; actions is a proxy that allows players to judge what they are allowed to do and to determine who wins the game.&lt;/p>
&lt;/div>
&lt;/div>
&lt;p>This way, the information contained in the state of a proxy is a representation of the history of actions that produced it. These representations are called &lt;strong>game states&lt;/strong>. This makes rulesets implicit graphs over the set of game states (denoted $S$). While they do not act directly over a set of histories, rulesets include enough information to generate an equivalent extensive-form representation. The resulting structure of generated action histories is hence intimately tied to the nature of the proxy.&lt;/p>
&lt;style>
.box-body > :last-child {
margin-bottom: 0 !important;
}
.box-body > :first-child {
margin-top: 0 !important;
}
&lt;/style>
&lt;div
class="hint-box"
style="
border: 1px solid #000000;
padding: 10px;
border-radius: 5px;
margin: 16px 0;
background-color: rgba(0, 0, 0, 0.05);
"
>
&lt;strong style="display: block; margin-bottom: 5px"
>Definition&lt;/strong
>
&lt;hr
style="
border: none;
border-top: 1px solid #000000;
margin: 10px 0;
width: calc(100%);
"
/>
&lt;div style="font-size: 0.92em" class="box-body">
&lt;p>Given a directed graph $G = \langle S, E \rangle$, the corresponding &lt;strong>implicit graph&lt;/strong> $G^I$ is a 3-tuple $\langle S, t, s_0 \rangle$, where:&lt;/p>
&lt;ul>
&lt;li>$S$ is a set of states.&lt;/li>
&lt;li>$s_0 \in S$ is a starting element.&lt;/li>
&lt;li>$t : S \to \mathcal{P}(S)$ is a transition dynamics function with $(s_i, s_j) \in E \iff s_j \in t(s_i)$.&lt;/li>
&lt;/ul>
&lt;p>A proof of the bijection between implicit and directed graphs is omitted.&lt;/p>
&lt;/div>
&lt;/div>
&lt;p>Furthermore, because many actions could be globally or locally commutative with respect to proxies&amp;rsquo; mutable state, sets of histories in the extensive form are usually of much higher cardinality than sets of possible states for rulesets&amp;rsquo; proxies. This is of course computationally favorable, as finite ruelesets (whose proxies have a finite number of possible states) can generate even infinite extensive forms.&lt;/p>
&lt;style>
.box-body > :last-child {
margin-bottom: 0 !important;
}
.box-body > :first-child {
margin-top: 0 !important;
}
&lt;/style>
&lt;div
class="hint-box"
style="
border: 1px solid #000000;
padding: 10px;
border-radius: 5px;
margin: 16px 0;
background-color: rgba(0, 0, 0, 0.05);
"
>
&lt;strong style="display: block; margin-bottom: 5px"
>Example&lt;/strong
>
&lt;hr
style="
border: none;
border-top: 1px solid #000000;
margin: 10px 0;
width: calc(100%);
"
/>
&lt;div style="font-size: 0.92em" class="box-body">
&lt;style>
.book-column > :first-child:not(.halign-container, .valign-container) {
margin-top: 0px !important;
}
.book-column > :last-child:not(.halign-container, .valign-container) {
margin-bottom: 0px !important;
}
&lt;/style>
&lt;div style="display: flex; flex-wrap: wrap">
&lt;div class="book-column" style="flex: 9;">
&lt;p>In the diagram to the right, let $S_0$, $S_1$, $S_2$, and $S_3$ be allowed states under a ruleset, and $A = \{a, b\}$ allowed actions. We have that:&lt;/p>
&lt;ul>
&lt;li>The set of histories is $H = \{ \epsilon, a, b, ab, ba \}$.&lt;/li>
&lt;li>The set of states is $S = \{ S_0, S_1, S_2, S_3 \}$.&lt;/li>
&lt;/ul>
&lt;p>As you can see, $|H| &amp;gt; |S|$ despite how $|A| &amp;lt; |S|$. The difference in size between $H$ and $S$ scales rapidly in the general case.&lt;/p>
&lt;/div>
&lt;div class="book-column" style="flex: 5;">
&lt;style>
.valign-container {
display: flex;
height: 100%;
align-items: center;
}
&lt;/style>
&lt;div class="valign-container">
&lt;style>
.halign-container {
display: flex;
width: 100%;
justify-content: center;
}
&lt;/style>
&lt;div class="halign-container">
&lt;figure>
&lt;img loading="lazy" src="commutative_diagram.png" width="128"/>
&lt;/figure>
&lt;/div>
&lt;/div>
&lt;/div>
&lt;/div>
&lt;/div>
&lt;/div>
&lt;h3 id="abstraction">Abstraction&lt;/h3>
&lt;p>In real life, games come mostly in the form of rulesets. We are usually aware of the environment they transpire in (the so-called intuitive proxy) and the laws that describe how it can change as a function of players&amp;rsquo; actions. Because of this, much of applied theory is centered around semantics that involve mutable state. For example, a &lt;a href="https://en.wikipedia.org/wiki/Markov_decision_process">Markov Decision Process (MDP)&lt;/a> from &lt;a href="https://en.wikipedia.org/wiki/Reinforcement_learning">reinforcement learning&lt;/a> strongly reflects the nature of a ruleset.&lt;/p>
&lt;p>However, all of these constructs have a latent yet equivalent extensive form representation. This will motivate the technique of &lt;strong>state abstraction&lt;/strong>&lt;sup id="fnref:8">&lt;a href="#fn:8" class="footnote-ref" role="doc-noteref">8&lt;/a>&lt;/sup>: The necessity for action histories to be directly prefixed implies that they have a directed tree structure, and because all directed graphs have an equivalent implicit graph representation, the relationship between action histories and ruleset states maps an implicit graph to another one that retains important information about the original.&lt;/p>
&lt;style>
.box-body > :last-child {
margin-bottom: 0 !important;
}
.box-body > :first-child {
margin-top: 0 !important;
}
&lt;/style>
&lt;div
class="hint-box"
style="
border: 1px solid #000000;
padding: 10px;
border-radius: 5px;
margin: 16px 0;
background-color: rgba(0, 0, 0, 0.05);
"
>
&lt;strong style="display: block; margin-bottom: 5px"
>Definition&lt;/strong
>
&lt;hr
style="
border: none;
border-top: 1px solid #000000;
margin: 10px 0;
width: calc(100%);
"
/>
&lt;div style="font-size: 0.92em" class="box-body">
&lt;p>An &lt;strong>abstraction map&lt;/strong> $a : S_{\text{pre}} \to S_{\text{post}}$ maps the states in an implicit graph $G^I_{\text{pre}}$ to the states in another implicit graph $G^I_{\text{post}}$ with the structure-preserving condition&lt;/p>
$$ s_j \in t_{\text{pre}}(s_i) \iff a(s_j) \in t_{\text{post}}(a(s_i)). $$&lt;/div>
&lt;/div>
&lt;p>As shown in the last example, the set of action histories is usually of much greater cardinality than its corresponding set of ruleset states, with the difference being possibly infinite. Altogether, this is a hint that, much like the implicit jump from action histories to ruleset states, it is possible to jump to more abstract state sets of smaller cardinality but equal representational power.&lt;/p>
&lt;style>
.box-body > :last-child {
margin-bottom: 0 !important;
}
.box-body > :first-child {
margin-top: 0 !important;
}
&lt;/style>
&lt;div
class="hint-box"
style="
border: 1px solid #000000;
padding: 10px;
border-radius: 5px;
margin: 16px 0;
background-color: rgba(0, 0, 0, 0.05);
"
>
&lt;strong style="display: block; margin-bottom: 5px"
>Example&lt;/strong
>
&lt;hr
style="
border: none;
border-top: 1px solid #000000;
margin: 10px 0;
width: calc(100%);
"
/>
&lt;div style="font-size: 0.92em" class="box-body">
&lt;p>An abstraction mapping between the action histories (left) and states (right) from the previous example. Notice how action histories always imply a tree, and the process of abstraction folds it into a potentially cyclic graph.&lt;/p>
&lt;p>&lt;a href="">&lt;/a> &lt;!-- This is for rendering the above as a &lt;p> element -->&lt;/p>
&lt;style>
.halign-container {
display: flex;
width: 100%;
justify-content: center;
}
&lt;/style>
&lt;div class="halign-container">
&lt;figure>
&lt;img loading="lazy" src="abstraction.png" width="475"/>
&lt;/figure>
&lt;/div>
&lt;/div>
&lt;/div>
&lt;p>Therefore, much like imposing a ruleset proxy causes many of the action histories to fold into equivalent states, we can determine for a problem $\text{P}$ which states would be $\text{P}$-equivalent under the ruleset&amp;rsquo;s laws. This way, we can create new abstractions $a_i : S_{i - 1} \to S_i$ that can be composed to obtain a reduced state space that is equivalent to the original under $\text{P}$ for a significant computational upside.&lt;/p>
&lt;style>
.box-body > :last-child {
margin-bottom: 0 !important;
}
.box-body > :first-child {
margin-top: 0 !important;
}
&lt;/style>
&lt;div
class="hint-box"
style="
border: 1px solid #000000;
padding: 10px;
border-radius: 5px;
margin: 16px 0;
background-color: rgba(0, 0, 0, 0.05);
"
>
&lt;strong style="display: block; margin-bottom: 5px"
>Example&lt;/strong
>
&lt;hr
style="
border: none;
border-top: 1px solid #000000;
margin: 10px 0;
width: calc(100%);
"
/>
&lt;div style="font-size: 0.92em" class="box-body">
&lt;p>Consider the ruleset underlying the game of Tic-Tac-Toe. Denote $B_i$ a board state. Then, any algorithm that computes a NE for this game through its ruleset is invariant to the abstraction $a$, where&lt;/p>
$$ a(B_i) = a(B_j) \iff B_i \text{ is symmetrical to } B_j. $$&lt;p>Further, the number of board states this algorithm will need to visit is reduced by a factor $&amp;gt;5$.&lt;/p>
&lt;/div>
&lt;/div>
&lt;hr>
&lt;h2 id="design">Design&lt;/h2>
&lt;p>So far, discussion has brought us to implicit graphs and abstractions through the lens of game theory. The objective of this section will be to motivate these concepts beyond game theory, while supplying references to concrete programming ideas.&lt;/p>
&lt;p>To do this, we will cover a representation of an implicit graph in a real programming language, apply it to a new problem domain, and make improvements that bring real-world utility. Examples will still be given in terms of games, as they also happen to fit under our new focus. In doing so, we will design a solution to a broad problem using our new toolset items.&lt;/p>
&lt;h3 id="interface-items">Interface items&lt;/h3>
&lt;p>There are a number of considerations to make when encoding an implicit graph, whose importance will vary depending on the object being represented. This section will introduce only the example of graphs of subproblems in the context of &lt;a href="https://en.wikipedia.org/wiki/Dynamic_programming">dynamic programming&lt;/a> (DP), and will iterate on the following &lt;a href="https://doc.rust-lang.org/book/ch10-02-traits.html">Rust interface&lt;/a> to eventually allow their solutions to be found in parallel through a special kind of abstraction.&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;span class="lnt">2
&lt;/span>&lt;span class="lnt">3
&lt;/span>&lt;span class="lnt">4
&lt;/span>&lt;span class="lnt">5
&lt;/span>&lt;span class="lnt">6
&lt;/span>&lt;span class="lnt">7
&lt;/span>&lt;span class="lnt">8
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-rust" data-lang="rust">&lt;span class="line">&lt;span class="cl">&lt;span class="k">trait&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">ImplicitGraph&lt;/span>&lt;span class="o">&amp;lt;&lt;/span>&lt;span class="n">C&lt;/span>&lt;span class="o">&amp;gt;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="k">where&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="n">C&lt;/span>: &lt;span class="nb">IntoIterator&lt;/span>&lt;span class="o">&amp;lt;&lt;/span>&lt;span class="n">Item&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="bp">Self&lt;/span>::&lt;span class="n">State&lt;/span>&lt;span class="o">&amp;gt;&lt;/span>&lt;span class="p">,&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="p">{&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="k">type&lt;/span> &lt;span class="nc">State&lt;/span>&lt;span class="p">;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="k">fn&lt;/span> &lt;span class="nf">start&lt;/span>&lt;span class="p">()&lt;/span>&lt;span class="w"> &lt;/span>-&amp;gt; &lt;span class="nc">Self&lt;/span>::&lt;span class="n">State&lt;/span>&lt;span class="p">;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="k">fn&lt;/span> &lt;span class="nf">transition&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">state&lt;/span>: &lt;span class="nc">Self&lt;/span>::&lt;span class="n">State&lt;/span>&lt;span class="p">)&lt;/span>&lt;span class="w"> &lt;/span>-&amp;gt; &lt;span class="nc">C&lt;/span>&lt;span class="p">;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="p">}&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>
&lt;p>The elements of this interface declaration relate to the implicit graph $G^I = \langle S, t, s_0 \rangle$ as follows:&lt;/p>
&lt;ul>
&lt;li>The generic parameter &lt;code>Start&lt;/code> is the type of the elements in $S$.&lt;/li>
&lt;li>The generic parameter &lt;code>C&lt;/code> is the type of the elements in $\mathcal{P}(S)$.&lt;/li>
&lt;li>&lt;code>transition&lt;/code> is the template of $t$.&lt;/li>
&lt;li>&lt;code>start&lt;/code> simply returns $s_0$.&lt;/li>
&lt;/ul>
&lt;style>
.box-body > :last-child {
margin-bottom: 0 !important;
}
.box-body > :first-child {
margin-top: 0 !important;
}
&lt;/style>
&lt;div
class="hint-box"
style="
border: 1px solid #000000;
padding: 10px;
border-radius: 5px;
margin: 16px 0;
background-color: rgba(0, 0, 0, 0.05);
"
>
&lt;strong style="display: block; margin-bottom: 5px"
>Example&lt;/strong
>
&lt;hr
style="
border: none;
border-top: 1px solid #000000;
margin: 10px 0;
width: calc(100%);
"
/>
&lt;div style="font-size: 0.92em" class="box-body">
&lt;p>Implementation of the game &lt;code>10-to-0-by-1-or-2&lt;/code> from the section on Rulesets as an implicit graph.&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt"> 1
&lt;/span>&lt;span class="lnt"> 2
&lt;/span>&lt;span class="lnt"> 3
&lt;/span>&lt;span class="lnt"> 4
&lt;/span>&lt;span class="lnt"> 5
&lt;/span>&lt;span class="lnt"> 6
&lt;/span>&lt;span class="lnt"> 7
&lt;/span>&lt;span class="lnt"> 8
&lt;/span>&lt;span class="lnt"> 9
&lt;/span>&lt;span class="lnt">10
&lt;/span>&lt;span class="lnt">11
&lt;/span>&lt;span class="lnt">12
&lt;/span>&lt;span class="lnt">13
&lt;/span>&lt;span class="lnt">14
&lt;/span>&lt;span class="lnt">15
&lt;/span>&lt;span class="lnt">16
&lt;/span>&lt;span class="lnt">17
&lt;/span>&lt;span class="lnt">18
&lt;/span>&lt;span class="lnt">19
&lt;/span>&lt;span class="lnt">20
&lt;/span>&lt;span class="lnt">21
&lt;/span>&lt;span class="lnt">22
&lt;/span>&lt;span class="lnt">23
&lt;/span>&lt;span class="lnt">24
&lt;/span>&lt;span class="lnt">25
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-rust" data-lang="rust">&lt;span class="line">&lt;span class="cl">&lt;span class="sd">/// The game `10-to-0-by-1-or-2`.
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="sd">&lt;/span>&lt;span class="k">struct&lt;/span> &lt;span class="nc">ZeroBy&lt;/span>&lt;span class="p">;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="k">impl&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">ImplicitGraph&lt;/span>&lt;span class="o">&amp;lt;&lt;/span>&lt;span class="nb">Vec&lt;/span>&lt;span class="o">&amp;lt;&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="kt">u32&lt;/span>&lt;span class="p">,&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="kt">bool&lt;/span>&lt;span class="p">)&lt;/span>&lt;span class="o">&amp;gt;&amp;gt;&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="k">for&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">ZeroBy&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="p">{&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="c1">// Tuple of (items, turn).
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="k">type&lt;/span> &lt;span class="nc">State&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="kt">u32&lt;/span>&lt;span class="p">,&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="kt">bool&lt;/span>&lt;span class="p">);&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="c1">// Returns (10 items left, player 0&amp;#39;s turn).
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="k">fn&lt;/span> &lt;span class="nf">start&lt;/span>&lt;span class="p">()&lt;/span>&lt;span class="w"> &lt;/span>-&amp;gt; &lt;span class="p">(&lt;/span>&lt;span class="kt">u32&lt;/span>&lt;span class="p">,&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="kt">bool&lt;/span>&lt;span class="p">)&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="p">{&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="mi">10&lt;/span>&lt;span class="p">,&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="kc">false&lt;/span>&lt;span class="p">)&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="p">}&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="c1">// Returns states with one and two less items on the opposing player&amp;#39;s turn.
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="k">fn&lt;/span> &lt;span class="nf">transition&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">state&lt;/span>: &lt;span class="p">(&lt;/span>&lt;span class="kt">u32&lt;/span>&lt;span class="p">,&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="kt">bool&lt;/span>&lt;span class="p">))&lt;/span>&lt;span class="w"> &lt;/span>-&amp;gt; &lt;span class="nb">Vec&lt;/span>&lt;span class="o">&amp;lt;&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="kt">u32&lt;/span>&lt;span class="p">,&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="kt">bool&lt;/span>&lt;span class="p">)&lt;/span>&lt;span class="o">&amp;gt;&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="p">{&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="kd">let&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">items&lt;/span>&lt;span class="p">,&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">turn&lt;/span>&lt;span class="p">)&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">state&lt;/span>&lt;span class="p">;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="kd">let&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="k">mut&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">next&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="nb">Vec&lt;/span>::&lt;span class="n">new&lt;/span>&lt;span class="p">();&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="k">if&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">items&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="o">==&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="mi">1&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="p">{&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="n">next&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="n">push&lt;/span>&lt;span class="p">((&lt;/span>&lt;span class="mi">0&lt;/span>&lt;span class="p">,&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="o">!&lt;/span>&lt;span class="n">turn&lt;/span>&lt;span class="p">));&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="p">}&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="k">else&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="k">if&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">items&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="o">&amp;gt;&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="mi">1&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="p">{&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="n">next&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="n">push&lt;/span>&lt;span class="p">((&lt;/span>&lt;span class="n">items&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="o">-&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="mi">1&lt;/span>&lt;span class="p">,&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="o">!&lt;/span>&lt;span class="n">turn&lt;/span>&lt;span class="p">));&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="n">next&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="n">push&lt;/span>&lt;span class="p">((&lt;/span>&lt;span class="n">items&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="o">-&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="mi">2&lt;/span>&lt;span class="p">,&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="o">!&lt;/span>&lt;span class="n">turn&lt;/span>&lt;span class="p">));&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="p">}&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="n">next&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="p">}&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="p">}&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>
&lt;/div>
&lt;/div>
&lt;h3 id="parallel-dp">Parallel DP&lt;/h3>
&lt;p>A popular characterization of DP is to establish dependency &lt;a href="https://en.wikipedia.org/wiki/Relation_(mathematics)">relations&lt;/a> on sets of subproblems, defining a &lt;a href="https://en.wikipedia.org/wiki/Directed_acyclic_graph">directed acyclic graph&lt;/a> (DAG) for any properly formulated subproblem definition. A natural link to implicit graphs exists through their bijection with general graphs.&lt;/p>
&lt;p>Having established that a DP problem can be characterized as an implicit graph of subproblems, it is also worth mentioning that most unorganized solution implementations (i.e., that do not organize solutions or information about subproblems in a tensor) make use of stack-like data structures to aid traversals of subproblems in &lt;a href="https://en.wikipedia.org/wiki/Tree_traversal">postorder&lt;/a>.&lt;/p>
&lt;style>
.box-body > :last-child {
margin-bottom: 0 !important;
}
.box-body > :first-child {
margin-top: 0 !important;
}
&lt;/style>
&lt;div
class="hint-box"
style="
border: 1px solid #000000;
padding: 10px;
border-radius: 5px;
margin: 16px 0;
background-color: rgba(0, 0, 0, 0.05);
"
>
&lt;strong style="display: block; margin-bottom: 5px"
>Example&lt;/strong
>
&lt;hr
style="
border: none;
border-top: 1px solid #000000;
margin: 10px 0;
width: calc(100%);
"
/>
&lt;div style="font-size: 0.92em" class="box-body">
&lt;p>DP algorithm to compute who will win a game of &lt;code>10-to-0-by-1-or-2&lt;/code>, with the below subproblem relation&lt;sup id="fnref:9">&lt;a href="#fn:9" class="footnote-ref" role="doc-noteref">9&lt;/a>&lt;/sup>:&lt;/p>
$$ W(s) = \max_{s' \in \\, t(s)} \min_{s' \in \\, t(s)} W(s'). $$&lt;p>Here, $W : S \to \{ 0, \, 1 \} $ maps state information (including the number of items remaining and player turn) to whether the player whose turn it is at $s$ would win under optimal play, with $t$ being the transition function of the implicit graph over this game&amp;rsquo;s states. This uses the implementation from the previous example.&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt"> 1
&lt;/span>&lt;span class="lnt"> 2
&lt;/span>&lt;span class="lnt"> 3
&lt;/span>&lt;span class="lnt"> 4
&lt;/span>&lt;span class="lnt"> 5
&lt;/span>&lt;span class="lnt"> 6
&lt;/span>&lt;span class="lnt"> 7
&lt;/span>&lt;span class="lnt"> 8
&lt;/span>&lt;span class="lnt"> 9
&lt;/span>&lt;span class="lnt">10
&lt;/span>&lt;span class="lnt">11
&lt;/span>&lt;span class="lnt">12
&lt;/span>&lt;span class="lnt">13
&lt;/span>&lt;span class="lnt">14
&lt;/span>&lt;span class="lnt">15
&lt;/span>&lt;span class="lnt">16
&lt;/span>&lt;span class="lnt">17
&lt;/span>&lt;span class="lnt">18
&lt;/span>&lt;span class="lnt">19
&lt;/span>&lt;span class="lnt">20
&lt;/span>&lt;span class="lnt">21
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-plaintext" data-lang="plaintext">&lt;span class="line">&lt;span class="cl">procedure:
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> temp ← empty stack
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> stack ← empty stack
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> visited ← empty set
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> stack.push(ZeroBy::start())
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> while stack is not empty:
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> current ← stack.pop()
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> if current is not in visited:
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> visited.add(current)
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> temp_stack.push(current)
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> for each state in ZeroBy::transition(current):
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> if state is not in visited:
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> stack.push(state)
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> solution ← empty map
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> while temp_stack is not empty:
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> current ← temp_stack.pop()
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> solution[current] = W(current)
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> return solution[ZeroBy::start()]&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>
&lt;p>Note the use of $W$ in line 19. Also note that the subproblem relation does not necessarily generalize to other games and, for the sake of brevity, is not defined for base cases (where $t(s) = \varnothing$).&lt;/p>
&lt;/div>
&lt;/div>
&lt;p>Attempts to parallelize this setup must first identify a method to partition the subproblem graph in a way optimizes the tradeoff between parallelism and its own overhead. Of course, this depends significantly on the specific resources that will be used to execute the resulting program.&lt;/p>
&lt;p>I will introduce one way of doing this that follows naturally from the use of the implicit graph interface. Concretely, a carefully chosen abstraction $\pi : S \to \mathbb{N}$ that connects the graph of subproblems to a DAG of enumerated sets of states will provide a parallelization scheme.&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;span class="lnt">2
&lt;/span>&lt;span class="lnt">3
&lt;/span>&lt;span class="lnt">4
&lt;/span>&lt;span class="lnt">5
&lt;/span>&lt;span class="lnt">6
&lt;/span>&lt;span class="lnt">7
&lt;/span>&lt;span class="lnt">8
&lt;/span>&lt;span class="lnt">9
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-rust" data-lang="rust">&lt;span class="line">&lt;span class="cl">&lt;span class="k">trait&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">ImplicitGraph&lt;/span>&lt;span class="o">&amp;lt;&lt;/span>&lt;span class="n">C&lt;/span>&lt;span class="o">&amp;gt;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="k">where&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="n">C&lt;/span>: &lt;span class="nb">IntoIterator&lt;/span>&lt;span class="o">&amp;lt;&lt;/span>&lt;span class="n">Item&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="bp">Self&lt;/span>::&lt;span class="n">State&lt;/span>&lt;span class="o">&amp;gt;&lt;/span>&lt;span class="p">,&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="p">{&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="k">type&lt;/span> &lt;span class="nc">State&lt;/span>&lt;span class="p">;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="k">fn&lt;/span> &lt;span class="nf">start&lt;/span>&lt;span class="p">()&lt;/span>&lt;span class="w"> &lt;/span>-&amp;gt; &lt;span class="nc">Self&lt;/span>::&lt;span class="n">State&lt;/span>&lt;span class="p">;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="k">fn&lt;/span> &lt;span class="nf">partition&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">state&lt;/span>: &lt;span class="nc">Self&lt;/span>::&lt;span class="n">State&lt;/span>&lt;span class="p">)&lt;/span>&lt;span class="w"> &lt;/span>-&amp;gt; &lt;span class="kt">u64&lt;/span>&lt;span class="p">;&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="c1">// &amp;lt;-- NEW
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="k">fn&lt;/span> &lt;span class="nf">transition&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">state&lt;/span>: &lt;span class="nc">Self&lt;/span>::&lt;span class="n">State&lt;/span>&lt;span class="p">)&lt;/span>&lt;span class="w"> &lt;/span>-&amp;gt; &lt;span class="nc">C&lt;/span>&lt;span class="p">;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="p">}&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>
&lt;p>Here, &lt;code>partition&lt;/code> is the template of $\pi$. The big idea is that during a traversal, we can observe a change in the value of &lt;code>*::partition(current)&lt;/code>, where &lt;code>current&lt;/code> is the current state in the traversal. This way, we can build a graph of the outputs of this function based on their adjacency in the subproblem graph. Finally, we analyze the resulting graph to find sets of states that can be traversed simultaneously.&lt;/p>
&lt;style>
.box-body > :last-child {
margin-bottom: 0 !important;
}
.box-body > :first-child {
margin-top: 0 !important;
}
&lt;/style>
&lt;div
class="hint-box"
style="
border: 1px solid #000000;
padding: 10px;
border-radius: 5px;
margin: 16px 0;
background-color: rgba(0, 0, 0, 0.05);
"
>
&lt;strong style="display: block; margin-bottom: 5px"
>Example&lt;/strong
>
&lt;hr
style="
border: none;
border-top: 1px solid #000000;
margin: 10px 0;
width: calc(100%);
"
/>
&lt;div style="font-size: 0.92em" class="box-body">
&lt;p>On the left, a graph over a set of states $S = \{ s_0, \, \ldots, \, s_{11} \}$. On the right, a graph over a set $\Pi \subset \mathbb{N}$ with four elements. They are related by an abstraction $\pi : S \to \Pi$ that is special in that the resulting graph over the elements of $\Pi$ is acyclic. Hence, the &lt;a href="https://en.wikipedia.org/wiki/Fiber_(mathematics)">fibers&lt;/a> $\pi^{-1}(\{\pi_i\})$ of certain distinct elements $(\pi_i)$ of $\Pi$ could possibly be traversed in parallel. An example of groupings of elements in $\Pi$ whose fibers under $\pi$ could be traversed in parallel is provided in dotted boxes on the graph of $\Pi$.&lt;/p>
&lt;figure>
&lt;img loading="lazy" src="partition.png" width="550"/>
&lt;/figure>
&lt;/div>
&lt;/div>
&lt;p>Finding a suitable $\pi$ depends on the chosen state (subproblem) representation and is of course highly problem-specific. However, a general strategy is to ensure that $\pi$ outputs a different label if and only if an irreversible change is made to some form of mutable state. As a high-level criterion, this helps construct an abstraction that assuredly maps onto a DAG.&lt;/p>
&lt;p>Having found such an abstraction, the next perplexity of parallelizing a postorder traversal of subproblems is managing efficient and clear use of shared data structures. Here, a zoo of approaches with varyingly personable tradeoffs are available. I will introduce only one, which involves an additional interface item in the form of a function $t&amp;rsquo; : S \to \mathcal{P}(S)$ called &lt;code>retrograde&lt;/code>.&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt"> 1
&lt;/span>&lt;span class="lnt"> 2
&lt;/span>&lt;span class="lnt"> 3
&lt;/span>&lt;span class="lnt"> 4
&lt;/span>&lt;span class="lnt"> 5
&lt;/span>&lt;span class="lnt"> 6
&lt;/span>&lt;span class="lnt"> 7
&lt;/span>&lt;span class="lnt"> 8
&lt;/span>&lt;span class="lnt"> 9
&lt;/span>&lt;span class="lnt">10
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-rust" data-lang="rust">&lt;span class="line">&lt;span class="cl">&lt;span class="k">trait&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">ImplicitGraph&lt;/span>&lt;span class="o">&amp;lt;&lt;/span>&lt;span class="n">C&lt;/span>&lt;span class="o">&amp;gt;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="k">where&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="n">C&lt;/span>: &lt;span class="nb">IntoIterator&lt;/span>&lt;span class="o">&amp;lt;&lt;/span>&lt;span class="n">Item&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="bp">Self&lt;/span>::&lt;span class="n">State&lt;/span>&lt;span class="o">&amp;gt;&lt;/span>&lt;span class="p">,&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="p">{&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="k">type&lt;/span> &lt;span class="nc">State&lt;/span>&lt;span class="p">;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="k">fn&lt;/span> &lt;span class="nf">start&lt;/span>&lt;span class="p">()&lt;/span>&lt;span class="w"> &lt;/span>-&amp;gt; &lt;span class="nc">Self&lt;/span>::&lt;span class="n">State&lt;/span>&lt;span class="p">;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="k">fn&lt;/span> &lt;span class="nf">partition&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">state&lt;/span>: &lt;span class="nc">Self&lt;/span>::&lt;span class="n">State&lt;/span>&lt;span class="p">)&lt;/span>&lt;span class="w"> &lt;/span>-&amp;gt; &lt;span class="kt">u64&lt;/span>&lt;span class="p">;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="k">fn&lt;/span> &lt;span class="nf">transition&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">state&lt;/span>: &lt;span class="nc">Self&lt;/span>::&lt;span class="n">State&lt;/span>&lt;span class="p">)&lt;/span>&lt;span class="w"> &lt;/span>-&amp;gt; &lt;span class="nc">C&lt;/span>&lt;span class="p">;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="k">fn&lt;/span> &lt;span class="nf">retrograde&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">state&lt;/span>: &lt;span class="nc">Self&lt;/span>::&lt;span class="n">State&lt;/span>&lt;span class="p">)&lt;/span>&lt;span class="w"> &lt;/span>-&amp;gt; &lt;span class="nc">C&lt;/span>&lt;span class="p">;&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="c1">// &amp;lt;-- NEW
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">&lt;/span>&lt;span class="p">}&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>
&lt;p>In an ideal world, &lt;code>retrograde&lt;/code> is the equivalent of &lt;code>transition&lt;/code> for the &lt;a href="https://en.wikipedia.org/wiki/Transpose_graph">transpose&lt;/a> of the graph being represented. Unfortunately, it is not generally tractable to have a perfect implementation of &lt;code>retrograde&lt;/code> without first materializing the entire graph (defeating the purpose of an implicit graph representation). Thus, we only make sure that &lt;code>retrograde&lt;/code> returns a superset of what &lt;code>transition&lt;/code> would return for the transpose of the graph, which is easy to ensure in many useful cases.&lt;/p>
&lt;p>With $\pi$ and $t&amp;rsquo;$ in our hands, we can provision the following procedure for parallelizing the execution of an unorganized dynamic programming algorithm over an implicit graph $G^I$ of subproblems:&lt;/p>
&lt;style>
.box-body > :last-child {
margin-bottom: 0 !important;
}
.box-body > :first-child {
margin-top: 0 !important;
}
&lt;/style>
&lt;div
class="hint-box"
style="
border: 1px solid #000000;
padding: 10px;
border-radius: 5px;
margin: 16px 0;
background-color: rgba(0, 0, 0, 0.05);
"
>
&lt;strong style="display: block; margin-bottom: 5px"
>Procedure&lt;/strong
>
&lt;hr
style="
border: none;
border-top: 1px solid #000000;
margin: 10px 0;
width: calc(100%);
"
/>
&lt;div style="font-size: 0.92em" class="box-body">
&lt;ol>
&lt;li>Traverse $G^I$ to obtain the set of subproblems $S$ in $\mathcal{\Theta}(|G^I|)$ time and $\mathcal{\Theta}(|S|)$ space.&lt;/li>
&lt;li>During (1), track the subset of subproblems $S_{base} = \{ s \; | \; t(s) = \varnothing \}$ at no additional cost.&lt;/li>
&lt;li>During (1), construct a graph $G_\Pi$ over a set of partition labels $\Pi$ using $\pi$, at a $\pi$-dependent cost.&lt;/li>
&lt;li>Use $G_\Pi$ to generate a plan&lt;sup id="fnref:10">&lt;a href="#fn:10" class="footnote-ref" role="doc-noteref">10&lt;/a>&lt;/sup> of labeled parallel tasks in $\mathcal{\Theta}(|G_\Pi|)$ time and $\mathcal{\Theta}(|\Pi|)$ space.&lt;/li>
&lt;li>Delegate tasks, starting exploration from popped elements of $S_{base}$ with the task&amp;rsquo;s label.&lt;/li>
&lt;li>Use $t&amp;rsquo;$ for backward intra-partition traversal (using $S$ for existence checks) in $t&amp;rsquo;$-dependent time.&lt;/li>
&lt;li>When a change in $\pi(s)$ is observed on the current state $s$, add $s$ to $S_{base}$, leaving it unexplored.&lt;/li>
&lt;li>When a partition is completely explored, finish its task and free the parallel unit.&lt;/li>
&lt;li>Repeat from (5) on new elements of $S_{base}$ until there are no tasks remaining.&lt;/li>
&lt;/ol>
&lt;/div>
&lt;/div>
&lt;p>These general steps skip some details, but they present an arbitrarily parallel stack-free traversal that can be implemented over a single shared data structure whose size scales in the order of $\mathcal{\Theta}(|S|)$ (ignoring structures related to partitions, whose size is assumed to be negligible). This kind of map-like &lt;a href="https://en.wikipedia.org/wiki/Thread_safety">thread-safe&lt;/a> functionality is available in many database implementations which automatically bring the added benefit of disk usage, making this method applicable to &amp;ldquo;bigger&amp;rdquo; problems.&lt;/p>
&lt;hr>
&lt;h2 id="meta-content">Meta-content&lt;/h2>
&lt;p>The section titled &amp;ldquo;Representation&amp;rdquo; got us to stumble across the new concepts of implicit graphs and abstractions by looking at different forms for game representations. The following section extrapolated these ideas to the domain of dynamic programming, and showed how it is possible to incorporate them into the design of solutions to real-world problems.&lt;/p>
&lt;p>Something interesting is that games made their way into the second section, despite being decidedly out of scope at that point. In a dying hope of getting this article back on track, I will point out that the particular example of parallelizing DP algorithms was conveniently chosen because it is used to &lt;a href="https://en.wikipedia.org/wiki/Solved_game">solve&lt;/a> bigger games faster than was previously possible (through DP algorithms that consume representations of them).&lt;/p>
&lt;p>This way, I can say that this whole article was in fact about game-theoretic systems. But we both know that it was really about implicit graphs and abstractions. Maybe, if we squint our eyes, it can be about both topics. Either way, I hope the lack of clarity was more stimulating than it was confusing.&lt;/p>
&lt;div class="footnotes" role="doc-endnotes">
&lt;hr>
&lt;ol>
&lt;li id="fn:1">
&lt;p>The problem of deciding whether or not a string is in the language of a context-free grammar.&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:2">
&lt;p>For his doctoral dissertation, &lt;a href="https://gametheory.online/projects/documents/1521541344.pdf">&lt;em>Non-Cooperative Games&lt;/em>&lt;/a>.&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:3">
&lt;p>This fact is known as &lt;a href="https://en.wikipedia.org/wiki/Zermelo%27s_theorem_(game_theory)">Zermelo&amp;rsquo;s theorem&lt;/a>.&amp;#160;&lt;a href="#fnref:3" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:4">
&lt;p>In both &lt;a href="https://en.wikipedia.org/wiki/Measure_(mathematics)">the mathematical&lt;/a> and informal sense.&amp;#160;&lt;a href="#fnref:4" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:5">
&lt;p>For example, &lt;a href="https://www.youtube.com/watch?v=-aSBlRhpwVc">Christos Papadimitrou on replicator dynamics&lt;/a>.&amp;#160;&lt;a href="#fnref:5" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:6">
&lt;p>$\text{N}\small{\text{ASH}}$ asks to find a mixed-strategy NE. A pure-strategy NE is a case of a mixed-strategy NE. &lt;a href="https://en.wikipedia.org/wiki/Zermelo%27s_theorem_(game_theory)">Zermelo&amp;rsquo;s theorem&lt;/a> shows a pure-strategy NE always exists for the class of games in question. Then, &lt;a href="https://en.wikipedia.org/wiki/Backward_induction">backward induction&lt;/a> algorithms can find one in linear time for finite representations of games.&amp;#160;&lt;a href="#fnref:6" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:7">
&lt;p>It is possible to obtain this number for a specific starting configuration of a Rubik&amp;rsquo;s Cube, but no one knows the length of the longest minimal sequence of moves necessary to solve it across all starting configurations. This is somewhat dramatically known as &lt;a href="https://web.archive.org/web/20141109174500/http://digitaleditions.walsworthprintgroup.com/article/The_Quest_For_God%E2%80%99s_Number/532775/50242/article.html">God&amp;rsquo;s Number&lt;/a>.&amp;#160;&lt;a href="#fnref:7" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:8">
&lt;p>Term generalized from &lt;a href="https://www2.eecs.berkeley.edu/Pubs/TechRpts/2001/CSD-01-1156.pdf">its use in reinforcement learning&lt;/a>.&amp;#160;&lt;a href="#fnref:8" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:9">
&lt;p>This subproblem relation monomorphizes the generic formulation of the &lt;a href="https://en.wikipedia.org/wiki/Minimax">minimax algorithm&lt;/a>.&amp;#160;&lt;a href="#fnref:9" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:10">
&lt;p>A parallelization plan is a data structure that can dispense information on which task must be worked on next when a parallel unit becomes available for work. It may also communicate the need to wait until another unit completes its work.&amp;#160;&lt;a href="#fnref:10" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;/ol>
&lt;/div></description></item></channel></rss>