From dfaff530f2a54b9785cbad8844deb0c922b70be4 Mon Sep 17 00:00:00 2001 From: Simon Brooke Date: Mon, 18 May 2020 21:26:12 +0100 Subject: [PATCH] Updated documentation in line with code changes. --- doc/Bialowieza.md | 54 ++++-- docs/codox/AgainstTruth.html | 2 +- docs/codox/Analysis.html | 2 +- docs/codox/Arboretum.html | 2 +- docs/codox/Arden.html | 2 +- docs/codox/BatesonKammerer.html | 2 +- docs/codox/Bialowieza.html | 183 +++++++++++++++++--- docs/codox/Errata.html | 2 +- docs/codox/Experience.html | 2 +- docs/codox/HegemonicArgument.html | 2 +- docs/codox/History.html | 2 +- docs/codox/HuxleyKropotkin.html | 2 +- docs/codox/Implementing.html | 2 +- docs/codox/JAccuse.html | 2 +- docs/codox/KnacqTools.html | 2 +- docs/codox/Manifesto.html | 2 +- docs/codox/OnHylasAndPhilonus.html | 2 +- docs/codox/Scratchpad.html | 23 +++ docs/codox/TheProblem.html | 2 +- docs/codox/index.html | 2 +- docs/codox/intro.html | 2 +- docs/codox/wildwood.advocate.html | 4 +- docs/codox/wildwood.bialowieza.html | 4 +- docs/codox/wildwood.caesar.html | 4 +- docs/codox/wildwood.dengine.engine.html | 2 +- docs/codox/wildwood.dengine.node.html | 2 +- docs/codox/wildwood.knowledge-accessor.html | 4 +- docs/codox/wildwood.logic.html | 3 + docs/codox/wildwood.mongo-ka.html | 10 +- docs/codox/wildwood.schema.html | 10 +- 30 files changed, 268 insertions(+), 71 deletions(-) create mode 100644 docs/codox/Scratchpad.html create mode 100644 docs/codox/wildwood.logic.html diff --git a/doc/Bialowieza.md b/doc/Bialowieza.md index 9af10ce..afd987f 100644 --- a/doc/Bialowieza.md +++ b/doc/Bialowieza.md @@ -83,9 +83,8 @@ There may be many other privileged keys, such as * `:location` - where did it happen? value might be something from which proximity may be derived; * `:time` - when did it happen? This needs to be a value with a canonical order, such as a number; -* `:truth` - is it true? if present and value `false`, negates the proposition; -* `:confidence` - how sure am I? A value, perhaps, in the range -1 to 1, although conventionally if less than 1 we probably set the `:truth` value to false; -* `:data` - an argument structure...! +* `:confidence` - 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; +* `:data` - a collection of (zero or more) argument structures; * `:authority` - id of agent from whom, or rule from which, I know this; and so on. The exact set of privileged keys is probably actually a matter for @@ -100,7 +99,7 @@ closely onto the [Toulmin schema](Analysis.html#the-toulmin-schema). Thus we can * that the proposition itself is a `claim` in the sense of the **C** term; * that `:data` above is precisely `data` in the sense of the **D** term in Toulmin's schema, but may (is likely to) also provide a `warrant` in the sense of the **W** term; -* that `:truth` and `:confidence` are both `qualifiers` of the claim in the sense of the **Q** term; +* that `:confidence` is a `qualifier` of the claim in the sense of the **Q** term; * that `:authority` is a form of `backing` in the sense of the **B** term. So what, then, is an 'argument structure', as described above? It seems to me @@ -109,8 +108,6 @@ of the `:data` key is not minimised. Recall that in the chapter on Arboretum I observed that [the working of the DTree decision algorithm caused precisely those nodes to be collected whose fragments which provided the most relevant explanation](Arboretum.html#relevance-filtering) 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 Toulmin's **D** - out `:data` term. The DTree itself then becomes the **W** - the `:warrant`; and the author of the DTree becomes the `:authority`. -{ **TODO**: investigate how this notion of a proposition - and a Toulmin structure - relates to situation semantics; especially, consider how locating a proposition in time and space captures the notion of a situation. } - ### The located proposition Aristotle's propositions are essentially two position: they describe a relationship between two entities, a subject and an object. But they're not located. @@ -142,9 +139,9 @@ The size of an event is, of course, a slightly slippery notion. The inference th ### Are located two-position propositions sufficient? -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 this: +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 don't - at first glance - seem to fit naturally into this schema. -Suppose Calpurnia told Drusilla that Brutus killed Caesar in the Forum on the Ides of March. For simplicity, let's call +For example, suppose Calpurnia told Drusilla that Brutus killed Caesar in the Forum on the Ides of March. For simplicity, let's call * Brutus killed Caesar in the Forum on the Ides of March. @@ -156,9 +153,33 @@ So we have a notional event E1 such that * P2 := 'Calpurnia uttered P1 at E1.' * P3 := 'Drusilla heard P1 at E1.' -And the warrant for the belief that P1 is the conjunction of P2 and P3. +And the warrant for Drusilla's belief that P1 is the conjunction of P2 and P3. -Writing it down like that, it kind of works, but I'm not yet wholly persuaded. It feels clumsy. +So we can represent this as + +```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} +``` + +Taking it further to look at the sorts of things required by [The Great Game](https://simon-brooke.github.io/the-great-game/codox/), there are two classes of things which need frequently to be handled. one is the passing of news, in [gossip](https://blog.journeyman.cc/2008/04/the-spread-of-knowledge-in-large-game.html); and the other is recording trading information, in [markets](https://simon-brooke.github.io/the-great-game/codox/the-great-game.merchants.markets.html). + +The **gossip** case is covered by the *Calpurnia told Drusilla* 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 `consignment` a first class entity, with properties of at least `commodity` and `quantity`. + +So, again, we have a notional event E2 at which a commodity C1 was traded, where E2 has (for example) a location of `Forfar` and a timestamp of 202005181600; while C1 has a commodity of `Fish` and a quantity of `50`. Let's say the price was 4 bronze coins per kilo. + +This transaction could be represented by the propositions: + +* P4 := 'Donald sold 50 Kg of Fish in Forfar at 202005181600' +* P5 := 'Fiona bought 50 Kg of Fish in Forfar at 202005181600' +* P6 := 'Fish sold for 4 bronze/Kg in Forfar at 202005181600' + +So it seems to me that it's possible to represent the things I know I need to represent, using only located two-position propositions. 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. @@ -204,7 +225,7 @@ I'd argue that these are clearly very similar. My schema does not specify that "at I1: ... understands, a, c; no", but there's a reason for that. -### Learning, consistency and confidence +### Learning, consistency, trust and confidence Let us suppose that Drusilla already knows the proposition that @@ -214,7 +235,7 @@ Calpurnia now tells her that * Brutus killed Caesar in the Forum on the Ides of March. -The two accounts are compatible; this compatibility migh be represented, if you choose, by two further propositions: +The two accounts are compatible; this compatibility might be represented, if you choose, by two further propositions: * P4 The Forum is within Rome. * P5 The Ides of March is within March. @@ -227,7 +248,14 @@ When she learns from Calpurnia that Brutus killed Caesar in the Forum on the Ide 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 can't all be right. -For the time being, I'm going to leave the issue of how confidence is derived and adjusted as an implementation detail; I don't - yet, at any rate - have an account of how this should work that I can defend. However, there's one further significant point to make about propositions before we move on. +For the time being, I'm going to leave the issue of how confidence is derived and adjusted as an implementation detail; I don't - yet, at any rate - have an account of how this should work that I can defend. There are two main avenues to explore, + +1. [The Kolmogorov axioms](https://en.wikipedia.org/wiki/Probability_axioms); +2. [Cox's theorem](https://en.wikipedia.org/wiki/Cox%27s_theorem) + +However, I haven't yet worked out what the implications of either of these are for my schema. + +However, there's one further significant point to make about propositions before we move on. ### On the subtext of propositions diff --git a/docs/codox/AgainstTruth.html b/docs/codox/AgainstTruth.html index 1c521d8..73e25b3 100644 --- a/docs/codox/AgainstTruth.html +++ b/docs/codox/AgainstTruth.html @@ -1,6 +1,6 @@ -Against Truth

Against Truth

+Against Truth

Against Truth

Simon Brooke

“Hey, what IS truth, man?” Beeblebrox, Z, quoted in [Adams, 1978]

diff --git a/docs/codox/Analysis.html b/docs/codox/Analysis.html index 192846f..d747e8c 100644 --- a/docs/codox/Analysis.html +++ b/docs/codox/Analysis.html @@ -1,6 +1,6 @@ -Analysis

Analysis

+Analysis

Analysis

Accounts from the Philosophy of Science

(Towards another chapter. What l want to do is: ,

    diff --git a/docs/codox/Arboretum.html b/docs/codox/Arboretum.html index 439b2c5..7a1d92a 100644 --- a/docs/codox/Arboretum.html +++ b/docs/codox/Arboretum.html @@ -1,6 +1,6 @@ -Arboretum

    Arboretum

    +Arboretum

    Arboretum

    This chapter describes briefly an inference mechanism, implemented in the Arboretum prototype; this is included here to show the results achieved in the author’s early work on explanation, on which it is hoped to build in the current work. A fuller description of this mechanism, and of the Arboretum prototype, will be found in [Mott & Brooke 87], from which this chapter is largely drawn.

    Arboretum was written in InterLisp-D[4] using LOOPS [5] object oriented facilities, to allow people to manipulate DTree structures through graphical representations: to build arbitrarily large knowledge bases, to use these to provide answers to questions about objects in domains admitting incomplete information - and to provide natural language explanations of these answers. The inference process by which answers are produced is shown as an animated graph. The user can ask the system how the value of any particular feature was arrived at, and what that value was. . It was developed for the Alvey DHSS Large Demonstrator Project, and sought to meet early perceptions of the needs of DHSS Adjudication Officers. Adjudication Officers decide claimants’ eligibility over a wide range of welfare benefits. There is a very large volume of work to be done, so they work under considerable pressure.

    The Adjudication process within the DHSS has its own levels of authority culminating in the

    diff --git a/docs/codox/Arden.html b/docs/codox/Arden.html index 5bb81df..2769048 100644 --- a/docs/codox/Arden.html +++ b/docs/codox/Arden.html @@ -1,6 +1,6 @@ -Arden

    Arden

    +Arden

    Arden

    Why Arden?

    It was something of tradition in the InterLisp-D community to give successive versions of a project codenames with successive alphabetical initials. So the first version would have a name starting ‘A’, the second ‘B’, and so on. The first prototype for Wildwood was called ‘Arden’, because it starts with an ‘A’, and because it is a fantastical dream-like forest depicted in Shakespeare’s play ‘As You Like It’, which if I recall correctly was performed as a promenade performance by the Duke’s Theatre in Lancaster in that year. While Arboretum - that carefully tended garden of trees - had been, as I’ve said, largely Peter’s in concept, Wildwood would be mine.

    Background

    diff --git a/docs/codox/BatesonKammerer.html b/docs/codox/BatesonKammerer.html index 59a65ce..41f84c6 100644 --- a/docs/codox/BatesonKammerer.html +++ b/docs/codox/BatesonKammerer.html @@ -1,4 +1,4 @@ -The Bateson / Kammerer debate

    The Bateson / Kammerer debate

    +The Bateson / Kammerer debate

    The Bateson / Kammerer debate

    { TODO: analyse the style and motivations of the Bateson / Kammerer debate, drawing out the use of polemic and rhetoric to achieve hegemony }

    \ No newline at end of file diff --git a/docs/codox/Bialowieza.html b/docs/codox/Bialowieza.html index cccf5ea..458e289 100644 --- a/docs/codox/Bialowieza.html +++ b/docs/codox/Bialowieza.html @@ -1,20 +1,46 @@ -Bialowieza

    Bialowieza

    +Bialowieza

    Bialowieza

    { this chapter is in active development; quite a lot of the technical detail in this chapter at present will probably end up in Implementing, while additional high level and conceptual design, as it develops, will be here. }

    Why Bialowieza?

    Bialowieza is the second iteration of the Wildwood engine, and this following convention its name should start with ‘B’. Białowieża is Europe’s last great wild wood, and it is currently under threat.

    Motivation

    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.

    -

    Major components of Bialowieza

    -

    Knowledge Accessors

    -

    The wildwood.knowledge-accessor/Accessor protocol defines a bidirectional transducer which can fetch data from whatever storage representation the calling application uses into the representation defined by wildwood.schema.

    -

    Advocates

    -

    The wildwood.advocate/Advocate protocol describes an agent which can take part in decision processes.

    -

    The engine itself

    -

    The engine is implemented by the namespace wildwood.bialowieza.

    -

    Inference processes

    -

    Advocates are entitled to use whatever inference processes they like, but they have access to wildwood.dengine, which is an implementation of the DTree engine described in the chapter on Arboretum adapted to propositions as defined in wildwood.schema.

    +

    Knowledge representation

    +

    It’s 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.

    +

    On propositional and predicate calculi

    +

    But firstly I should be clear that Bialowieza does not represent a propositional calculus. On the contrary, Arboretum, which dealt with features, is a propositional calculus. How so?

    +

    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.

    +

    Thus Arboretum can reason about whether Calpurnia is a widow. It can have a rule (and indeed, did have a rule) which says

    +
    if
    +  is a woman, and
    +  has been married, and
    +  husband is dead
    +then
    +  is a widow
    +unless
    +  was divorced, or
    +  has remarried.
    +
    +

    The features are given as predicates, because all must apply to the same subject; expanding them to propositions gives us, in this case

    +
    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.
    +
    +

    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

    +
    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
    +

    Propositions

    { TODO read, and follow references from, https://plato.stanford.edu/entries/propositions/ }

    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.

    @@ -36,9 +62,8 @@
    • :location - where did it happen? value might be something from which proximity may be derived;
    • :time - when did it happen? This needs to be a value with a canonical order, such as a number;
    • -
    • :truth - is it true? if present and value false, negates the proposition;
    • -
    • :confidence - how sure am I? A value, perhaps, in the range -1 to 1, although conventionally if less than 1 we probably set the :truth value to false;
    • -
    • :data - an argument structure…!
    • +
    • :confidence - 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;
    • +
    • :data - a collection of (zero or more) argument structures;
    • :authority - id of agent from whom, or rule from which, I know this;

    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 don’t broadly share the same set of privileged keys then it won’t work very well.

    @@ -47,12 +72,11 @@
    • that the proposition itself is a claim in the sense of the C term;
    • that :data above is precisely data in the sense of the D term in Toulmin’s schema, but may (is likely to) also provide a warrant in the sense of the W term;
    • -
    • that :truth and :confidence are both qualifiers of the claim in the sense of the Q term;
    • +
    • that :confidence is a qualifier of the claim in the sense of the Q term;
    • that :authority is a form of backing in the sense of the B term.

    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 :data key is not minimised.

    Recall that in the chapter on Arboretum I observed that the working of the DTree decision algorithm caused precisely those nodes to be collected whose fragments which provided the most relevant explanation 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 Toulmin’s D - out :data term. The DTree itself then becomes the W - the :warrant; and the author of the DTree becomes the :authority.

    -

    { TODO: investigate how this notion of a proposition - and a Toulmin structure - relates to situation semantics; especially, consider how locating a proposition in time and space captures the notion of a situation. }

    The located proposition

    Aristotle’s propositions are essentially two position: they describe a relationship between two entities, a subject and an object. But they’re not located.

    Thus:

    @@ -78,8 +102,8 @@

    then provided the atomicity of our notions of time and space is sufficiently fine, we’re 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.

    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 Dagger1 with Rifle1 then the spatial extent of the event can be considerable expanded; and if it’s LandMine1, then the temporal aspect similarly so.

    Are located two-position propositions sufficient?

    -

    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 this:

    -

    Suppose Calpurnia told Drusilla that Brutus killed Caesar in the Forum on the Ides of March. For simplicity, let’s call

    +

    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 don’t - at first glance - seem to fit naturally into this schema.

    +

    For example, suppose Calpurnia told Drusilla that Brutus killed Caesar in the Forum on the Ides of March. For simplicity, let’s call

    • Brutus killed Caesar in the Forum on the Ides of March.
    @@ -90,8 +114,26 @@
  1. P2 := ‘Calpurnia uttered P1 at E1.’
  2. P3 := ‘Drusilla heard P1 at E1.’
  3. -

    And the warrant for the belief that P1 is the conjunction of P2 and P3.

    -

    Writing it down like that, it kind of works, but I’m not yet wholly persuaded. It feels clumsy.

    +

    And the warrant for Drusilla’s belief that P1 is the conjunction of P2 and P3.

    +

    So we can represent this as

    +
        {: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}
    +
    +

    Taking it further to look at the sorts of things required by The Great Game, there are two classes of things which need frequently to be handled. one is the passing of news, in gossip; and the other is recording trading information, in markets.

    +

    The gossip case is covered by the Calpurnia told Drusilla 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 consignment a first class entity, with properties of at least commodity and quantity.

    +

    So, again, we have a notional event E2 at which a commodity C1 was traded, where E2 has (for example) a location of Forfar and a timestamp of 202005181600; while C1 has a commodity of Fish and a quantity of 50. Let’s say the price was 4 bronze coins per kilo.

    +

    This transaction could be represented by the propositions:

    +
      +
    • P4 := ‘Donald sold 50 Kg of Fish in Forfar at 202005181600’
    • +
    • P5 := ‘Fiona bought 50 Kg of Fish in Forfar at 202005181600’
    • +
    • P6 := ‘Fish sold for 4 bronze/Kg in Forfar at 202005181600’
    • +
    +

    So it seems to me that it’s possible to represent the things I know I need to represent, using only located two-position propositions.

    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.

    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.

    The event is (like) a situation

    @@ -128,7 +170,7 @@

    I’d argue that these are clearly very similar.

    My schema does not specify that “at I1: … understands, a, c; no”, but there’s a reason for that.

    -

    Learning, consistency and confidence

    +

    Learning, consistency, trust and confidence

    Let us suppose that Drusilla already knows the proposition that

    anthony-kb

    Mark Antony knows that Brutus is honourable, and that Caesar is buried.

    april

    The month of April, 44BC, as a range.

    brutus-kb

    Brutus will admit that he and Cassius were in the forum in the Ides of March

    cassius-kb

    Cassius and Longus each bear witness that the other killed Caesar in the Forum on the Ides of March.

    drusila-kb

    Drusila has heard that Brutus killed Caesar in the forum. She keys it on all three, for efficiency of retrieval.

    eighteenth-march

    18th March, 44BC

    faldo-db

    Falco believes that Caesar has been killed, but doesn’t know by whom or when.

    gaius-db

    Gaius has heard that Brutus killed Caesar, but believes it happened in April.

    ides-of-march

    16th March, 44BC

    longus-kb

    Cassius and Longus each bear witness that the other killed Caesar in the Forum on the Ides of March.

    march

    The month of March, 44BC, as a range.

    \ No newline at end of file +

    Note that ALL of this is too complex for the simple DTree logic of the Arboretum / KnacqTools generation. They could not unpack propositions as I’m proposing here.

    all-knowledge

    TODO: write docs

    anthony-kb

    Mark Antony knows that Brutus is honourable, and that Caesar is buried.

    april

    The month of April, 44BC, as a range.

    brutus-kb

    Brutus will admit that he and Cassius were in the forum in the Ides of March

    cassius-kb

    Cassius and Longus each bear witness that the other killed Caesar in the Forum on the Ides of March.

    drusilla-kb

    Drusilla has heard that Brutus killed Caesar in the forum.

    eighteenth-march

    18th March, 44BC

    falco-kb

    Falco believes that Caesar has been killed, but doesn’t know by whom or when.

    gaius-kb

    Gaius has heard that Brutus killed Caesar, but believes it happened in April.

    ides-of-march

    16th March, 44BC

    longus-kb

    Cassius and Longus each bear witness that the other killed Caesar in the Forum on the Ides of March.

    march

    The month of March, 44BC, as a range.

    \ No newline at end of file diff --git a/docs/codox/wildwood.dengine.engine.html b/docs/codox/wildwood.dengine.engine.html index b7a6e36..662fa97 100644 --- a/docs/codox/wildwood.dengine.engine.html +++ b/docs/codox/wildwood.dengine.engine.html @@ -1,3 +1,3 @@ -wildwood.dengine.engine documentation

    wildwood.dengine.engine

    An implementation of the DTree engine adapted to wildwood.schema propositions.

    decide

    (decide proposition node accessor)

    Decide the truth value of this proposition, using the dtree rooted at this node and knowledge provided by this accessor.

    \ No newline at end of file +wildwood.dengine.engine documentation

    wildwood.dengine.engine

    An implementation of the DTree engine adapted to wildwood.schema propositions.

    decide

    (decide proposition node accessor)

    Decide the truth value of this proposition, using the dtree rooted at this node and knowledge provided by this accessor.

    \ No newline at end of file diff --git a/docs/codox/wildwood.dengine.node.html b/docs/codox/wildwood.dengine.node.html index 0d44a39..228def8 100644 --- a/docs/codox/wildwood.dengine.node.html +++ b/docs/codox/wildwood.dengine.node.html @@ -1,3 +1,3 @@ -wildwood.dengine.node documentation

    wildwood.dengine.node

    A dtree node.

    colour

    (colour node)

    If this node is a valid dtree node, return its colour.

    node?

    (node? o)

    Return true if this o is recognisable as a dtree node, else false.

    \ No newline at end of file +wildwood.dengine.node documentation

    wildwood.dengine.node

    A dtree node.

    colour

    (colour node)

    If this node is a valid dtree node, return its colour.

    node?

    (node? o)

    Return true if this o is recognisable as a dtree node, else false.

    \ No newline at end of file diff --git a/docs/codox/wildwood.knowledge-accessor.html b/docs/codox/wildwood.knowledge-accessor.html index bb77d42..afa53c8 100644 --- a/docs/codox/wildwood.knowledge-accessor.html +++ b/docs/codox/wildwood.knowledge-accessor.html @@ -1,6 +1,6 @@ -wildwood.knowledge-accessor documentation

    wildwood.knowledge-accessor

    The key point of building Bialowieza as a library rather than a complete application is that it should be possible to hook it up to multiple sources of knowledge. Thus we must design a protocol through which knowledge can be accessed, and a schema in which it will be returned. Note that the accessor must be able to add knowledge to the knowledge base, as well as retrieve it.

    Accessor

    protocol

    members

    fetch

    (fetch self id)

    Fetch all the knowledge I have about the object identified by this id value, as a map whose :id key has this id value.

    +wildwood.knowledge-accessor documentation

    wildwood.knowledge-accessor

    The key point of building Bialowieza as a library rather than a complete application is that it should be possible to hook it up to multiple sources of knowledge. Thus we must design a protocol through which knowledge can be accessed, and a schema in which it will be returned. Note that the accessor must be able to add knowledge to the knowledge base, as well as retrieve it.

    Accessor

    protocol

    members

    fetch

    (fetch self id)

    Fetch all the knowledge I have about the object identified by this id value, as a map whose :id key has this id value.

    NOTE THAT: I now think knowledge should only be managed at the Wildwood level as sets of propositions, so the idea of bringing back some sort of object representation here is probably wrong.

    match

    (match self proposition)

    Return all the propositions I know which match this proposition. The intended use case here is that you will either supply a fully specified proposition to verify that that proposition is true, or else supply a partially specified proposition to query.

    e.g. passing the proposition

    {:verb :kill :object :caesar}
    @@ -9,4 +9,4 @@
     
    [{:verb :kill :subject :brutus :object :caesar}
      {:verb :kill :subject :cassius :object :caesar}
      {:verb :kill :subject :longus :object :caesar}]
    -

    store

    (store self proposition)

    Add this proposition to the knowledge I hold.

    \ No newline at end of file +

    store

    (store self proposition)

    Add this proposition to the knowledge I hold.

    \ No newline at end of file diff --git a/docs/codox/wildwood.logic.html b/docs/codox/wildwood.logic.html new file mode 100644 index 0000000..745563c --- /dev/null +++ b/docs/codox/wildwood.logic.html @@ -0,0 +1,3 @@ + +wildwood.logic documentation

    wildwood.logic

    Highly experimental work towards basic logic operators on Bialowieza-style proposition structures

    fetch

    (fetch id propositions)

    Return those propositions from among these propositions where some key matches this id.

    match

    (match pattern candidates)

    Return those of these candidates matched by this pattern. Both pattern and each candidate in candidates are expected to be maps. AT THIS STAGE, a match is found if for every key in pattern, the value of that key in the candidate is the same as the value in pattern. Note that in future the values of the :time, :location, :confidence and :data keys may be handled specially.

    matches?

    (matches? pattern candidate)

    True if this candidate matches this pattern. AT THIS STAGE, a match is found if for every key in pattern, the value of that key in the candidate is the same as the value in pattern. Note that in future the values of the :time, :location, :confidence and :data keys may be handled specially.

    \ No newline at end of file diff --git a/docs/codox/wildwood.mongo-ka.html b/docs/codox/wildwood.mongo-ka.html index ba7509b..a4f8d2d 100644 --- a/docs/codox/wildwood.mongo-ka.html +++ b/docs/codox/wildwood.mongo-ka.html @@ -1,4 +1,10 @@ -wildwood.mongo-ka documentation

    wildwood.mongo-ka

    A knowledge accessor fetching from and storing to Mongo DB.

    -

    Hierarchical databases seem a very natural fit for how we’re storing knowledge. Mongo DB seems a particularly natural fit since its internal representation is JSON, which can be transformed to EDN extremely naturally.

    \ No newline at end of file +wildwood.mongo-ka documentation

    wildwood.mongo-ka

    A knowledge accessor fetching from and storing to Mongo DB.

    +

    Hierarchical databases seem a very natural fit for how we’re storing knowledge. Mongo DB seems a particularly natural fit since its internal representation is JSON, which can be transformed to EDN extremely naturally.

    +

    Other candidate hierarchical database implementations/interfaces which might be experimented with include:

    +
      +
    1. Titanium
    2. +
    3. Cassandra
    4. +
    +

    (and many others).

    \ No newline at end of file diff --git a/docs/codox/wildwood.schema.html b/docs/codox/wildwood.schema.html index 5bf73c6..8670076 100644 --- a/docs/codox/wildwood.schema.html +++ b/docs/codox/wildwood.schema.html @@ -1,7 +1,7 @@ -wildwood.schema documentation

    wildwood.schema

    The knowledge representation. This probably ends up looking a bit like a Toulmin schema, where claims are represented as propositions. There also need to be rules or predicates, things which can test whether a given proposition has a given value. There may be other stuff in here.

    -

    Internal representation of most of this will be as Clojure maps.

    argument-keys

    Every argument is a proposition, which additionally has these keys.

    argument?

    (argument? o)

    True if o qualifies as an argument structure.

    -

    An argument structure is a (potentially rich) proposition which, in addition, should have values for :confidence and :authority. A value for :data may, and probably will, also be present but is not required. The value of :confidence must be a number in the range -1 to 1.

    consensual-keys

    Every proposition which has these keys, in a given decision process, must have the same semantics and types for their values. The exact representations used for the values of these keys does not matter, it is consensual between all participating advocates in a decision process.

    minimise

    (minimise o)

    Expecting that o is a (potentially rich) proposition, return a map identical to o save that for each value v of key k in o, if v is a map and k is not a member of argument-keys, then the returned map shall substitute the value of (:id v).

    -

    see also wildwood.knowledge-access/maximise.

    preserved-keys

    Keys whose values should not be minimised during proposition minimisation

    proposition?

    (proposition? o)(proposition? o minimised)

    True if o qualifies as a proposition. A proposition is probably a map with some privileged keys, and may look something like a minimised the-great-game.gossip.news-items item.

    -

    If minimised is passed and is true, then the proposition must be minimised - that is to say, the values of keys in a proposition map may not themselves be keys. Where the value of a key represents an object in the world, that value must be simply the id of the object, not a richer representation.

    required-keys

    Every proposition is expected to have values for these keys.

    rule?

    (rule? o)

    True if o qualifies as a rule. A rule is a structure which comprises * an id and * a function of two arguments, a proposition and a knowledge accessor, and which should (if this can simply be checked) return an argument structure.

    truth

    (truth p)

    If p is a proposition, return whether the value asserted by that proposition is true. If the :truth key is missing, true is assumed.

    \ No newline at end of file +wildwood.schema documentation

    wildwood.schema

    The knowledge representation. This probably ends up looking a bit like a Toulmin schema, where claims are represented as propositions. There also need to be rules or predicates, things which can test whether a given proposition has a given value. There may be other stuff in here.

    +

    Internal representation of most of this will be as Clojure maps.

    argument-keys

    Every argument is a proposition, which additionally has these keys.

    argument?

    (argument? o)

    True if o qualifies as an argument structure.

    +

    An argument structure is a (potentially rich) proposition which, in addition, should have values for :confidence and :authority. A value for :data may, and probably will, also be present but is not required. The value of :confidence must be a number in the range -1 to 1.

    consensual-keys

    Every proposition which has these keys, in a given decision process, must have the same semantics and types for their values. The exact representations used for the values of these keys does not matter, it is consensual between all participating advocates in a decision process.

    minimise

    (minimise o)

    Expecting that o is a (potentially rich) proposition, return a map identical to o save that for each value v of key k in o, if v is a map and k is not a member of argument-keys, then the returned map shall substitute the value of (:id v).

    +

    see also wildwood.knowledge-access/maximise.

    preserved-keys

    Keys whose values should not be minimised during proposition minimisation

    proposition?

    (proposition? o)(proposition? o minimised)

    True if o qualifies as a proposition. A proposition is probably a map with some privileged keys, and may look something like a minimised the-great-game.gossip.news-items item.

    +

    If minimised is passed and is true, then the proposition must be minimised - that is to say, the values of keys in a proposition map may not themselves be keys. Where the value of a key represents an object in the world, that value must be simply the id of the object, not a richer representation.

    required-keys

    Every proposition is expected to have values for these keys.

    rule?

    (rule? o)

    True if o qualifies as a rule. A rule is a structure which comprises * an id and * a function of two arguments, a proposition and a knowledge accessor, and which should (if this can simply be checked) return an argument structure.

    truth

    (truth p)

    If p is a proposition, return whether the value asserted by that proposition is true. If the :truth key is missing, true is assumed.

    \ No newline at end of file