<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>applied-ai examples on Programmer.ie: Modern AI programming</title>
		<link>http://programmer.ie/examples/applied-ai/</link>
		<description>Recent content in applied-ai examples on Programmer.ie: Modern AI programming</description>
		<generator>Hugo</generator>
		<language>en-US</language>
		
		
		
		
			<atom:link href="http://programmer.ie/examples/applied-ai/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>Keep the report, the observation and the effect apart</title>
				<link>http://programmer.ie/examples/applied-ai/19-chapter/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>http://programmer.ie/examples/applied-ai/19-chapter/</guid>
				<description>&lt;p&gt;Four workers report the same thing — &lt;code&gt;SUCCEEDED&lt;/code&gt; — and the record says four&#xA;different things, none of them on the worker&amp;rsquo;s say-so. The chapter&amp;rsquo;s claim is&#xA;that &amp;ldquo;the agent said done&amp;rdquo; is three questions, not one: what the actor said,&#xA;what the runtime could read, and what a declared check against a bound target&#xA;supports.&lt;/p&gt;&#xA;&lt;h2 id=&#34;run-it&#34;&gt;Run it&lt;/h2&gt;&#xA;&lt;div class=&#34;bookkit-example-code&#34; data-example-code&gt;&#xA;  &lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git clone https://github.com/ernanhughes/codeai.git&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cd codeai&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git checkout c1707f793abbd6042dce7d00b6dde34f2dbf33cc&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;PYTHONPATH&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;src python examples/applied_ai/ch19_effect_observation.py&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;  &lt;textarea data-example-source hidden readonly aria-hidden=&#34;true&#34; aria-label=&#34;Code source&#34;&gt;git clone https://github.com/ernanhughes/codeai.git&#xA;cd codeai&#xA;git checkout c1707f793abbd6042dce7d00b6dde34f2dbf33cc&#xA;PYTHONPATH=src python examples/applied_ai/ch19_effect_observation.py&lt;/textarea&gt;&#xA;  &lt;button type=&#34;button&#34; data-example-copy hidden&gt;Copy code&lt;/button&gt;&lt;span role=&#34;status&#34;&gt;&lt;/span&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;CodeAI has no runtime dependencies, so nothing needs installing; &lt;code&gt;PYTHONPATH=src&lt;/code&gt;&#xA;is enough. On PowerShell, set it first with &lt;code&gt;$env:PYTHONPATH = &amp;quot;src&amp;quot;&lt;/code&gt;. Python&#xA;3.11 or later. No model is called and nothing leaves the machine.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Resolve the grant from the record, not from the caller</title>
				<link>http://programmer.ie/examples/applied-ai/20-chapter/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>http://programmer.ie/examples/applied-ai/20-chapter/</guid>
				<description>&lt;p&gt;The chapter&amp;rsquo;s claim is that the grant that authorized an effect is one the&#xA;&lt;em&gt;record&lt;/em&gt; establishes. A caller that supplies its own authority is not a source&#xA;of permission: it is a claim, and the runtime decides the claim from the&#xA;directive chain it has recorded.&lt;/p&gt;&#xA;&lt;h2 id=&#34;run-it&#34;&gt;Run it&lt;/h2&gt;&#xA;&lt;div class=&#34;bookkit-example-code&#34; data-example-code&gt;&#xA;  &lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git clone https://github.com/ernanhughes/codeai.git&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cd codeai&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git checkout c1707f793abbd6042dce7d00b6dde34f2dbf33cc&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;PYTHONPATH&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;src python examples/applied_ai/ch20_authority.py&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;  &lt;textarea data-example-source hidden readonly aria-hidden=&#34;true&#34; aria-label=&#34;Code source&#34;&gt;git clone https://github.com/ernanhughes/codeai.git&#xA;cd codeai&#xA;git checkout c1707f793abbd6042dce7d00b6dde34f2dbf33cc&#xA;PYTHONPATH=src python examples/applied_ai/ch20_authority.py&lt;/textarea&gt;&#xA;  &lt;button type=&#34;button&#34; data-example-copy hidden&gt;Copy code&lt;/button&gt;&lt;span role=&#34;status&#34;&gt;&lt;/span&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;CodeAI has no runtime dependencies, so nothing needs installing. Python 3.11 or&#xA;later. No model is called and nothing leaves the machine.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Bind a check to the state it actually reached</title>
				<link>http://programmer.ie/examples/applied-ai/21-chapter/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>http://programmer.ie/examples/applied-ai/21-chapter/</guid>
				<description>&lt;p&gt;A check that passes establishes one narrow thing: this declared command, against&#xA;this bound target, exited 0. The chapter&amp;rsquo;s claim is that the interesting cases&#xA;are the other three, and that INCONCLUSIVE and ERROR are not FAIL. A check that&#xA;could not read its subject, and a check that measured the wrong state, need&#xA;different repairs from a check that found a real problem.&lt;/p&gt;&#xA;&lt;h2 id=&#34;run-it&#34;&gt;Run it&lt;/h2&gt;&#xA;&lt;div class=&#34;bookkit-example-code&#34; data-example-code&gt;&#xA;  &lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git clone https://github.com/ernanhughes/codeai.git&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cd codeai&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git checkout c1707f793abbd6042dce7d00b6dde34f2dbf33cc&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;PYTHONPATH&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;src python examples/applied_ai/ch21_verification.py&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;  &lt;textarea data-example-source hidden readonly aria-hidden=&#34;true&#34; aria-label=&#34;Code source&#34;&gt;git clone https://github.com/ernanhughes/codeai.git&#xA;cd codeai&#xA;git checkout c1707f793abbd6042dce7d00b6dde34f2dbf33cc&#xA;PYTHONPATH=src python examples/applied_ai/ch21_verification.py&lt;/textarea&gt;&#xA;  &lt;button type=&#34;button&#34; data-example-copy hidden&gt;Copy code&lt;/button&gt;&lt;span role=&#34;status&#34;&gt;&lt;/span&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;CodeAI has no runtime dependencies, so nothing needs installing. Python 3.11 or&#xA;later. No model is called and nothing leaves the machine.&lt;/p&gt;</description>
			</item>
			<item>
				<title>A failed report is not an absent effect</title>
				<link>http://programmer.ie/examples/applied-ai/22-chapter/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>http://programmer.ie/examples/applied-ai/22-chapter/</guid>
				<description>&lt;p&gt;The chapter&amp;rsquo;s hardest distinction is &lt;strong&gt;operation reported failed → effect did&#xA;not happen&lt;/strong&gt;. Those are two different facts, and a system that collapses them&#xA;will retry an action that already took effect. The program&amp;rsquo;s fixture is a&#xA;worker that appends a line to a file and then loses its connection.&lt;/p&gt;&#xA;&lt;h2 id=&#34;run-it&#34;&gt;Run it&lt;/h2&gt;&#xA;&lt;div class=&#34;bookkit-example-code&#34; data-example-code&gt;&#xA;  &lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git clone https://github.com/ernanhughes/codeai.git&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cd codeai&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git checkout c1707f793abbd6042dce7d00b6dde34f2dbf33cc&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;PYTHONPATH&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;src python examples/applied_ai/ch22_action_recovery.py&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;  &lt;textarea data-example-source hidden readonly aria-hidden=&#34;true&#34; aria-label=&#34;Code source&#34;&gt;git clone https://github.com/ernanhughes/codeai.git&#xA;cd codeai&#xA;git checkout c1707f793abbd6042dce7d00b6dde34f2dbf33cc&#xA;PYTHONPATH=src python examples/applied_ai/ch22_action_recovery.py&lt;/textarea&gt;&#xA;  &lt;button type=&#34;button&#34; data-example-copy hidden&gt;Copy code&lt;/button&gt;&lt;span role=&#34;status&#34;&gt;&lt;/span&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;CodeAI has no runtime dependencies, so nothing needs installing. Python 3.11 or&#xA;later. No model is called and nothing leaves the machine.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Decide the next step, and replay the decision that was recorded</title>
				<link>http://programmer.ie/examples/applied-ai/28-chapter/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>http://programmer.ie/examples/applied-ai/28-chapter/</guid>
				<description>&lt;p&gt;The chapter separates three things that often get merged: which &lt;em&gt;operation&lt;/em&gt;&#xA;comes next, whether to &lt;em&gt;escalate&lt;/em&gt; to a person, and which &lt;em&gt;selector&lt;/em&gt; answers.&#xA;The scheduler here is a deterministic policy over an explicit state, and the&#xA;run&amp;rsquo;s last part is the part that matters: the decision that was recorded is&#xA;replayed, and the facts it rested on are shown.&lt;/p&gt;&#xA;&lt;h2 id=&#34;run-it&#34;&gt;Run it&lt;/h2&gt;&#xA;&lt;div class=&#34;bookkit-example-code&#34; data-example-code&gt;&#xA;  &lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git clone https://github.com/ernanhughes/codeai.git&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cd codeai&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git checkout c1707f793abbd6042dce7d00b6dde34f2dbf33cc&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;PYTHONPATH&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;src python examples/applied_ai/ch28_scheduler.py&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;  &lt;textarea data-example-source hidden readonly aria-hidden=&#34;true&#34; aria-label=&#34;Code source&#34;&gt;git clone https://github.com/ernanhughes/codeai.git&#xA;cd codeai&#xA;git checkout c1707f793abbd6042dce7d00b6dde34f2dbf33cc&#xA;PYTHONPATH=src python examples/applied_ai/ch28_scheduler.py&lt;/textarea&gt;&#xA;  &lt;button type=&#34;button&#34; data-example-copy hidden&gt;Copy code&lt;/button&gt;&lt;span role=&#34;status&#34;&gt;&lt;/span&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;CodeAI has no runtime dependencies, so nothing needs installing. Python 3.11 or&#xA;later. No model is called and nothing leaves the machine.&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
