wildwood/docs/codox/Bialowieza.html

342 lines
36 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html PUBLIC ""
"">
<html><head><meta charset="UTF-8" /><title>Bialowieza</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Wildwood</span> <span class="project-version">0.1.0-SNAPSHOT</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="AgainstTruth.html"><div class="inner"><span>Against Truth</span></div></a></li><li class="depth-1 "><a href="Analysis.html"><div class="inner"><span>Analysis</span></div></a></li><li class="depth-1 "><a href="Arboretum.html"><div class="inner"><span>Arboretum</span></div></a></li><li class="depth-1 "><a href="Arden.html"><div class="inner"><span>Arden</span></div></a></li><li class="depth-1 "><a href="BatesonKammerer.html"><div class="inner"><span>The Bateson / Kammerer debate</span></div></a></li><li class="depth-1 current"><a href="Bialowieza.html"><div class="inner"><span>Bialowieza</span></div></a></li><li class="depth-1 "><a href="Errata.html"><div class="inner"><span>Errata</span></div></a></li><li class="depth-1 "><a href="Experience.html"><div class="inner"><span>Experience</span></div></a></li><li class="depth-1 "><a href="HegemonicArgument.html"><div class="inner"><span>Hegemonic Argument</span></div></a></li><li class="depth-1 "><a href="History.html"><div class="inner"><span>History</span></div></a></li><li class="depth-1 "><a href="HuxleyKropotkin.html"><div class="inner"><span>The Huxley / Kropotkin debate</span></div></a></li><li class="depth-1 "><a href="Implementing.html"><div class="inner"><span>Implementing</span></div></a></li><li class="depth-1 "><a href="JAccuse.html"><div class="inner"><span>J'Accuse</span></div></a></li><li class="depth-1 "><a href="KnacqTools.html"><div class="inner"><span>KnacqTools</span></div></a></li><li class="depth-1 "><a href="Manifesto.html"><div class="inner"><span>Manifesto</span></div></a></li><li class="depth-1 "><a href="OnHylasAndPhilonus.html"><div class="inner"><span>On the First Dialogue of Hylas and Philonous</span></div></a></li><li class="depth-1 "><a href="Scratchpad.html"><div class="inner"><span>Scratchpad: Working notes, not part of the main document</span></div></a></li><li class="depth-1 "><a href="TheProblem.html"><div class="inner"><span>The Problem</span></div></a></li><li class="depth-1 "><a href="intro.html"><div class="inner"><span>Introduction to Wildwood</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>wildwood</span></div></div></li><li class="depth-2 branch"><a href="wildwood.advocate.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>advocate</span></div></a></li><li class="depth-2 branch"><a href="wildwood.bialowieza.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>bialowieza</span></div></a></li><li class="depth-2 branch"><a href="wildwood.caesar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>caesar</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>dengine</span></div></div></li><li class="depth-3 branch"><a href="wildwood.dengine.engine.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>engine</span></div></a></li><li class="depth-3"><a href="wildwood.dengine.node.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>node</span></div></a></li><li class="depth-2 branch"><a href="wildwood.knowledge-accessor.html"><div class="inner"><span class="tree" style="top: -83px;"><span class="top" style="height: 92px;"></span><span class="bottom"></span></span><span>knowledge-accessor</span></div></a></li><li class="depth-2 branch"><a href="wildwood.logic.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>logic</span></div></a></li><li class="depth-2 branch"><a href="wildwood.mongo-ka.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mongo-ka</span></div></a></li><li class="depth-2"><a href="wildwood.schema.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>schema</span></div></a></li></ul></div><div class="document" id="content"><div class="doc"><div class="markdown"><h1><a href="#bialowieza" name="bialowieza"></a>Bialowieza</h1>
<p>{ this chapter is in active development; quite a lot of the technical detail in this chapter at present will probably end up in <a href="Implementing.html">Implementing</a>, while additional high level and conceptual design, as it develops, will be here. }</p>
<h2><a href="#why-bialowieza-" name="why-bialowieza-"></a>Why Bialowieza?</h2>
<p>Bialowieza is the second iteration of the Wildwood engine, and this following convention its name should start with B. <a href="https://en.wikipedia.org/wiki/Bia%C5%82owie%C5%BCa">Białowieża</a> is Europes last great wild wood, and it is currently under threat.</p>
<h2><a href="#motivation" name="motivation"></a>Motivation</h2>
<p>The current motivation for restarting work on Wildwood is to provide non-player characters in a game world with sufficient intelligence that they can enter into meaningful unscripted conversations about objects and events in that world.</p>
<h2><a href="#knowledge-representation" name="knowledge-representation"></a>Knowledge representation</h2>
<p>Its my intention that knowledge will be represented in Bialowieza not as Features, as were used in Arboretum, but as propositions, and in this section I intend to state what I mean by a proposition.</p>
<h3><a href="#on-propositional-and-predicate-calculi" name="on-propositional-and-predicate-calculi"></a>On propositional and predicate calculi</h3>
<p>But firstly I should be clear that Bialowieza does <em>not</em> represent a propositional calculus. On the contrary, Arboretum, which dealt with features, is a propositional calculus. How so?</p>
<p>A feature, in Arboretum, was a one-position predicate; an example would be, is a widow. Propositions were (in effect) constructed by applying that predicate to the case. Thus, suppose we were considering the case of someone called Calpurnia, the feature is a widow expands to the proposition Calpurnia is a widow; and this proposition is, to Arboretum, atomic.</p>
<p>Thus Arboretum can reason about whether Calpurnia is a widow. It can have a rule (and indeed, did have a rule) which says</p>
<pre><code>if
is a woman, and
has been married, and
husband is dead
then
is a widow
unless
was divorced, or
has remarried.
</code></pre>
<p>The features are given as predicates, because all must apply to the same subject; expanding them to propositions gives us, in this case</p>
<pre><code>if
Calpurnia is a woman, and
Calpurnia has been married, and
Calpurnia's husband is dead
then
Calpurnia is a widow
unless
Calpurnia was divorced, or
Calpurnia has remarried.
</code></pre>
<p>However, another proposition about a claimant that might have been been interesting to an adjudicating officer might be is a widowed mother. One might define that in common sense terms as</p>
<pre><code>if
Calpurnia is a widow, and
there exists some person whose mother is Calpurnia, and
that person is still a child
then
Calpurnia is a widowed mother
</code></pre>
<h3><a href="#propositions" name="propositions"></a>Propositions</h3>
<p>{ <strong>TODO</strong> read, and follow references from, <a href="https://plato.stanford.edu/entries/propositions/">https://plato.stanford.edu/entries/propositions/</a> }</p>
<p>As a slightly tendentious first stab, a proposition is a sentence which is either true or false. This is tendentious because two different sentences which have the same underlying semantic import are usually considered to be instances of the same proposition, and seen from the other end, there may be many ways you can validly express a single proposition in a single natural language. However, for the present purpose, the proposition that a proposition is a sentence is good enough.</p>
<p>A sentence generally has the form</p>
<pre><code>&lt;verb subject object&gt;
</code></pre>
<p>with possibly a lot of other qualifying material.</p>
<p>So we shall say that a proposition will be represented as a Clojure map with at least the keys:</p>
<ul>
<li><code>:verb</code> - what is asserted</li>
<li><code>:subject</code> - of whom (or what)</li>
<li><code>:object</code> - to whom (or what)</li>
</ul>
<p>Thus</p>
<pre><code>{:verb :kill :subject :brutus :object :caesar}
</code></pre>
<p>is a proposition which asserts that Brutus killed Caesar.</p>
<p>There may be many other privileged keys, such as</p>
<ul>
<li><code>:location</code> - where did it happen? value might be something from which proximity may be derived;</li>
<li><code>:time</code> - when did it happen? This needs to be a value with a canonical order, such as a number;</li>
<li><code>:confidence</code> - how sure am I? A value, perhaps, in the range -1 to 1, where values less than one in effect represent a belief that the proposition is false;</li>
<li><code>:data</code> - a collection of (zero or more) argument structures;</li>
<li><code>:authority</code> - id of agent from whom, or rule from which, I know this;</li>
</ul>
<p>and so on. The exact set of privileged keys is probably actually a matter for particular advocates rather than for the engine itself, although if the advocates in the game dont broadly share the same set of privileged keys then it wont work very well.</p>
<p><em>However…</em></p>
<p>The attentive reader will note that some of the proposed privileged keys map closely onto the <a href="Analysis.html#the-toulmin-schema">Toulmin schema</a>. Thus we can say:</p>
<ul>
<li>that the proposition itself is a <code>claim</code> in the sense of the <strong>C</strong> term;</li>
<li>that <code>:data</code> above is precisely <code>data</code> in the sense of the <strong>D</strong> term in Toulmins schema, but may (is likely to) also provide a <code>warrant</code> in the sense of the <strong>W</strong> term;</li>
<li>that <code>:confidence</code> is a <code>qualifier</code> of the claim in the sense of the <strong>Q</strong> term;</li>
<li>that <code>:authority</code> is a form of <code>backing</code> in the sense of the <strong>B</strong> term.</li>
</ul>
<p>So what, then, is an argument structure, as described above? It seems to me that it may be exactly a proposition, with the special feature that the value of the <code>:data</code> key is not minimised.</p>
<p>Recall that in the chapter on Arboretum I observed that <a href="Arboretum.html#relevance-filtering">the working of the DTree decision algorithm caused precisely those nodes to be collected whose fragments which provided the most relevant explanation</a> to support the decision, in a natural sequence from the general to the particular. I believe that precisely the same fortuitous alchemy will provide the argument structure to provide Toulmins <strong>D</strong> - out <code>:data</code> term. The DTree itself then becomes the <strong>W</strong> - the <code>:warrant</code>; and the author of the DTree becomes the <code>:authority</code>.</p>
<h3><a href="#the-located-proposition" name="the-located-proposition"></a>The located proposition</h3>
<p>Aristotles propositions are essentially two position: they describe a relationship between two entities, a subject and an object. But theyre not located.</p>
<p>Thus:</p>
<ul>
<li>Socrates is a man</li>
</ul>
<p>Tells us that Socrates is always, and everywhere, a man. If Socrates led a double life - if, perhaps, when in Lesbos, he lived as a woman - this simple proposition cannot capture the fact. Lets draw another example, to make clear.</p>
<ul>
<li>Brutus killed Caesar</li>
</ul>
<p>tells us that, and only that, Brutus killed Caesar. It doesnt allow us to say how Brutus killed Caesar. If we then say</p>
<ul>
<li>Brutus used Dagger<sub>1</sub></li>
</ul>
<p>It still doesnt help, because we dont know how these two propositions relate to one another. Brutus could indeed have used this particular dagger at some time, it might well be the dagger that kille Caesar, but theres no smoking gun.</p>
<p>But if we say</p>
<ol>
<li>Brutus killed Caesar in the Forum on the Ides of March</li>
<li>Brutus used Dagger<sub>1</sub> in the Forum on the Ides of March</li>
<li>Dagger<sub>1</sub> caused Wound<sub>1</sub> in the Forum on the Ides of March</li>
<li>Caesar died of Wound<sub>1</sub> in the Forum on the Ides of March</li>
</ol>
<p>then provided the atomicity of our notions of time and space is sufficiently fine, were getting pretty close. Adding a notion of location to propositions leads to the notion of an event, a small bundle or ball of time and space which gives them context; and we can reason with this.</p>
<p>The size of an event is, of course, a slightly slippery notion. The inference that Caesar died (at least partly) from the blow struck by Brutus is only possible if the envelope of the event is fairly small - no more than a few metres, no more than a few minutes. But if we replace Dagger<sub>1</sub> with Rifle<sub>1</sub> then the spatial extent of the event can be considerable expanded; and if its LandMine<sub>1</sub>, then the temporal aspect similarly so.</p>
<h3><a href="#are-located-two-position-propositions-sufficient-" name="are-located-two-position-propositions-sufficient-"></a>Are located two-position propositions sufficient?</h3>
<p>The reason I like the idea of investigating whether located two position propositions are sufficient is that a very regular knowlege representation is easy to compute over. The reason I think it might not be is that some things dont - at first glance - seem to fit naturally into this schema.</p>
<p>For example, suppose Calpurnia told Drusilla that Brutus killed Caesar in the Forum on the Ides of March. For simplicity, lets call</p>
<ul>
<li>Brutus killed Caesar in the Forum on the Ides of March.</li>
</ul>
<p>Proposition<sub>1</sub>, or P<sub>1</sub> for short. What is the warrant for believing P<sub>1</sub>? Well, its that Calpurnia told Drusilla (and presumably, that Drusilla has now told us).</p>
<p>So we have a notional event E<sub>1</sub> such that</p>
<ul>
<li>P<sub>1</sub> := Brutus killed Caesar in the Forum on the Ides of March.</li>
<li>P<sub>2</sub> := Calpurnia uttered P<sub>1</sub> at E<sub>1</sub>.</li>
<li>P<sub>3</sub> := Drusilla heard P<sub>1</sub> at E<sub>1</sub>.</li>
</ul>
<p>And the warrant for Drusillas belief that P<sub>1</sub> is the conjunction of P<sub>2</sub> and P<sub>3</sub>.</p>
<p>So we can represent this as</p>
<pre><code class="clojure"> {:verb :kill :subject :brutus :object :caesar :location :forum :date ides-of-march
:data [{:verb :utter :subject :calpurnia
:object {:verb :kill :subject :brutus :object :caesar :location :forum :date ides-of-march :authority :calpurnia}
:authority :drusilla}
{:verb :hear :subject :calpurnia
:object {:verb :kill :subject :brutus :object :caesar :location :forum :date ides-of-march :authority :calpurnia} :authority :drusilla}]
:authority :drusilla}
</code></pre>
<p>Taking it further to look at the sorts of things required by <a href="https://simon-brooke.github.io/the-great-game/codox/">The Great Game</a>, there are two classes of things which need frequently to be handled. one is the passing of news, in <a href="https://blog.journeyman.cc/2008/04/the-spread-of-knowledge-in-large-game.html">gossip</a>; and the other is recording trading information, in <a href="https://simon-brooke.github.io/the-great-game/codox/the-great-game.merchants.markets.html">markets</a>.</p>
<p>The <strong>gossip</strong> case is covered by the <em>Calpurnia told Drusilla</em> example given above, leaving the markets case. When trading in markets we need three things: who sold the consignment, who bought the consignment, and the unit price of the commodity. Note that putting it like that makes a <code>consignment</code> a first class entity, with properties of at least <code>commodity</code> and <code>quantity</code>.</p>
<p>So, again, we have a notional event E<sub>2</sub> at which a commodity C<sub>1</sub> was traded, where E<sub>2</sub> has (for example) a location of <code>Forfar</code> and a timestamp of 202005181600; while C<sub>1</sub> has a commodity of <code>Fish</code> and a quantity of <code>50</code>. Lets say the price was 4 bronze coins per kilo.</p>
<p>This transaction could be represented by the propositions:</p>
<ul>
<li>P<sub>4</sub> := Donald sold 50 Kg of Fish in Forfar at 202005181600</li>
<li>P<sub>5</sub> := Fiona bought 50 Kg of Fish in Forfar at 202005181600</li>
<li>P<sub>6</sub> := Fish sold for 4 bronze/Kg in Forfar at 202005181600</li>
</ul>
<p>So it seems to me that its possible to represent the things I know I need to represent, using only located two-position propositions.</p>
<p>As an exercise for the reader, how would we represent Dirck, Joris and I carried the good news from Ghent to Aix using only located two position propositions? It feels, as I said, clumsy.</p>
<p>There is, of course, also a lurking combinatorial explosion here. If for each proposition which is learned, two further propositions must be learned as warrant for the first proposition, the world blows up. In an ideal platonic universe we may indeed have turtles all the way down, but in a finite machine we need to say, arbitrarily but ruthlessly, that some classes of proposition will be stored unwarranted.</p>
<h3><a href="#the-event-is-like-a-situation" name="the-event-is-like-a-situation"></a>The event is (like) a situation</h3>
<p>I would draw the readers attention, here, to the similarity between the notion of an event, discussed above, and the <a href="Analysis.html#towards-a-situation-semantic-account-of-explanation">notion of a situation</a>, as discussed by Barwise &amp; Perry. In particular, Id like to draw attention to similarity between the account Ive given of how Drusillas belief that Brutus killed Caesar is warranted by</p>
<ul>
<li>P<sub>2</sub> := Calpurnia uttered P<sub>1</sub> at E<sub>1</sub>.</li>
<li>P<sub>3</sub> := Drusilla heard P<sub>1</sub> at E<sub>1</sub>.</li>
</ul>
<p>and the account of explanation as a situation E defined:</p>
<pre><code>E := at I1: understands, a, c; no
understands, b, c; yes
enquirlng, a; yes
addressing, a, b; yes
saying, a, q; yes
subject, q, c; yes
at I2: responding, b, q; yes
addressing, b, a; yes
saying, b, u; yes
subject, u, c; yes
at I3: understands, a, c; yes
understands, b, c; yes
I1 &lt; I2 &lt; I3
</code></pre>
<p>where: a, b are some actors; c is some concept; q, u are some utterances.</p>
<p>Explicitly:</p>
<ul>
<li>Drusilla =&gt; <strong>a</strong></li>
<li>Calpurnia =&gt; <strong>b</strong></li>
<li>P<sub>1</sub> =&gt; <strong>c</strong></li>
<li>E<sub>1</sub> =&gt; <strong>I2</strong></li>
</ul>
<p>Id argue that these are clearly very similar.</p>
<p>My schema does not specify that “at I1: … understands, a, c; no”, but theres a reason for that.</p>
<h3><a href="#learning-consistency-trust-and-confidence" name="learning-consistency-trust-and-confidence"></a>Learning, consistency, trust and confidence</h3>
<p>Let us suppose that Drusilla already knows the proposition that</p>
<ul>
<li>Brutus killed Caesar in Rome in March.</li>
</ul>
<p>Calpurnia now tells her that</p>
<ul>
<li>Brutus killed Caesar in the Forum on the Ides of March.</li>
</ul>
<p>The two accounts are compatible; this compatibility might be represented, if you choose, by two further propositions:</p>
<ul>
<li>P<sub>4</sub> The Forum is within Rome.</li>
<li>P<sub>5</sub> The Ides of March is within March.</li>
</ul>
<p>Philosophers, after Plato, very often argue as though they inhabited ideal universes in which every agent always tells the truth, but the real world is not like that. For any person, there are few other people that that person trusts implicitly. The very notion that we need a warrant for a belief is an explicit recognition of the fact that knowledge is imperfect.</p>
<p>So (unless she witnessed it herself, in which case youd expect her to have more precise information), Drusilla does not <em>know</em>, in a strong sense, that Brutus killed Caesar in Rome in March. She has some degree of confidence in that proposition, which is likely to be less than perfect.</p>
<p>When she learns from Calpurnia that Brutus killed Caesar in the Forum on the Ides of March, because the two claims are compatible, her confidence in each is likely to increase.</p>
<p>By contrast, if Falco then says No, I heard from Gaius that it happened in April, then that casts doubt on both the first two claims - but also on this new claim. Because the claims are not compatible, they cant all be right.</p>
<p>For the time being, Im going to leave the issue of how confidence is derived and adjusted as an implementation detail; I dont - yet, at any rate - have an account of how this should work that I can defend. There are two main avenues to explore,</p>
<ol>
<li><a href="https://en.wikipedia.org/wiki/Probability_axioms">The Kolmogorov axioms</a>;</li>
<li><a href="https://en.wikipedia.org/wiki/Cox%27s_theorem">Coxs theorem</a></li>
</ol>
<p>However, I havent yet worked out what the implications of either of these are for my schema.</p>
<p>However, theres one further significant point to make about propositions before we move on.</p>
<h3><a href="#on-the-subtext-of-propositions" name="on-the-subtext-of-propositions"></a>On the subtext of propositions</h3>
<p>Propositions are not atomic. They do not come single spies, but freighted with battalions of inferable subtexts. Suppose Calpurnia says</p>
<ul>
<li>Brutus killed Caesar in Rome during the ides of March</li>
</ul>
<p>I learn more than just that Brutus killed Caesar in Rome during the ides of March. I also learn that</p>
<ul>
<li>Brutus is a killer</li>
<li>Caesar has been killed</li>
<li>Rome is a place where killings happen</li>
<li>The Ides of March are a time to be extra cautious</li>
</ul>
<p>Suppose Cassius now says</p>
<ul>
<li>Longus killed Caesar in Rome during the ides of March</li>
</ul>
<p>this may cast some doubt on Calpurnias primary claim, and on the belief that Brutus is a killer. It doesnt rule it out - the accounts are compatible - but it certainly doesnt confirm it. However it does reinforce the beliefs that</p>
<ul>
<li>Caesar has been killed</li>
<li>Rome is a place where killings happen</li>
<li>The ides of March are a time to be extra cautious.</li>
</ul>
<p>If Falco then says</p>
<ul>
<li>No, I heard from Gaius that it happened in April</li>
</ul>
<p>the beliefs that</p>
<ul>
<li>Caesar has been killed</li>
<li>Rome is a place where killings happen</li>
</ul>
<p>are still further strengthened.</p>
<p>In proposing a formalism to express propositions, we need to consider how it allows this freight to be unpacked.</p>
<h3><a href="#conjunctions-disjunctions-and-confidence" name="conjunctions-disjunctions-and-confidence"></a>Conjunctions, disjunctions, and confidence</h3>
<p>Suppose we have an impeccable witness - one in whom we have 100% confidence - who tells us</p>
<ul>
<li>Brutus, Cassius <strong>and</strong> Longus killed Caesar in the Forum on the Ides of March</li>
</ul>
<p>From this we learn - all with 100% confidence - that</p>
<ul>
<li>Brutus is a killer</li>
<li>Cassius is a killer</li>
<li>Longus is a killer</li>
<li>Caesar has been killed</li>
<li>The Forum is a place where killings happen</li>
<li>The Ides of March are a time to be extra cautious</li>
</ul>
<p>And there are no problems there. But suppose, instead, our witness had said</p>
<ul>
<li>Brutus, Cassius <strong>or</strong> Longus killed Caesar in the Forum on the Ides of March</li>
</ul>
<p>What do we learn? Natural English does not distinguish between inclusive and exclusive disjunction. So we still know, with 100% certainty</p>
<ul>
<li>Caesar has been killed</li>
<li>The Forum is a place where killings happen</li>
<li>The Ides of March are a time to be extra cautious</li>
</ul>
<p>Do we know with any confidence at all that <code>Brutus is a killer</code>? We know with certainty that one of the three is a killer; there is a possibility (inclusive <code>or</code>) that all are killers. So it seems to me, naively, that we can at least divide the confidence we have in the initial, composite proposition by the number of disjuncts.</p>
<p>So we now have</p>
<ul>
<li>Brutus is a killer (33%)</li>
<li>Cassius is a killer (33%)</li>
<li>Longus is a killer (33%)</li>
<li>Caesar has been killed (100%)</li>
<li>The Forum is a place where killings happen (100%)</li>
<li>The Ides of March are a time to be extra cautious (100%)</li>
</ul>
<p>But wait.</p>
<p>What happens if we learn from another impeccable source that <code>Longus is not a killer</code>. What does that say about whether Brutus is? Obviously the confidence in the idea that <code>Brutus is a killer</code> must increase, so the three propositions</p>
<ul>
<li>Brutus is a killer</li>
<li>Cassius is a killer</li>
<li>Longus is a killer</li>
</ul>
<p>are not distict. Change in confidence in one implies change in confidence in the others. But how?</p>
<p>Suppose instead our second impeccable source had instead confirmed that <code>Longus killed Caesar in the Forum</code>. By the logic that said that the negation of this would cause our confidence in the possibility that <code>Brutus is a killer</code> should increase, surely now it must decrease?</p>
<p>But wait further.</p>
<p>Suppose our second impeccable source says <code>Cassius and Longus killed Caesar in the Forum</code>. Now we know that the <strong>or</strong> - the disjunction - was not exclusive. We know that two of the accused are guilty. What, if anything, does this say about Brutus? Is our confidence that he, too, is a killer, increased or decreased by this? I cannot see any justification for either.</p>
<h4><a href="#todo-read" name="todo-read"></a>TODO: read</h4>
<ul>
<li><a href="http://web.mit.edu/24.954/www/files/simons.disjunction.pdf">http://web.mit.edu/24.954/www/files/simons.disjunction.pdf</a></li>
<li><a href="https://link.springer.com/chapter/10.1007/BFb0031745">https://link.springer.com/chapter/10.1007/BFb0031745</a></li>
</ul>
<h3><a href="#universally-located-and-unlocated-propositions" name="universally-located-and-unlocated-propositions"></a>Universally located and unlocated propositions</h3>
<p>In the last passage, I observed that if we had multiple competing reported locations at which Caesar was said to have been killed, then there was nevertheless agreement on the fact that Caesar had been killed; so while we might be in doubt about whether the death had happened in March or June, theres much less doubt that the death happened.</p>
<p>So we have a hierarchy of confidence in the propositions:</p>
<ol>
<li>Were reasonably certain that Caesar was killed;</li>
<li>We may think it probable that he was killed in March, since we have two independent sources for this;</li>
<li>Were probably more skeptical that he was killed in April, since the report is second hand and since its inconsistent with the others.</li>
</ol>
<p>Of these, the first proposition is not located in time. There must have been an event, but we dont know when it was. Strictly, of course, we could in this case assign a broad event - the spring - but what I want to talk about here is cases of things which we believe have happened, but do not know when. The reason I want to talk about them is to draw a clear distinction between unlocated propositions, and universally located propositions.</p>
<p>A universally located proposition is something like</p>
<ul>
<li>Water is wet.</li>
</ul>
<p>Or, to use a more classical example,</p>
<ul>
<li>Socrates is a man.</li>
</ul>
<p>For the purposes of the pedagogy of logic, Socrates is always and everywhere a man. His manliness is universally located; thus the proposition Socrates is a man is always deemed to be true. Consider the proposition Socrates was hungry. This is also, almost certainly true. But he wasnt hungry for all time, he was hungry at most for short periods during his lifetime. Theres an important disctinction between</p>
<ul>
<li>Socrates is a man</li>
</ul>
<p>and</p>
<ul>
<li>Socrates was hungry</li>
</ul>
<p>and we need to make that explicit, so that we know whether were asserting an unlocated proposition or a universal one. Im going to elect that it is the universal that should always be explicitly stated, so we have</p>
<ul>
<li>Water is wet in the universe in all time;</li>
<li>Socrates is a man in the universe in all time;</li>
<li>Socrates was hungry.</li>
</ul>
<h4><a href="#proposition-minimisation" name="proposition-minimisation"></a>Proposition minimisation</h4>
<p>{ <strong>TODO</strong>: probably lose this. I increasingly think that, whatever the internal representation of the proposition within the advocate or knowledge base, the proposition as passed around must <em>always</em> be minimised. This is, in any case, very much an implementation detail. }</p>
<p>How are the values of <code>:subject</code>, <code>:object</code> and so on to be passed? If we pass rich knowledge structures around, then we lose the insight that different advocates may know different things about given objects. Thus, while internally within each advocates knowledge base objects may be stored with rich data, when theyre passed around in propositions they should be minimised - that is to say, the value should just be a unique identifier, such that, for every object in the domain, if an advocate knows anything at all about that object, it knows its unique identifier and knows the object by that unique identifier.</p>
<p>Thus the unique identifier has something of the nature of a true name, in the magical sense. A given true name, a given unique identifier, refers to precisely one thing in the world, and provided that two advocates both know the same true name, they can debats propositions which refer to the object with that true name.</p>
<p>Generally, a true name shall be a Clojure keyword. That keyword, passed to any advocate in the game, shall identify either <code>nil</code> (the advocate knows nothing of the object), or a map representing everything the advocate knows about the object, and within that map, the value of the key <code>:id</code> shall be that true name.</p>
<p>But in saying the advocate knows, actually, the advocate knows nothing. The advocate has access to a knowledge base, and it is in the knowledge base that the knowledge is stored. It may be an individual knowledge base, in which case we can implement that idea that different advocates may have the different knowledge about the same object, or it may be a shared consensual knowledge base.</p>
<p>A proposition is represented as a map. So to minimise a proposition, for every value in that map, if the value is itself a map it shall be replaced by the value of the key <code>:id</code> in that map.</p>
<p>This means that every implementation of the <code>wildwood.knowledge-accessor/Accessor</code> protocol must transduce whatever token its backing store uses as the primary key for an object to <code>:id</code> when it performs a <code>fetch</code> operation.</p>
<h2><a href="#major-components-of-bialowieza" name="major-components-of-bialowieza"></a>Major components of Bialowieza</h2>
<h3><a href="#knowledge-accessors" name="knowledge-accessors"></a>Knowledge Accessors</h3>
<p>The <code>wildwood.knowledge-accessor/Accessor</code> protocol defines a bidirectional transducer which can fetch data from whatever storage representation the calling application uses into the representation defined by <code>wildwood.schema</code>.</p>
<h3><a href="#advocates" name="advocates"></a>Advocates</h3>
<p>The <code>wildwood.advocate/Advocate</code> protocol describes an agent which can take part in decision processes.</p>
<h3><a href="#the-engine-itself" name="the-engine-itself"></a>The engine itself</h3>
<p>The engine is implemented by the namespace <code>wildwood.bialowieza</code>.</p>
<h3><a href="#inference-processes" name="inference-processes"></a>Inference processes</h3>
<p>Advocates are entitled to use whatever inference processes they like, but they have access to <code>wildwood.dengine</code>, which is an implementation of the DTree engine described in the chapter on <a href="Arboretum.html">Arboretum</a> adapted to propositions as defined in <code>wildwood.schema</code>.</p>
<h2><a href="#thoughts-on-the-shape-of-a-knowledge-base" name="thoughts-on-the-shape-of-a-knowledge-base"></a>Thoughts on the shape of a knowledge base</h2>
<p>The object of building Bialowieza as a library is that we should not constrain how applications which use the library store their knowledge. Rather, knowledge accessors must transduce between the representation used by the particular storage implementation and that defined in <code>wildwood.schema</code>. However, what weve described above suggests that a hierarchical database would be a very natural fit for knowlege base data - more natural, in this case, than a relational database.</p>
<h2><a href="#prejudice-and-defaults" name="prejudice-and-defaults"></a>Prejudice, and defaults</h2>
<p>In Arboretum and later in KnacqTools, default values of features were determined by the knowledge engineer, normally by asking the domain expert, and were fixed for the knowledge base at all times. But these two programs each reasoned about one case at a time, and did not store knowledge about multiple cases.</p>
<p>These systems could thus be said to be <em>prejudiced</em>, to the extent that knowledge of the world acquired over time did not change their default judgements. Wildwood holds knowledge on potentially very many objects, and that knowledge may change dynamically over time, both as the world changes and as new things which already existed in the world become known.</p>
<p>Suppose we wish to decide the truth value of the proposition</p>
<pre><code>{:verb :is :subject :brutus :object :honourable}
</code></pre>
<p>Suppose we have no rule for this, so we want to use a default. Suppose we scan all the propositions in the knowledge base which match the pattern</p>
<pre><code>{:verb :is :object :honourable}
</code></pre>
<p>and divide them into two sets, those which assert <code>true</code> and those which assert <code>false</code>.</p>
<p>If the arity of the true set is greater than the arity of the false set, then the default is <code>true</code> (and vice versa). But we can derive more than this: we can derive a confidence score, based on the ratio of true instances to false instances.</p>
<p>The problem is that this is computationally expensive. So we need to cache default values. Different advocates may use different caching strategies, with different time to live. The longer the time to live of a cached default, the more prejudiced - the less agile in learning - the advocate will be; but the faster it will be able to produce decisions.</p></div></div></div></body></html>