Re: [opencog-dev] PartitionLink, biological pathways, human bodies, etc.

2017-08-09 Thread Linas Vepstas
Quick comment, I did not review the Doc.

On Tue, Aug 8, 2017 at 3:11 PM, Michael Duncan  wrote:

> the pathway links are predicates defined here
> .
> the pathways are
>
> DefineLink
>

I strongly urge that EquivalenceLink be used here, and not DefineLink.
DefineLink is meant for something else.


>  DefinedPredicateNode "GO pathway term name"
>
Isn't an ordinary Predicatenode enough??


>  AndLink
>

Again: the anlink is completely unordered, so in this case, would be
exactly the same thing as a SetLink: its just a collection of "stuff" (a
collection of protein relationships, it seems)  Because its not ordered,
its not a "path" per se, its just a set.

You keep saying that you use AndLink because its "true" when everything is
in it, but that is also the case for SetLink.  When I say "x and y are in
set A", that always true that x is in A and Y is in A, and you don't need
an AndLink to say this.  The SetLink is enough. The SetLink is effectively
an AndLink, from the truthiness of it.


>   Predicate "protein relationship 1"
> ProteinNode "x"
> ProteinNode "y"
>   Predicate "protein relationship 2"
> ProteinNode "y"
> ProteinNode "z"
>   
>


I'm proposing this:

MemberLink
  DefinedPredicateNode "GO pathway term name"
  Predicate "protein relationship 1"

> ProteinNode "x"
> ProteinNode "y"
>



MemberLink
  DefinedPredicateNode "GO pathway term name"

>   Predicate "protein relationship 2"
> ProteinNode "y"
> ProteinNode "z"
>   
>


--linas

>
>
>
> On Tuesday, August 8, 2017 at 11:00:54 AM UTC-7, Michael Duncan wrote:
>>
>> the AndLink semantics are for the simplified pathway representation for
>> the current demo/toy bio-atomspace which only has binary links between
>> proteins and abstracts out small molecules. so the pathway for the krebs
>> cycle for instance is just directed links between the enzymes:  ... -> 
>> isocitrate
>> dehydrogenase -> alpha-ketoglutarate dehydrogenase -> Succinyl-CoA
>> synthetase -> ...
>>
>> linus semantics look good for when the complete biopax pathway
>> representation is translated into atomese.
>>
>> even then my intuition is that the AndLink semantics should be useful in
>> pln inference about say the likelihood of a pathway being involved in
>> distinguishing a case-control phenotype based on moses models of relative
>> gene expression levels.
>>
>> On Monday, August 7, 2017 at 11:31:59 AM UTC-7, Ben Goertzel wrote:
>>>
>>> a pathway in biology is actually a network with directed arrows and
>>> generally lots of loops there are even some hyperlinks e.g. for
>>> catalysis... a pathway is a subhypergraph...
>>>
>>>
>>>
>>> On Aug 7, 2017 11:25, "Linas Vepstas"  wrote:
>>>
 no clue why its appropriate for biological pathways. Mike is designing
 that, not me.

 Anyway, a "pathway" is an ordered sequence where the ordering matters.
 Neither SetLink, nor AndLink are ordered. So if you actually want to have a
 path, i.e. a sequence of directed arrows, well .. you  need to find a
 representation of  biological pathways as directed arrows. But this is
 familiar ground, for opencog...

 --linas

 On Mon, Aug 7, 2017 at 1:21 PM, Ben Goertzel  wrote:

> OK I get that... but I don't see why it is appropriate for biological
> pathways...
>
> On Tue, Aug 8, 2017 at 2:19 AM, Linas Vepstas 
> wrote:
> > First, lets review SetLink:
> >
> >  SetLink
> > ConceptNode "x"
> > ConceptNode "y"
> > ConceptNode "z"
> >
> >
> >  EquivalenceLink
> > ConceptNode "last three letters of the alphabet"
> > SetLink
> >ConceptNode "x"
> >ConceptNode "y"
> >ConceptNode "z"
> >
> >
> >  MemberLink
> >  ConceptNode "x"
> >  ConceptNode "last three letters of the alphabet"
> >   MemberLink
> >  ConceptNode "y"
> >  ConceptNode "last three letters of the alphabet"
> >   MemberLink
> >  ConceptNode "z"
> >  ConceptNode "last three letters of the alphabet"
> >
> > Again, with TV's:
> >
> >   MemberLink  <1.0>
> >  ConceptNode "z"
> >  ConceptNode "last letters of the alphabet"
> >   MemberLink  <0.9>
> >  ConceptNode "w"
> >  ConceptNode "last letters of the alphabet"
> >   MemberLink  <0.8>
> >  ConceptNode "s"
> >  ConceptNode "last letters of the alphabet"
> >   MemberLink  <0.2>
> >  ConceptNode "m"
> >  ConceptNode "last letters of the alphabet"
> >
> >
> >
> > Sooo .. AndMemberLink would be 

Re: [opencog-dev] PartitionLink, biological pathways, human bodies, etc.

2017-08-09 Thread Linas Vepstas
On Tue, Aug 8, 2017 at 2:37 AM, Nil Geisweiller 
wrote:

>
> However I don't think the more "atomic" representation should replace the
> more "holistic" one, both should be allowed in parallel, right? Would that
> be for backward compatibility at least. Then if it becomes obvious that the
> atomic form is superior we can deprecate the holistic form.
>

I've personally concluded that in many, most cases, using SetLink is a
complete disaster. Again -- look at SQL as an example. You *could* create a
table that places all employees on a single row. The language supports
this. But every textbook written on it will explain why this would be
exactly the wrong way of doing things, and then talk about "normalization"
for the next 6 chapters.

Same deal here: I am saying that, in general, we should be careful, and
apply good-practices to knowledge-base design. Read the books on knowledge
bases, study the concept of data normalization, data orthogonality, and
avoid making those kind of mistakes, when designing structures for opencog.

I didn't notice it at first, but now I do: relex2logic, sureal and
microplanning abuse SetLink. Not sure what the rule-engine is doing, but I
suspect its abusing to too. The people who designed SQL were smart, it took
them a decade+ to figure this shit out, and we should not abandon their
good advice for random, willy-nilly reasons.  We should avoid repeating
old, well-known mistakes.


> EquivalenceScope (stv 1 1)
>>
>>P
>>Q
>>
>> is merely sugar syntax for
>>
>> Equivalence (stv 1 1)
>>Lambda  P
>>Lambda  Q
>>
>> This sugar syntax is mostly useful for humans, because  is
>> not duplicated in the AtomSpace anyway.
>>
>>
>> Well, but that's not true!  (Scope X   P(X)==Q(X)) is not the same as
>> (Scope X  P(X)) == (Scope X  Q(X)) because the latter can be
>> alpha-rewritten as (Scope X  P(X)) == (Scope Y  Q(Y)) which is something
>> completely different!
>>
>
> Agreed, they're not the same in the logic that you describe, but in PLN
> they are, because the former
>
> (Scope X   P(X)==Q(X))
>
> is just *syntactic sugar* for the latter,
>
> (Scope X  P(X)) == (Scope X  Q(X))
>

You keep saying that, but I don't see how it can possibly be true. It is
always, 100% legal to rewrite Scope X  P(X)) == (Scope X  Q(X)) as  (Scope
X  P(X)) == (Scope Y  Q(Y)) and, in classical logic, they have completely
different meanings.

let P(x) == "x can fly"   and Q(x) == "x has two legs"

then  (Scope X   P(X)==Q(X))  means "x has two legs and can fly"

which might or might not be true, depending on the value of x. while

(Scope X  P(X)) == (Scope y  Q(y)) means "the statement that  "x can fly"
is identical to the statement that "y has two legs"

which is clearly always false. (and cannot depend on the values for x,y)
Now, there might be models which that statement is true: for example, on
planet nimrod, all flying things have two legs, and all two-legged things
fly.  Thus, planet nimrod is a "model" where that statement is true.
However, the "theory" that (Scope X  P(X)) == (Scope y  Q(y)) is still
false on planet nimrod, even though the model is true. I think maybe you
are failing to distinguish theories and models? they are not the same
thing


> which is what really matters in a probabilistic interpretation.
>

OK, so perhaps they are equal in PLN, its just that they are not equal in
general.

The formal way of saying this is that two models of a theory might be
equal, but this does not mean the two theories are equal.  Its the
difference between equality and equivalence: two things can be
"accidentally" equal and not be equivalent.

Here, PLN would be one possible model, classical logic is another possible
model, Bayesian probability a third possible model.  The truth value of a
statement can be different in each of these different  models, and is not,
in general, the same as the truth value of a statement in a theory.

It is the case that when something is true in a theory, then it is also
true in every model of that theory.  So for example,

let P(x) == "x can fly"   and Q(x) == "x has property of flight"

Then (Scope X  P(X)) == (Scope y  Q(y)) is true as a theory, always, and so
it had also better always be true in every model -- i.e. it must be true in
PLN, classical logic and Bayesian probability.

--linas


>
> I recall that the probabilistic interpretation of
>
> Equivalence (stv 1 1) A B
>
> is
>
> P(A inter B|A union B)
>
> It is explained here but unfortunately the wiki can't render it
>
> http://wiki.opencog.org/w/ExtensionalSimilarityLink
>
> Nil
>
> ---
>> But whatever. All I am saying is that we should allow the following form:
>>
>> EquivalenceScope (stv 1 1)
>>
>>P
>>Q
>>
>>   That's all, nothing more.
>>
>> --linas
>>
>>
>> Nil
>>
>>
>> --linas
>>
>>
>>  Nil
>>
>>
>>  An alternate way of thinking about partitions is as
>> "coloring".

Re: [opencog-dev] PartitionLink, biological pathways, human bodies, etc.

2017-08-08 Thread Michael Duncan
the AndLink semantics are for the simplified pathway representation for the 
current demo/toy bio-atomspace which only has binary links between proteins 
and abstracts out small molecules. so the pathway for the krebs cycle for 
instance is just directed links between the enzymes:  ... -> isocitrate 
dehydrogenase -> alpha-ketoglutarate dehydrogenase -> Succinyl-CoA 
synthetase -> ...

linus semantics look good for when the complete biopax pathway 
representation is translated into atomese.

even then my intuition is that the AndLink semantics should be useful in 
pln inference about say the likelihood of a pathway being involved in 
distinguishing a case-control phenotype based on moses models of relative 
gene expression levels.

On Monday, August 7, 2017 at 11:31:59 AM UTC-7, Ben Goertzel wrote:
>
> a pathway in biology is actually a network with directed arrows and 
> generally lots of loops there are even some hyperlinks e.g. for 
> catalysis... a pathway is a subhypergraph...
>
>
>
> On Aug 7, 2017 11:25, "Linas Vepstas"  
> wrote:
>
>> no clue why its appropriate for biological pathways. Mike is designing 
>> that, not me.
>>
>> Anyway, a "pathway" is an ordered sequence where the ordering matters. 
>> Neither SetLink, nor AndLink are ordered. So if you actually want to have a 
>> path, i.e. a sequence of directed arrows, well .. you  need to find a 
>> representation of  biological pathways as directed arrows. But this is 
>> familiar ground, for opencog...
>>
>> --linas
>>
>> On Mon, Aug 7, 2017 at 1:21 PM, Ben Goertzel > > wrote:
>>
>>> OK I get that... but I don't see why it is appropriate for biological
>>> pathways...
>>>
>>> On Tue, Aug 8, 2017 at 2:19 AM, Linas Vepstas >> > wrote:
>>> > First, lets review SetLink:
>>> >
>>> >  SetLink
>>> > ConceptNode "x"
>>> > ConceptNode "y"
>>> > ConceptNode "z"
>>> >
>>> >
>>> >  EquivalenceLink
>>> > ConceptNode "last three letters of the alphabet"
>>> > SetLink
>>> >ConceptNode "x"
>>> >ConceptNode "y"
>>> >ConceptNode "z"
>>> >
>>> >
>>> >  MemberLink
>>> >  ConceptNode "x"
>>> >  ConceptNode "last three letters of the alphabet"
>>> >   MemberLink
>>> >  ConceptNode "y"
>>> >  ConceptNode "last three letters of the alphabet"
>>> >   MemberLink
>>> >  ConceptNode "z"
>>> >  ConceptNode "last three letters of the alphabet"
>>> >
>>> > Again, with TV's:
>>> >
>>> >   MemberLink  <1.0>
>>> >  ConceptNode "z"
>>> >  ConceptNode "last letters of the alphabet"
>>> >   MemberLink  <0.9>
>>> >  ConceptNode "w"
>>> >  ConceptNode "last letters of the alphabet"
>>> >   MemberLink  <0.8>
>>> >  ConceptNode "s"
>>> >  ConceptNode "last letters of the alphabet"
>>> >   MemberLink  <0.2>
>>> >  ConceptNode "m"
>>> >  ConceptNode "last letters of the alphabet"
>>> >
>>> >
>>> >
>>> > Sooo .. AndMemberLink would be just like the above, except that 
>>> whereever
>>> > you see SetLink above, you would have AndLink, and wherever you see
>>> > MmeberLink above, you would have AndMemeberLink.
>>> >
>>> > --linas
>>> >
>>> >
>>> >
>>> >
>>> > On Mon, Aug 7, 2017 at 1:11 PM, Ben Goertzel >> > wrote:
>>> >>
>>> >> I don't understand the proposed semantics of AndMemberLink, could you
>>> >> explain?
>>> >>
>>> >>
>>> >>
>>> >> On Sat, Aug 5, 2017 at 1:07 AM, Michael Duncan >> >
>>> >> wrote:
>>> >> > i actually think an AndLink-like semantics better fits biochemical
>>> >> > pathways
>>> >> > at a computationally tractable level than partitions in that below 
>>> the
>>> >> > level
>>> >> > of a whole organism, where one pathway ends and another begins is
>>> >> > largely
>>> >> > arbitrary.  also,  if one link is missing then the whole thing 
>>> doesn't
>>> >> > work
>>> >> > but the last bit of a dead end might be the start of another path 
>>> that
>>> >> > goes
>>> >> > to the same place, more like words and phrases that can be 
>>> rearranged
>>> >> > and
>>> >> > swapped in different ways to say the same thing.  linus idea of
>>> >> > AndMemberLinks and OrMemeberLinks would get around the size 
>>> limitation
>>> >> > and
>>> >> > also seem like they would be useful for reasoning on moses models.
>>> >> >
>>> >> > On Monday, July 31, 2017 at 5:55:16 PM UTC-4, linas wrote:
>>> >> >>
>>> >> >> Hi Ben, Mike,
>>> >> >>
>>> >> >>
>>> >> >> On Fri, Jul 21, 2017 at 9:41 PM, Ben Goertzel 
>>> >> >> wrote:
>>> >> >>>
>>> >> >>> Some interesting representational issues have come up in the 
>>> context
>>> >> >>> of Atomspace representation of pathways, which appear to have more
>>> >> >>> general implications…
>>> >> >>>
>>> >> >>> It seems the semantics we want for a biological pathway is sort of
>>> >> >>> like “the pathway P is a set of relationships R1, R2, …, R20” in 
>>> kinda
>>> >> >>> the same sense that “the human body is a set of organs: 

Re: [opencog-dev] PartitionLink, biological pathways, human bodies, etc.

2017-08-08 Thread 'Nil Geisweiller' via opencog

On 08/06/2017 11:41 PM, Linas Vepstas wrote:
Search becomes a problem. Say I want to find (using the pattern matcher) 
all sets that contain, as members, A B C. With set notation, I have to 
search for (Set X A B C) where X==(VariableNode "X") for 4-elelemnt 
sets, and then (Set X Y A B C) for 5-element sets, and so on.  To search 
all N-element sets, I can use the GlobeNode G and search for (Set G A B 
C) ... and I believe this works correctly today.  However...


However, there's a problem. Sets are UnorderedLinks, and so performing 
the search for all six-element sets (Set X Y Z A B C) requires searching 
6!=120 permutations. Well, since A B C are fixed, only 6!/3!= 20 
permutations have to be searched. Of the 20, many are duplicates, since 
(Set X Y Z A B C) == (Set Y C X B Z  A)  and so on. The returned results 
will include all possible matchups of X Y Z to the other three members 
-- 3! in all -- so of the 20 permutations, only 3!=6 are actually different.


For the GlobNode, it would be similar, Now consider a set with 20 
elements -- this requires 20! permutations and 20!=2.4e18 which would be 
months or years of CPU time.  Which is absurd.. well, we could stop 
after finding exactly one permutation, because that is all we really 
want... (not sure if the current glob code does this -- probably not. 
Man Hin is reworking the glob code now.).


This is in contrast to the much easier problem of finding all values of 
X for which (Member A X) AND (Member B X) AND (Member C X) which can be 
done easily and quickly, without requiring permutation exploration.


I understand. In the first case, you ask to produce all assignments to 
complete the set(s), which grows exponentially. While in the second case 
you only asks sets containing A, B and C.


But these are 2 different queries.

Anyway, I see your point, I suppose we want to have both representations

Set  A B C

and

Member
  A
  ...
Member
  B
  ...
...

and use which ever one fits best. Converting from one to another should 
be easy using PLN.


Regarding other set-like operators, And, Or, etc, I think I agree with 
your proposal to be able to break them up. So for instance we may turn


And A B C

into

AndMember
  A
  And A B C
AndMember
  B
  And A B C
...

However I don't think the more "atomic" representation should replace 
the more "holistic" one, both should be allowed in parallel, right? 
Would that be for backward compatibility at least. Then if it becomes 
obvious that the atomic form is superior we can deprecate the holistic form.



EquivalenceScope (stv 1 1)
   
   P
   Q

is merely sugar syntax for

Equivalence (stv 1 1)
   Lambda  P
   Lambda  Q

This sugar syntax is mostly useful for humans, because  is
not duplicated in the AtomSpace anyway.


Well, but that's not true!  (Scope X   P(X)==Q(X)) is not the same as 
(Scope X  P(X)) == (Scope X  Q(X)) because the latter can be 
alpha-rewritten as (Scope X  P(X)) == (Scope Y  Q(Y)) which is something 
completely different!


Agreed, they're not the same in the logic that you describe, but in PLN 
they are, because the former


(Scope X   P(X)==Q(X))

is just *syntactic sugar* for the latter,

(Scope X  P(X)) == (Scope X  Q(X))

which is what really matters in a probabilistic interpretation.

I recall that the probabilistic interpretation of

Equivalence (stv 1 1) A B

is

P(A inter B|A union B)

It is explained here but unfortunately the wiki can't render it

http://wiki.opencog.org/w/ExtensionalSimilarityLink

Nil


---
But whatever. All I am saying is that we should allow the following form:

EquivalenceScope (stv 1 1)
   
   P
   Q

  That's all, nothing more.

--linas


Nil


--linas


 Nil


 An alternate way of thinking about partitions is as
"coloring".
 Pick a set, pick N colors, and then insist that every
member of
 the set must be colored with one of the N colors.  Then
coloring
 is a lot like partitioning. e.g.

 ColorLink
 ColorNode "Red"
 SomeAtom

 or maybe

 EvaluationLink
ColorNode "red"
SomeAtom


 Color names could, of course, be anything: e.g. the
names of the
 partitions.

 In one sense, colorings are identical to partitions; on the
 other hand, they can feel "more general" because you
can insist
 or demand that certain properties of colorings hold,
e.g. ramsey
 theory and reverse mathematics.

 You could *force* aka gaurantee uniqueness of color
assignment
 by using a StateLink:

 StateLink
Some Atom
ColorNode "red"

 The 

Re: [Link Grammar] Re: [opencog-dev] PartitionLink, biological pathways, human bodies, etc.

2017-08-08 Thread Ben Goertzel
This representation makes sense to me for biological pathways

Although, making PLN deal with these is another problem...

On Mon, Aug 7, 2017 at 12:19 PM, Linas Vepstas  wrote:
> Nothing wrong with lots of arrows arranged into loops. If I were doing this,
> this is what I would propose:
>
> The single most important #1 special super-duper innovation I have recently
> discovered is to represent biological pathways like so:
>
> SectionLink
> CatalystNode "alpha-ketoglutarate dehydrogenase"
> ConnectorSet
>  Connector
>   SubstanceNode "NAD^+"
>   Direction "input"
>  Connector
>Substancenode "COA-SH"
>Direction "input"
>  Connector
>Substancenode "alpha-ketoglutarate"
>Direction "input"
>  Connector
>Substancenode"NADH"
>Direction "output"
>  Connector
>Substancenode"H^+"
>Direction "output"
>  Connector
>Substancenode"CO^2"
>Direction "output"
>  Connector
>   Substancenode"Succynil-COA"
>   Direction "output"
>
> The above describes a single step in the Krebs cycle, having the indicated
> inputs and outputs -- three inputs, four outputs, the directionality of the
> half-arrows (i.e. the "connectors" explicitly indicated with the
> DirectionLink). At the center of it all is the CatalystNode
>
>
> See
> https://en.wikipedia.org/wiki/Citric_acid_cycle#/media/File:Citric_acid_cycle_with_aconitate_2.svg
> lower-right-hand side.
>
> The correct way to visualize this is like a spider: the spider-body is the
> CatalystNode and the spider has seven legs: three input legs, four output
> legs.
>
> Alternately, visualize this as a jigsaw puzzle piece, with seven tabs on it:
> four tabs sticking out, and three hole areas cut in.  You can assemble the
> entire Krebs cycle by fitting together these jigsaw puzzle pieces.
>
> In link-grammar, these sections are called "disjuncts". In sheaf theory,
> these objects are called "sections of a sheaf". In biology, they are called
> "catalysts".
>
> --linas
>
> p.s. note that I am using a "ConnectorSet" in the above, instead of a
> "ConnectorMemberLink"  ... perhaps I should use a ConnectorMemberLink...
> However I doubt that there are biological catalysts with more than 3-4-5
> inputs and 3-4-5 outputs.  So I'm willing to let it slide, for now. The
> alternative rep would be this:
>
> ConnectorMemberLink
> CatalystNode "alpha-ketoglutarate dehydrogenase"
> Connector
>   SubstanceNode "NAD^+"
>   Direction "input"
>
> plus six more of the above.  it is very very suspicious that the above
> resembles this:
>
> EvaluationLink
> PredicateNode "alpha-ketoglutarate dehydrogenase"
> ListLink
>   ConceptNode "NAD^+"
>   ConceptNode "input"
>
> however, I would strongly urge against this last representation!
>
> --linas
>
>
> On Mon, Aug 7, 2017 at 1:31 PM, Ben Goertzel  wrote:
>>
>> a pathway in biology is actually a network with directed arrows and
>> generally lots of loops there are even some hyperlinks e.g. for
>> catalysis... a pathway is a subhypergraph...
>>
>>
>>
>> On Aug 7, 2017 11:25, "Linas Vepstas"  wrote:
>>>
>>> no clue why its appropriate for biological pathways. Mike is designing
>>> that, not me.
>>>
>>> Anyway, a "pathway" is an ordered sequence where the ordering matters.
>>> Neither SetLink, nor AndLink are ordered. So if you actually want to have a
>>> path, i.e. a sequence of directed arrows, well .. you  need to find a
>>> representation of  biological pathways as directed arrows. But this is
>>> familiar ground, for opencog...
>>>
>>> --linas
>>>
>>> On Mon, Aug 7, 2017 at 1:21 PM, Ben Goertzel  wrote:

 OK I get that... but I don't see why it is appropriate for biological
 pathways...

 On Tue, Aug 8, 2017 at 2:19 AM, Linas Vepstas 
 wrote:
 > First, lets review SetLink:
 >
 >  SetLink
 > ConceptNode "x"
 > ConceptNode "y"
 > ConceptNode "z"
 >
 >
 >  EquivalenceLink
 > ConceptNode "last three letters of the alphabet"
 > SetLink
 >ConceptNode "x"
 >ConceptNode "y"
 >ConceptNode "z"
 >
 >
 >  MemberLink
 >  ConceptNode "x"
 >  ConceptNode "last three letters of the alphabet"
 >   MemberLink
 >  ConceptNode "y"
 >  ConceptNode "last three letters of the alphabet"
 >   MemberLink
 >  ConceptNode "z"
 >  ConceptNode "last three letters of the alphabet"
 >
 > Again, with TV's:
 >
 >   MemberLink  <1.0>
 >  ConceptNode "z"
 >  ConceptNode "last letters of the alphabet"
 >   MemberLink  <0.9>
 >  ConceptNode 

Re: [opencog-dev] PartitionLink, biological pathways, human bodies, etc.

2017-08-07 Thread Linas Vepstas
How can you determine if a pathway link is missing?  I mean, if you created
the AndLink, then its necessarily present/true, unless you are changing the
truth value to 0.0 under some cases.

what I'm trying to say is that determining if a biological pathway is
present/active is very similar to parsing an english-language sentence. For
a sentence to be valid, the words have to be present, and have to be
connected in the right order.

That is, a "path" in English is a "sentence", and for various reasons, we
never try to make a list of all possible sentences; instead opting to make
a list of sentence-parts, and then seeing how they can hook together
("parsing")

Perhaps, in biology, it is possible to make an exhaustive list of all
possible biological pathways. Maybe. But again: not that AndLink is
unordered: (AndLink A B)  is exactly the same atom as (AndLink B A)  ...
perhaps you want SequentialAndLink ??

--linas


On Mon, Aug 7, 2017 at 2:53 PM, mjsduncan <mjsdun...@gmail.com> wrote:

> if any pathway link is missing/false, the whole pathway is false.  all the
> links have to be present/true for the pathway to be in effect/true
>
>
>  Original message 
> From: Ben Goertzel
> Date:07/08/2017 11:21 (GMT-08:00)
> To: Linas Vepstas
> Cc: opencog ,Michael Duncan
> Subject: Re: [opencog-dev] PartitionLink, biological pathways, human
> bodies, etc.
>
> OK I get that... but I don't see why it is appropriate for biological
> pathways...
>
> On Tue, Aug 8, 2017 at 2:19 AM, Linas Vepstas <linasveps...@gmail.com>
> wrote:
> > First, lets review SetLink:
> >
> >  SetLink
> > ConceptNode "x"
> > ConceptNode "y"
> > ConceptNode "z"
> >
> >
> >  EquivalenceLink
> > ConceptNode "last three letters of the alphabet"
> > SetLink
> >ConceptNode "x"
> >ConceptNode "y"
> >ConceptNode "z"
> >
> >
> >  MemberLink
> >  ConceptNode "x"
> >  ConceptNode "last three letters of the alphabet"
> >   MemberLink
> >  ConceptNode "y"
> >  ConceptNode "last three letters of the alphabet"
> >   MemberLink
> >  ConceptNode "z"
> >  ConceptNode "last three letters of the alphabet"
> >
> > Again, with TV's:
> >
> >   MemberLink  <1.0>
> >  ConceptNode "z"
> >  ConceptNode "last letters of the alphabet"
> >   MemberLink  <0.9>
> >  ConceptNode "w"
> >  ConceptNode "last letters of the alphabet"
> >   MemberLink  <0.8>
> >  ConceptNode "s"
> >  ConceptNode "last letters of the alphabet"
> >   MemberLink  <0.2>
> >  ConceptNode "m"
> >  ConceptNode "last letters of the alphabet"
> >
> >
> >
> > Sooo .. AndMemberLink would be just like the above, except that whereever
> > you see SetLink above, you would have AndLink, and wherever you see
> > MmeberLink above, you would have AndMemeberLink.
> >
> > --linas
> >
> >
> >
> >
> > On Mon, Aug 7, 2017 at 1:11 PM, Ben Goertzel <b...@goertzel.org> wrote:
> >>
> >> I don't understand the proposed semantics of AndMemberLink, could you
> >> explain?
> >>
> >>
> >>
> >> On Sat, Aug 5, 2017 at 1:07 AM, Michael Duncan <mjsdun...@gmail.com>
> >> wrote:
> >> > i actually think an AndLink-like semantics better fits biochemical
> >> > pathways
> >> > at a computationally tractable level than partitions in that below the
> >> > level
> >> > of a whole organism, where one pathway ends and another begins is
> >> > largely
> >> > arbitrary.  also,  if one link is missing then the whole thing doesn't
> >> > work
> >> > but the last bit of a dead end might be the start of another path that
> >> > goes
> >> > to the same place, more like words and phrases that can be rearranged
> >> > and
> >> > swapped in different ways to say the same thing.  linus idea of
> >> > AndMemberLinks and OrMemeberLinks would get around the size limitation
> >> > and
> >> > also seem like they would be useful for reasoning on moses models.
> >> >
> >> > On Monday, July 31, 2017 at 5:55:16 PM UTC-4, linas wrote:
> >> >>
> >> >> Hi Ben, Mike,
> >> >>

Re: [opencog-dev] PartitionLink, biological pathways, human bodies, etc.

2017-08-07 Thread mjsduncan
if any pathway link is missing/false, the whole pathway is false.  all the 
links have to be present/true for the pathway to be in effect/true

 Original message From: Ben Goertzel 
<b...@goertzel.org> Date:07/08/2017  11:21  (GMT-08:00) 
To: Linas Vepstas <linasveps...@gmail.com> Cc: opencog 
<opencog@googlegroups.com>,Michael Duncan <mjsdun...@gmail.com> 
Subject: Re: [opencog-dev] PartitionLink, biological pathways, human 
bodies, etc. 
OK I get that... but I don't see why it is appropriate for biological
pathways...

On Tue, Aug 8, 2017 at 2:19 AM, Linas Vepstas <linasveps...@gmail.com> wrote:
> First, lets review SetLink:
>
>  SetLink
> ConceptNode "x"
> ConceptNode "y"
> ConceptNode "z"
>
>
>  EquivalenceLink
> ConceptNode "last three letters of the alphabet"
> SetLink
>ConceptNode "x"
>ConceptNode "y"
>ConceptNode "z"
>
>
>  MemberLink
>  ConceptNode "x"
>  ConceptNode "last three letters of the alphabet"
>   MemberLink
>  ConceptNode "y"
>  ConceptNode "last three letters of the alphabet"
>   MemberLink
>  ConceptNode "z"
>  ConceptNode "last three letters of the alphabet"
>
> Again, with TV's:
>
>   MemberLink  <1.0>
>  ConceptNode "z"
>  ConceptNode "last letters of the alphabet"
>   MemberLink  <0.9>
>  ConceptNode "w"
>  ConceptNode "last letters of the alphabet"
>   MemberLink  <0.8>
>  ConceptNode "s"
>  ConceptNode "last letters of the alphabet"
>   MemberLink  <0.2>
>  ConceptNode "m"
>  ConceptNode "last letters of the alphabet"
>
>
>
> Sooo .. AndMemberLink would be just like the above, except that whereever
> you see SetLink above, you would have AndLink, and wherever you see
> MmeberLink above, you would have AndMemeberLink.
>
> --linas
>
>
>
>
> On Mon, Aug 7, 2017 at 1:11 PM, Ben Goertzel <b...@goertzel.org> wrote:
>>
>> I don't understand the proposed semantics of AndMemberLink, could you
>> explain?
>>
>>
>>
>> On Sat, Aug 5, 2017 at 1:07 AM, Michael Duncan <mjsdun...@gmail.com>
>> wrote:
>> > i actually think an AndLink-like semantics better fits biochemical
>> > pathways
>> > at a computationally tractable level than partitions in that below the
>> > level
>> > of a whole organism, where one pathway ends and another begins is
>> > largely
>> > arbitrary.  also,  if one link is missing then the whole thing doesn't
>> > work
>> > but the last bit of a dead end might be the start of another path that
>> > goes
>> > to the same place, more like words and phrases that can be rearranged
>> > and
>> > swapped in different ways to say the same thing.  linus idea of
>> > AndMemberLinks and OrMemeberLinks would get around the size limitation
>> > and
>> > also seem like they would be useful for reasoning on moses models.
>> >
>> > On Monday, July 31, 2017 at 5:55:16 PM UTC-4, linas wrote:
>> >>
>> >> Hi Ben, Mike,
>> >>
>> >>
>> >> On Fri, Jul 21, 2017 at 9:41 PM, Ben Goertzel <b...@goertzel.org>
>> >> wrote:
>> >>>
>> >>> Some interesting representational issues have come up in the context
>> >>> of Atomspace representation of pathways, which appear to have more
>> >>> general implications…
>> >>>
>> >>> It seems the semantics we want for a biological pathway is sort of
>> >>> like “the pathway P is a set of relationships R1, R2, …, R20” in kinda
>> >>> the same sense that “the human body is a set of organs: brain, heart,
>> >>> lungs, legs, etc.”
>> >>>
>> >>> First of all it seems what we have here is a part of relationship…
>> >>> maybe
>> >>> we want
>> >>>
>> >>> PartLink
>> >>> ConceptNode “heart”
>> >>> ConceptNode “human-body”
>> >>>
>> >>> and
>> >>>
>> >>> PartLink
>> >>> >relationship<
>> >>> >pathway<
>> >>>
>> >>> PartLink and PartOfLink have come and gone in
>> >>> OpenCog/Novamente/Webmind history...
>> >>>
>> 

Re: [opencog-dev] PartitionLink, biological pathways, human bodies, etc.

2017-08-07 Thread Linas Vepstas
Nothing wrong with lots of arrows arranged into loops. If I were doing
this, this is what I would propose:

The single most important #1 special super-duper innovation I have recently
discovered is to represent biological pathways like so:

SectionLink
CatalystNode "alpha-ketoglutarate dehydrogenase"
ConnectorSet
 Connector
  SubstanceNode "NAD^+"
  Direction "input"
 Connector
   Substancenode "COA-SH"
   Direction "input"
 Connector
   Substancenode "alpha-ketoglutarate"
   Direction "input"
 Connector
   Substancenode"NADH"
   Direction "output"
 Connector
   Substancenode"H^+"
   Direction "output"
 Connector
   Substancenode"CO^2"
   Direction "output"
 Connector
  Substancenode"Succynil-COA"
  Direction "output"

The above describes a single step in the Krebs cycle, having the indicated
inputs and outputs -- three inputs, four outputs, the directionality of the
half-arrows (i.e. the "connectors" explicitly indicated with the
DirectionLink). At the center of it all is the CatalystNode


See
https://en.wikipedia.org/wiki/Citric_acid_cycle#/media/File:Citric_acid_cycle_with_aconitate_2.svg
lower-right-hand side.

The correct way to visualize this is like a spider: the spider-body is the
CatalystNode and the spider has seven legs: three input legs, four output
legs.

Alternately, visualize this as a jigsaw puzzle piece, with seven tabs on
it: four tabs sticking out, and three hole areas cut in.  You can assemble
the entire Krebs cycle by fitting together these jigsaw puzzle pieces.

In link-grammar, these sections are called "disjuncts". In sheaf theory,
these objects are called "sections of a sheaf". In biology, they are called
"catalysts".

--linas

p.s. note that I am using a "ConnectorSet" in the above, instead of a
"ConnectorMemberLink"  ... perhaps I should use a ConnectorMemberLink...
However I doubt that there are biological catalysts with more than 3-4-5
inputs and 3-4-5 outputs.  So I'm willing to let it slide, for now. The
alternative rep would be this:

ConnectorMemberLink
CatalystNode "alpha-ketoglutarate dehydrogenase"
Connector
  SubstanceNode "NAD^+"
  Direction "input"

plus six more of the above.  it is very very suspicious that the above
resembles this:

EvaluationLink
PredicateNode "alpha-ketoglutarate dehydrogenase"
ListLink
  ConceptNode "NAD^+"
  ConceptNode "input"

however, I would strongly urge against this last representation!

--linas


On Mon, Aug 7, 2017 at 1:31 PM, Ben Goertzel  wrote:

> a pathway in biology is actually a network with directed arrows and
> generally lots of loops there are even some hyperlinks e.g. for
> catalysis... a pathway is a subhypergraph...
>
>
>
> On Aug 7, 2017 11:25, "Linas Vepstas"  wrote:
>
>> no clue why its appropriate for biological pathways. Mike is designing
>> that, not me.
>>
>> Anyway, a "pathway" is an ordered sequence where the ordering matters.
>> Neither SetLink, nor AndLink are ordered. So if you actually want to have a
>> path, i.e. a sequence of directed arrows, well .. you  need to find a
>> representation of  biological pathways as directed arrows. But this is
>> familiar ground, for opencog...
>>
>> --linas
>>
>> On Mon, Aug 7, 2017 at 1:21 PM, Ben Goertzel  wrote:
>>
>>> OK I get that... but I don't see why it is appropriate for biological
>>> pathways...
>>>
>>> On Tue, Aug 8, 2017 at 2:19 AM, Linas Vepstas 
>>> wrote:
>>> > First, lets review SetLink:
>>> >
>>> >  SetLink
>>> > ConceptNode "x"
>>> > ConceptNode "y"
>>> > ConceptNode "z"
>>> >
>>> >
>>> >  EquivalenceLink
>>> > ConceptNode "last three letters of the alphabet"
>>> > SetLink
>>> >ConceptNode "x"
>>> >ConceptNode "y"
>>> >ConceptNode "z"
>>> >
>>> >
>>> >  MemberLink
>>> >  ConceptNode "x"
>>> >  ConceptNode "last three letters of the alphabet"
>>> >   MemberLink
>>> >  ConceptNode "y"
>>> >  ConceptNode "last three letters of the alphabet"
>>> >   MemberLink
>>> >  ConceptNode "z"
>>> >  ConceptNode "last three letters of the alphabet"
>>> >
>>> > Again, with TV's:
>>> >
>>> >   MemberLink  <1.0>
>>> >  ConceptNode "z"
>>> >  ConceptNode "last letters of the alphabet"
>>> >   MemberLink  <0.9>
>>> >  ConceptNode "w"
>>> >  ConceptNode "last letters of the alphabet"
>>> >   MemberLink  <0.8>
>>> >  ConceptNode "s"
>>> >  ConceptNode "last letters of the alphabet"
>>> >   MemberLink  <0.2>
>>> >  ConceptNode "m"
>>> >  ConceptNode "last letters of the alphabet"
>>> >
>>> >
>>> >
>>> > Sooo .. AndMemberLink would be just like the above, except that
>>> whereever
>>> > you see SetLink above, you would 

Re: [opencog-dev] PartitionLink, biological pathways, human bodies, etc.

2017-08-07 Thread Ben Goertzel
a pathway in biology is actually a network with directed arrows and
generally lots of loops there are even some hyperlinks e.g. for
catalysis... a pathway is a subhypergraph...



On Aug 7, 2017 11:25, "Linas Vepstas"  wrote:

> no clue why its appropriate for biological pathways. Mike is designing
> that, not me.
>
> Anyway, a "pathway" is an ordered sequence where the ordering matters.
> Neither SetLink, nor AndLink are ordered. So if you actually want to have a
> path, i.e. a sequence of directed arrows, well .. you  need to find a
> representation of  biological pathways as directed arrows. But this is
> familiar ground, for opencog...
>
> --linas
>
> On Mon, Aug 7, 2017 at 1:21 PM, Ben Goertzel  wrote:
>
>> OK I get that... but I don't see why it is appropriate for biological
>> pathways...
>>
>> On Tue, Aug 8, 2017 at 2:19 AM, Linas Vepstas 
>> wrote:
>> > First, lets review SetLink:
>> >
>> >  SetLink
>> > ConceptNode "x"
>> > ConceptNode "y"
>> > ConceptNode "z"
>> >
>> >
>> >  EquivalenceLink
>> > ConceptNode "last three letters of the alphabet"
>> > SetLink
>> >ConceptNode "x"
>> >ConceptNode "y"
>> >ConceptNode "z"
>> >
>> >
>> >  MemberLink
>> >  ConceptNode "x"
>> >  ConceptNode "last three letters of the alphabet"
>> >   MemberLink
>> >  ConceptNode "y"
>> >  ConceptNode "last three letters of the alphabet"
>> >   MemberLink
>> >  ConceptNode "z"
>> >  ConceptNode "last three letters of the alphabet"
>> >
>> > Again, with TV's:
>> >
>> >   MemberLink  <1.0>
>> >  ConceptNode "z"
>> >  ConceptNode "last letters of the alphabet"
>> >   MemberLink  <0.9>
>> >  ConceptNode "w"
>> >  ConceptNode "last letters of the alphabet"
>> >   MemberLink  <0.8>
>> >  ConceptNode "s"
>> >  ConceptNode "last letters of the alphabet"
>> >   MemberLink  <0.2>
>> >  ConceptNode "m"
>> >  ConceptNode "last letters of the alphabet"
>> >
>> >
>> >
>> > Sooo .. AndMemberLink would be just like the above, except that
>> whereever
>> > you see SetLink above, you would have AndLink, and wherever you see
>> > MmeberLink above, you would have AndMemeberLink.
>> >
>> > --linas
>> >
>> >
>> >
>> >
>> > On Mon, Aug 7, 2017 at 1:11 PM, Ben Goertzel  wrote:
>> >>
>> >> I don't understand the proposed semantics of AndMemberLink, could you
>> >> explain?
>> >>
>> >>
>> >>
>> >> On Sat, Aug 5, 2017 at 1:07 AM, Michael Duncan 
>> >> wrote:
>> >> > i actually think an AndLink-like semantics better fits biochemical
>> >> > pathways
>> >> > at a computationally tractable level than partitions in that below
>> the
>> >> > level
>> >> > of a whole organism, where one pathway ends and another begins is
>> >> > largely
>> >> > arbitrary.  also,  if one link is missing then the whole thing
>> doesn't
>> >> > work
>> >> > but the last bit of a dead end might be the start of another path
>> that
>> >> > goes
>> >> > to the same place, more like words and phrases that can be rearranged
>> >> > and
>> >> > swapped in different ways to say the same thing.  linus idea of
>> >> > AndMemberLinks and OrMemeberLinks would get around the size
>> limitation
>> >> > and
>> >> > also seem like they would be useful for reasoning on moses models.
>> >> >
>> >> > On Monday, July 31, 2017 at 5:55:16 PM UTC-4, linas wrote:
>> >> >>
>> >> >> Hi Ben, Mike,
>> >> >>
>> >> >>
>> >> >> On Fri, Jul 21, 2017 at 9:41 PM, Ben Goertzel 
>> >> >> wrote:
>> >> >>>
>> >> >>> Some interesting representational issues have come up in the
>> context
>> >> >>> of Atomspace representation of pathways, which appear to have more
>> >> >>> general implications…
>> >> >>>
>> >> >>> It seems the semantics we want for a biological pathway is sort of
>> >> >>> like “the pathway P is a set of relationships R1, R2, …, R20” in
>> kinda
>> >> >>> the same sense that “the human body is a set of organs: brain,
>> heart,
>> >> >>> lungs, legs, etc.”
>> >> >>>
>> >> >>> First of all it seems what we have here is a part of relationship…
>> >> >>> maybe
>> >> >>> we want
>> >> >>>
>> >> >>> PartLink
>> >> >>> ConceptNode “heart”
>> >> >>> ConceptNode “human-body”
>> >> >>>
>> >> >>> and
>> >> >>>
>> >> >>> PartLink
>> >> >>> >relationship<
>> >> >>> >pathway<
>> >> >>>
>> >> >>> PartLink and PartOfLink have come and gone in
>> >> >>> OpenCog/Novamente/Webmind history...
>> >> >>>
>> >> >>> An argument that PartLink should have fundamental status and a
>> >> >>> well-defined fuzzy truth value is given in this paper:
>> >> >>>
>> >> >>> https://www.academia.edu/1016959/Fuzzy_mereology
>> >> >>>
>> >> >>> However what we need for biological pathways and human bodies seems
>> >> >>> like a bit more.   We want to say that a human body consists of a
>> >> >>> certain set of parts... not just that each of them is a part...
>> We're
>> >> >>> doing a 

Re: [opencog-dev] PartitionLink, biological pathways, human bodies, etc.

2017-08-07 Thread Linas Vepstas
no clue why its appropriate for biological pathways. Mike is designing
that, not me.

Anyway, a "pathway" is an ordered sequence where the ordering matters.
Neither SetLink, nor AndLink are ordered. So if you actually want to have a
path, i.e. a sequence of directed arrows, well .. you  need to find a
representation of  biological pathways as directed arrows. But this is
familiar ground, for opencog...

--linas

On Mon, Aug 7, 2017 at 1:21 PM, Ben Goertzel  wrote:

> OK I get that... but I don't see why it is appropriate for biological
> pathways...
>
> On Tue, Aug 8, 2017 at 2:19 AM, Linas Vepstas 
> wrote:
> > First, lets review SetLink:
> >
> >  SetLink
> > ConceptNode "x"
> > ConceptNode "y"
> > ConceptNode "z"
> >
> >
> >  EquivalenceLink
> > ConceptNode "last three letters of the alphabet"
> > SetLink
> >ConceptNode "x"
> >ConceptNode "y"
> >ConceptNode "z"
> >
> >
> >  MemberLink
> >  ConceptNode "x"
> >  ConceptNode "last three letters of the alphabet"
> >   MemberLink
> >  ConceptNode "y"
> >  ConceptNode "last three letters of the alphabet"
> >   MemberLink
> >  ConceptNode "z"
> >  ConceptNode "last three letters of the alphabet"
> >
> > Again, with TV's:
> >
> >   MemberLink  <1.0>
> >  ConceptNode "z"
> >  ConceptNode "last letters of the alphabet"
> >   MemberLink  <0.9>
> >  ConceptNode "w"
> >  ConceptNode "last letters of the alphabet"
> >   MemberLink  <0.8>
> >  ConceptNode "s"
> >  ConceptNode "last letters of the alphabet"
> >   MemberLink  <0.2>
> >  ConceptNode "m"
> >  ConceptNode "last letters of the alphabet"
> >
> >
> >
> > Sooo .. AndMemberLink would be just like the above, except that whereever
> > you see SetLink above, you would have AndLink, and wherever you see
> > MmeberLink above, you would have AndMemeberLink.
> >
> > --linas
> >
> >
> >
> >
> > On Mon, Aug 7, 2017 at 1:11 PM, Ben Goertzel  wrote:
> >>
> >> I don't understand the proposed semantics of AndMemberLink, could you
> >> explain?
> >>
> >>
> >>
> >> On Sat, Aug 5, 2017 at 1:07 AM, Michael Duncan 
> >> wrote:
> >> > i actually think an AndLink-like semantics better fits biochemical
> >> > pathways
> >> > at a computationally tractable level than partitions in that below the
> >> > level
> >> > of a whole organism, where one pathway ends and another begins is
> >> > largely
> >> > arbitrary.  also,  if one link is missing then the whole thing doesn't
> >> > work
> >> > but the last bit of a dead end might be the start of another path that
> >> > goes
> >> > to the same place, more like words and phrases that can be rearranged
> >> > and
> >> > swapped in different ways to say the same thing.  linus idea of
> >> > AndMemberLinks and OrMemeberLinks would get around the size limitation
> >> > and
> >> > also seem like they would be useful for reasoning on moses models.
> >> >
> >> > On Monday, July 31, 2017 at 5:55:16 PM UTC-4, linas wrote:
> >> >>
> >> >> Hi Ben, Mike,
> >> >>
> >> >>
> >> >> On Fri, Jul 21, 2017 at 9:41 PM, Ben Goertzel 
> >> >> wrote:
> >> >>>
> >> >>> Some interesting representational issues have come up in the context
> >> >>> of Atomspace representation of pathways, which appear to have more
> >> >>> general implications…
> >> >>>
> >> >>> It seems the semantics we want for a biological pathway is sort of
> >> >>> like “the pathway P is a set of relationships R1, R2, …, R20” in
> kinda
> >> >>> the same sense that “the human body is a set of organs: brain,
> heart,
> >> >>> lungs, legs, etc.”
> >> >>>
> >> >>> First of all it seems what we have here is a part of relationship…
> >> >>> maybe
> >> >>> we want
> >> >>>
> >> >>> PartLink
> >> >>> ConceptNode “heart”
> >> >>> ConceptNode “human-body”
> >> >>>
> >> >>> and
> >> >>>
> >> >>> PartLink
> >> >>> >relationship<
> >> >>> >pathway<
> >> >>>
> >> >>> PartLink and PartOfLink have come and gone in
> >> >>> OpenCog/Novamente/Webmind history...
> >> >>>
> >> >>> An argument that PartLink should have fundamental status and a
> >> >>> well-defined fuzzy truth value is given in this paper:
> >> >>>
> >> >>> https://www.academia.edu/1016959/Fuzzy_mereology
> >> >>>
> >> >>> However what we need for biological pathways and human bodies seems
> >> >>> like a bit more.   We want to say that a human body consists of a
> >> >>> certain set of parts... not just that each of them is a part...
> We're
> >> >>> doing a decomposition.
> >> >>>
> >> >>> One way to do this would be
> >> >>>
> >> >>> PartitionLink
> >> >>>ConceptNode “human-body”
> >> >>>ListLink
> >> >>>   ConceptNode “legs”
> >> >>>   ConceptNode “arms”
> >> >>>   ConceptNode “brain”
> >> >>>   etc.
> >> >>>
> >> >>> Relatedly, we could also have
> >> >>
> >> >>
> >> >> As mentioned earlier, there are several problems with this format.
> One
> >> >> is
> 

Re: [opencog-dev] PartitionLink, biological pathways, human bodies, etc.

2017-08-07 Thread Ben Goertzel
OK I get that... but I don't see why it is appropriate for biological
pathways...

On Tue, Aug 8, 2017 at 2:19 AM, Linas Vepstas  wrote:
> First, lets review SetLink:
>
>  SetLink
> ConceptNode "x"
> ConceptNode "y"
> ConceptNode "z"
>
>
>  EquivalenceLink
> ConceptNode "last three letters of the alphabet"
> SetLink
>ConceptNode "x"
>ConceptNode "y"
>ConceptNode "z"
>
>
>  MemberLink
>  ConceptNode "x"
>  ConceptNode "last three letters of the alphabet"
>   MemberLink
>  ConceptNode "y"
>  ConceptNode "last three letters of the alphabet"
>   MemberLink
>  ConceptNode "z"
>  ConceptNode "last three letters of the alphabet"
>
> Again, with TV's:
>
>   MemberLink  <1.0>
>  ConceptNode "z"
>  ConceptNode "last letters of the alphabet"
>   MemberLink  <0.9>
>  ConceptNode "w"
>  ConceptNode "last letters of the alphabet"
>   MemberLink  <0.8>
>  ConceptNode "s"
>  ConceptNode "last letters of the alphabet"
>   MemberLink  <0.2>
>  ConceptNode "m"
>  ConceptNode "last letters of the alphabet"
>
>
>
> Sooo .. AndMemberLink would be just like the above, except that whereever
> you see SetLink above, you would have AndLink, and wherever you see
> MmeberLink above, you would have AndMemeberLink.
>
> --linas
>
>
>
>
> On Mon, Aug 7, 2017 at 1:11 PM, Ben Goertzel  wrote:
>>
>> I don't understand the proposed semantics of AndMemberLink, could you
>> explain?
>>
>>
>>
>> On Sat, Aug 5, 2017 at 1:07 AM, Michael Duncan 
>> wrote:
>> > i actually think an AndLink-like semantics better fits biochemical
>> > pathways
>> > at a computationally tractable level than partitions in that below the
>> > level
>> > of a whole organism, where one pathway ends and another begins is
>> > largely
>> > arbitrary.  also,  if one link is missing then the whole thing doesn't
>> > work
>> > but the last bit of a dead end might be the start of another path that
>> > goes
>> > to the same place, more like words and phrases that can be rearranged
>> > and
>> > swapped in different ways to say the same thing.  linus idea of
>> > AndMemberLinks and OrMemeberLinks would get around the size limitation
>> > and
>> > also seem like they would be useful for reasoning on moses models.
>> >
>> > On Monday, July 31, 2017 at 5:55:16 PM UTC-4, linas wrote:
>> >>
>> >> Hi Ben, Mike,
>> >>
>> >>
>> >> On Fri, Jul 21, 2017 at 9:41 PM, Ben Goertzel 
>> >> wrote:
>> >>>
>> >>> Some interesting representational issues have come up in the context
>> >>> of Atomspace representation of pathways, which appear to have more
>> >>> general implications…
>> >>>
>> >>> It seems the semantics we want for a biological pathway is sort of
>> >>> like “the pathway P is a set of relationships R1, R2, …, R20” in kinda
>> >>> the same sense that “the human body is a set of organs: brain, heart,
>> >>> lungs, legs, etc.”
>> >>>
>> >>> First of all it seems what we have here is a part of relationship…
>> >>> maybe
>> >>> we want
>> >>>
>> >>> PartLink
>> >>> ConceptNode “heart”
>> >>> ConceptNode “human-body”
>> >>>
>> >>> and
>> >>>
>> >>> PartLink
>> >>> >relationship<
>> >>> >pathway<
>> >>>
>> >>> PartLink and PartOfLink have come and gone in
>> >>> OpenCog/Novamente/Webmind history...
>> >>>
>> >>> An argument that PartLink should have fundamental status and a
>> >>> well-defined fuzzy truth value is given in this paper:
>> >>>
>> >>> https://www.academia.edu/1016959/Fuzzy_mereology
>> >>>
>> >>> However what we need for biological pathways and human bodies seems
>> >>> like a bit more.   We want to say that a human body consists of a
>> >>> certain set of parts... not just that each of them is a part...  We're
>> >>> doing a decomposition.
>> >>>
>> >>> One way to do this would be
>> >>>
>> >>> PartitionLink
>> >>>ConceptNode “human-body”
>> >>>ListLink
>> >>>   ConceptNode “legs”
>> >>>   ConceptNode “arms”
>> >>>   ConceptNode “brain”
>> >>>   etc.
>> >>>
>> >>> Relatedly, we could also have
>> >>
>> >>
>> >> As mentioned earlier, there are several problems with this format.  One
>> >> is
>> >> the "oops I forgot to mention xyz in the list" or "gosh I should have
>> >> left
>> >> out pqr" and this becomes a big problem:  you have to delete the
>> >> PartitionLink, delete the ListLink, create a new list and partition.
>> >> In the
>> >> meanwhile, some other subsystem might be holding a handle to the old,
>> >> now-wrong PartitionLink, and there is no effective way of announcing
>> >> "hey
>> >> stop using that old thing, get my new thing now".
>> >>
>> >> A second problem is that the above doesn't have anywhere to hang
>> >> addtional
>> >> data: e.g. "legs are a big part of the human body, having a mas of
>> >> nearly
>> >> half of the body." You can't just slap that on as a (truth)value, cause
>> >> there's no where  to put that value.
>> >>
>> >> 

Re: [opencog-dev] PartitionLink, biological pathways, human bodies, etc.

2017-08-07 Thread Linas Vepstas
First, lets review SetLink:

 SetLink
ConceptNode  "x"
ConceptNode "y"
ConceptNode "z"

 EquivalenceLink 
ConceptNode "last three letters of the alphabet"
SetLink
   ConceptNode "x"
   ConceptNode "y"
   ConceptNode "z"

 MemberLink 
 ConceptNode "x"
 ConceptNode "last three letters of the alphabet"
  MemberLink
 ConceptNode "y"
 ConceptNode "last three letters of the alphabet"
  MemberLink
 ConceptNode "z"
 ConceptNode "last three letters of the alphabet"

Again, with TV's:

  MemberLink  <1.0>
 ConceptNode "z"
 ConceptNode "last letters of the alphabet"
  MemberLink  <0.9>
 ConceptNode "w"
 ConceptNode "last letters of the alphabet"
  MemberLink  <0.8>
 ConceptNode "s"
 ConceptNode "last letters of the alphabet"
  MemberLink  <0.2>
 ConceptNode "m"
 ConceptNode "last letters of the alphabet"



Sooo .. AndMemberLink would be just like the above, except that whereever
you see SetLink above, you would have AndLink, and wherever you see
MmeberLink above, you would have AndMemeberLink.

--linas




On Mon, Aug 7, 2017 at 1:11 PM, Ben Goertzel  wrote:

> I don't understand the proposed semantics of AndMemberLink, could you
> explain?
>
>
>
> On Sat, Aug 5, 2017 at 1:07 AM, Michael Duncan 
> wrote:
> > i actually think an AndLink-like semantics better fits biochemical
> pathways
> > at a computationally tractable level than partitions in that below the
> level
> > of a whole organism, where one pathway ends and another begins is largely
> > arbitrary.  also,  if one link is missing then the whole thing doesn't
> work
> > but the last bit of a dead end might be the start of another path that
> goes
> > to the same place, more like words and phrases that can be rearranged and
> > swapped in different ways to say the same thing.  linus idea of
> > AndMemberLinks and OrMemeberLinks would get around the size limitation
> and
> > also seem like they would be useful for reasoning on moses models.
> >
> > On Monday, July 31, 2017 at 5:55:16 PM UTC-4, linas wrote:
> >>
> >> Hi Ben, Mike,
> >>
> >>
> >> On Fri, Jul 21, 2017 at 9:41 PM, Ben Goertzel 
> wrote:
> >>>
> >>> Some interesting representational issues have come up in the context
> >>> of Atomspace representation of pathways, which appear to have more
> >>> general implications…
> >>>
> >>> It seems the semantics we want for a biological pathway is sort of
> >>> like “the pathway P is a set of relationships R1, R2, …, R20” in kinda
> >>> the same sense that “the human body is a set of organs: brain, heart,
> >>> lungs, legs, etc.”
> >>>
> >>> First of all it seems what we have here is a part of relationship…
> maybe
> >>> we want
> >>>
> >>> PartLink
> >>> ConceptNode “heart”
> >>> ConceptNode “human-body”
> >>>
> >>> and
> >>>
> >>> PartLink
> >>> >relationship<
> >>> >pathway<
> >>>
> >>> PartLink and PartOfLink have come and gone in
> >>> OpenCog/Novamente/Webmind history...
> >>>
> >>> An argument that PartLink should have fundamental status and a
> >>> well-defined fuzzy truth value is given in this paper:
> >>>
> >>> https://www.academia.edu/1016959/Fuzzy_mereology
> >>>
> >>> However what we need for biological pathways and human bodies seems
> >>> like a bit more.   We want to say that a human body consists of a
> >>> certain set of parts... not just that each of them is a part...  We're
> >>> doing a decomposition.
> >>>
> >>> One way to do this would be
> >>>
> >>> PartitionLink
> >>>ConceptNode “human-body”
> >>>ListLink
> >>>   ConceptNode “legs”
> >>>   ConceptNode “arms”
> >>>   ConceptNode “brain”
> >>>   etc.
> >>>
> >>> Relatedly, we could also have
> >>
> >>
> >> As mentioned earlier, there are several problems with this format.  One
> is
> >> the "oops I forgot to mention xyz in the list" or "gosh I should have
> left
> >> out pqr" and this becomes a big problem:  you have to delete the
> >> PartitionLink, delete the ListLink, create a new list and partition.
> In the
> >> meanwhile, some other subsystem might be holding a handle to the old,
> >> now-wrong PartitionLink, and there is no effective way of announcing
> "hey
> >> stop using that old thing, get my new thing now".
> >>
> >> A second problem is that the above doesn't have anywhere to hang
> addtional
> >> data: e.g. "legs are a big part of the human body, having a mas of
> nearly
> >> half of the body." You can't just slap that on as a (truth)value, cause
> >> there's no where  to put that value.
> >>
> >> Third problem is that large list-links are hard to handle in the pattern
> >> matcher. Its much much harder to write a query of the form  "find me all
> >> values of $X where
> >>
> >> PartitionLink
> >>ConceptNode “human-body”
> >>ListLink
> >>   ConceptNode “legs”
> 

Re: [opencog-dev] PartitionLink, biological pathways, human bodies, etc.

2017-08-07 Thread Ben Goertzel
I mean, if a pathway is just viewed as a semi-arbitrary set of
relationships, then why not just make the pathway a ConceptNode, with
MemberLinks to the relationships contained in the pathway?
MemberLInks can then have fuzzy weights as needed.   I am unsure why
we want conjunction semantics here...

-- Ben

On Tue, Aug 8, 2017 at 2:11 AM, Ben Goertzel  wrote:
> I don't understand the proposed semantics of AndMemberLink, could you explain?
>
>
>
> On Sat, Aug 5, 2017 at 1:07 AM, Michael Duncan  wrote:
>> i actually think an AndLink-like semantics better fits biochemical pathways
>> at a computationally tractable level than partitions in that below the level
>> of a whole organism, where one pathway ends and another begins is largely
>> arbitrary.  also,  if one link is missing then the whole thing doesn't work
>> but the last bit of a dead end might be the start of another path that goes
>> to the same place, more like words and phrases that can be rearranged and
>> swapped in different ways to say the same thing.  linus idea of
>> AndMemberLinks and OrMemeberLinks would get around the size limitation and
>> also seem like they would be useful for reasoning on moses models.
>>
>> On Monday, July 31, 2017 at 5:55:16 PM UTC-4, linas wrote:
>>>
>>> Hi Ben, Mike,
>>>
>>>
>>> On Fri, Jul 21, 2017 at 9:41 PM, Ben Goertzel  wrote:

 Some interesting representational issues have come up in the context
 of Atomspace representation of pathways, which appear to have more
 general implications…

 It seems the semantics we want for a biological pathway is sort of
 like “the pathway P is a set of relationships R1, R2, …, R20” in kinda
 the same sense that “the human body is a set of organs: brain, heart,
 lungs, legs, etc.”

 First of all it seems what we have here is a part of relationship… maybe
 we want

 PartLink
 ConceptNode “heart”
 ConceptNode “human-body”

 and

 PartLink
 >relationship<
 >pathway<

 PartLink and PartOfLink have come and gone in
 OpenCog/Novamente/Webmind history...

 An argument that PartLink should have fundamental status and a
 well-defined fuzzy truth value is given in this paper:

 https://www.academia.edu/1016959/Fuzzy_mereology

 However what we need for biological pathways and human bodies seems
 like a bit more.   We want to say that a human body consists of a
 certain set of parts... not just that each of them is a part...  We're
 doing a decomposition.

 One way to do this would be

 PartitionLink
ConceptNode “human-body”
ListLink
   ConceptNode “legs”
   ConceptNode “arms”
   ConceptNode “brain”
   etc.

 Relatedly, we could also have
>>>
>>>
>>> As mentioned earlier, there are several problems with this format.  One is
>>> the "oops I forgot to mention xyz in the list" or "gosh I should have left
>>> out pqr" and this becomes a big problem:  you have to delete the
>>> PartitionLink, delete the ListLink, create a new list and partition.  In the
>>> meanwhile, some other subsystem might be holding a handle to the old,
>>> now-wrong PartitionLink, and there is no effective way of announcing "hey
>>> stop using that old thing, get my new thing now".
>>>
>>> A second problem is that the above doesn't have anywhere to hang addtional
>>> data: e.g. "legs are a big part of the human body, having a mas of nearly
>>> half of the body." You can't just slap that on as a (truth)value, cause
>>> there's no where  to put that value.
>>>
>>> Third problem is that large list-links are hard to handle in the pattern
>>> matcher. Its much much harder to write a query of the form  "find me all
>>> values of $X where
>>>
>>> PartitionLink
>>>ConceptNode “human-body”
>>>ListLink
>>>   ConceptNode “legs”
>>>   VariableNode  “$X”
>>>   ConceptNode “brain”
>>>
>>> because, ... well the ListLink is an ordrerd link, not an unordered link.
>>> If you forget to include the pqr (added above) then the search will fail.
>>> You could try to use unordered links and globnodes, but these lead to other
>>> difficulties, including the n! possible permutations of an unordered link
>>> become large n-factorial large when the unordered link has n items in it.
>>> Recall that old factorial-70 trick used to make calculators overflow.
>>>
>>> In general, any link with more than 3 or 4 or 5 items in it is bad news.
>>> This is a generic statement about knowledge representation in opencog.
>>>
>>>
 OverlappingPartitionLink
 C
 L

 if we want to encompass cases where the partition elements in L can
 overlap; or

 CoveringLink
 C
 L

 if we want to encompass cases where the partition elements in L can
 overlap, AND the elements in L may encompass some stuff 

Re: [opencog-dev] PartitionLink, biological pathways, human bodies, etc.

2017-08-07 Thread Ben Goertzel
I don't understand the proposed semantics of AndMemberLink, could you explain?



On Sat, Aug 5, 2017 at 1:07 AM, Michael Duncan  wrote:
> i actually think an AndLink-like semantics better fits biochemical pathways
> at a computationally tractable level than partitions in that below the level
> of a whole organism, where one pathway ends and another begins is largely
> arbitrary.  also,  if one link is missing then the whole thing doesn't work
> but the last bit of a dead end might be the start of another path that goes
> to the same place, more like words and phrases that can be rearranged and
> swapped in different ways to say the same thing.  linus idea of
> AndMemberLinks and OrMemeberLinks would get around the size limitation and
> also seem like they would be useful for reasoning on moses models.
>
> On Monday, July 31, 2017 at 5:55:16 PM UTC-4, linas wrote:
>>
>> Hi Ben, Mike,
>>
>>
>> On Fri, Jul 21, 2017 at 9:41 PM, Ben Goertzel  wrote:
>>>
>>> Some interesting representational issues have come up in the context
>>> of Atomspace representation of pathways, which appear to have more
>>> general implications…
>>>
>>> It seems the semantics we want for a biological pathway is sort of
>>> like “the pathway P is a set of relationships R1, R2, …, R20” in kinda
>>> the same sense that “the human body is a set of organs: brain, heart,
>>> lungs, legs, etc.”
>>>
>>> First of all it seems what we have here is a part of relationship… maybe
>>> we want
>>>
>>> PartLink
>>> ConceptNode “heart”
>>> ConceptNode “human-body”
>>>
>>> and
>>>
>>> PartLink
>>> >relationship<
>>> >pathway<
>>>
>>> PartLink and PartOfLink have come and gone in
>>> OpenCog/Novamente/Webmind history...
>>>
>>> An argument that PartLink should have fundamental status and a
>>> well-defined fuzzy truth value is given in this paper:
>>>
>>> https://www.academia.edu/1016959/Fuzzy_mereology
>>>
>>> However what we need for biological pathways and human bodies seems
>>> like a bit more.   We want to say that a human body consists of a
>>> certain set of parts... not just that each of them is a part...  We're
>>> doing a decomposition.
>>>
>>> One way to do this would be
>>>
>>> PartitionLink
>>>ConceptNode “human-body”
>>>ListLink
>>>   ConceptNode “legs”
>>>   ConceptNode “arms”
>>>   ConceptNode “brain”
>>>   etc.
>>>
>>> Relatedly, we could also have
>>
>>
>> As mentioned earlier, there are several problems with this format.  One is
>> the "oops I forgot to mention xyz in the list" or "gosh I should have left
>> out pqr" and this becomes a big problem:  you have to delete the
>> PartitionLink, delete the ListLink, create a new list and partition.  In the
>> meanwhile, some other subsystem might be holding a handle to the old,
>> now-wrong PartitionLink, and there is no effective way of announcing "hey
>> stop using that old thing, get my new thing now".
>>
>> A second problem is that the above doesn't have anywhere to hang addtional
>> data: e.g. "legs are a big part of the human body, having a mas of nearly
>> half of the body." You can't just slap that on as a (truth)value, cause
>> there's no where  to put that value.
>>
>> Third problem is that large list-links are hard to handle in the pattern
>> matcher. Its much much harder to write a query of the form  "find me all
>> values of $X where
>>
>> PartitionLink
>>ConceptNode “human-body”
>>ListLink
>>   ConceptNode “legs”
>>   VariableNode  “$X”
>>   ConceptNode “brain”
>>
>> because, ... well the ListLink is an ordrerd link, not an unordered link.
>> If you forget to include the pqr (added above) then the search will fail.
>> You could try to use unordered links and globnodes, but these lead to other
>> difficulties, including the n! possible permutations of an unordered link
>> become large n-factorial large when the unordered link has n items in it.
>> Recall that old factorial-70 trick used to make calculators overflow.
>>
>> In general, any link with more than 3 or 4 or 5 items in it is bad news.
>> This is a generic statement about knowledge representation in opencog.
>>
>>
>>> OverlappingPartitionLink
>>> C
>>> L
>>>
>>> if we want to encompass cases where the partition elements in L can
>>> overlap; or
>>>
>>> CoveringLink
>>> C
>>> L
>>>
>>> if we want to encompass cases where the partition elements in L can
>>> overlap, AND the elements in L may encompass some stuff that’s not in
>>> C
>>>
>>> For the pathway case, we could then say
>>>
>>> PartitionLink
>>> ConceptNode “Krebs cycle”
>>> ListLink
>>> >relationship 1<
>>> >relationship 2<
>>> etc.
>>>
>>>
>>> Now this solves the semantics problem but doesn’t solve the problem of
>>> having a long ListLink….  A biological pathway might have 100s or
>>> 1000s of relationships in it, and we don't usually want to make lists
>>> that big in the Atomspace...
>>>
>>> To solve this we 

Re: [opencog-dev] PartitionLink, biological pathways, human bodies, etc.

2017-08-05 Thread Linas Vepstas
On Fri, Aug 4, 2017 at 3:07 AM, Nil Geisweiller 
wrote:

> On 08/03/2017 10:06 AM, Linas Vepstas wrote:
>
>> There's also a problem of editing: what if, half-way through, you want to
>> change the partition? Can you? should you? should users instead be told
>> that a partition, once-created, is immutable, so you can only create and
>> destroy them?
>>
>
> But isn't the same true for almost any link?
>

No. I think you're missing the point. Equivalence is normally between pairs
of things, and that is very manageable.  You can say a=b and say b=c and
then later change your mind about b=c without affecting a=b at all.  That
is very different than saying {a,b,c} is an equivalence-set.

That is, the atomspace is optimized for relations between pairs of things,
or maybe triples. quadruple-relations are very rare.  By contrast, sets
with hundreds or thousands or millions of members are not uncommon.

We are not the first to deal with this.  So both SQL and no noSQL are  are
both very explicitly be a "relational algebras", and are very explicitly
not "set theories". In SQL, the table forms a "set", and it is very easy to
add/remove rows in that set. A single row is a relation.  The table of
employees has one row per employee. It does NOT have all of the employees
jammed into one big giant arbitrary-length row.


>
> (Equivalence (stv 1 1) A (Or B C))
> (And (stv 0 1) B C)
>

Both AndLink and OrLink are set-like in their behavior, and this is a
problem.  They are not relational, as currently defined.

In SQL, And and Or's are handled between rows, (as inner/outer joins) and
not within the same row.


>
> is immutable too, and could be equivalent to
>
> (Partition (stv 1 1) A (Set B C))
>
> saying that A is partitioned into block B and C.
>
>
>> Do you truly need a partition link? I mean -  I invent new link types all
>> the time, since that's usually pretty cheap. But I also do not expect my
>> new link types to work with PLN. In this case, don't you want pln interop?
>>
>
> I agree about not creating new links up the wazzoo, it must be carefully
> thought. However, you don't necessarily need to upgrade PLN to reason on
> new links, if you can express the semantics of a new link as a combination
> of old links, all you need is to write a higher order fact such as
>
> EquivalenceScope (stv 1 1)
>   $A $B $C
>   Partition $A (Set $B $C)
>   And
> Equivalence $A (Or $B $C)
> And $B $C
>
> to enable PLN to reason about it.
>

I don't want to argue about it here, but I think that turning everything
explicitly into a scope link is a minor mistake.  I think it's just fine to
have scoping be implicit.  We don't need to invent a brand new
BlahScopeLink for each and every BlahLink.   Just pretend that BlahLink is
a BlahScopeLink with zero variables. That's all. Don't special-case zero
variables as being different from more-than-zero variables.

--linas

>
> Nil
>
>
>> An alternate way of thinking about partitions is as "coloring". Pick a
>> set, pick N colors, and then insist that every member of the set must be
>> colored with one of the N colors.  Then coloring is a lot like
>> partitioning. e.g.
>>
>> ColorLink
>>ColorNode "Red"
>>SomeAtom
>>
>> or maybe
>>
>> EvaluationLink
>>   ColorNode "red"
>>   SomeAtom
>>
>>
>> Color names could, of course, be anything: e.g. the names of the
>> partitions.
>>
>> In one sense, colorings are identical to partitions; on the other hand,
>> they can feel "more general" because you can insist or demand that certain
>> properties of colorings hold, e.g. ramsey theory and reverse mathematics.
>>
>> You could *force* aka gaurantee uniqueness of color assignment by using a
>> StateLink:
>>
>> StateLink
>>   Some Atom
>>   ColorNode "red"
>>
>> The atomspace automatically gaurantees that one and only one color can be
>> assigned. (although it can be changed)  The UniqueLink allows only one
>> assignment, and it cannot be changed.  These are nice, because they help
>> avoid programmer error. by offering automatic guarantees.
>>
>> You don't have to use atoms for this, either. You could use values.
>>  Recall, values are almost just like atoms, except that you can't put them
>> into the atomspace, and you cannot pattern-match or patttern-mine them.
>>  But you can store color or partition data in values, if you wanted to.
>> Note that values *can* hold atoms!  There is a LinkValue that is like a
>> link, but it can hold atoms or values or a mixture of both.
>>
>> --linas
>>
>>
>>
>> This
>> semantics is implicit in PartitionNode, whereas if you just use
>> MemberLink you'd need to spell out this "partition" semantics using a
>> bunch of AndLinks each time...
>>
>> As a world-class advocate of the partition function I think you may
>> like PartitionNode after you reflect on it infinitesimally more...
>>
>> -- ben
>>
>> On Tue, Aug 1, 2017 at 5:54 AM, Linas Vepstas
>> 

Re: [opencog-dev] PartitionLink, biological pathways, human bodies, etc.

2017-08-04 Thread Michael Duncan
i actually think an AndLink-like semantics better fits biochemical pathways 
at a computationally tractable level than partitions in that below the 
level of a whole organism, where one pathway ends and another begins is 
largely arbitrary.  also,  if one link is missing then the whole thing 
doesn't work but the last bit of a dead end might be the start of another 
path that goes to the same place, more like words and phrases that can be 
rearranged and swapped in different ways to say the same thing.  linus idea 
of AndMemberLinks and OrMemeberLinks would get around the size limitation 
and also seem like they would be useful for reasoning on moses models.

On Monday, July 31, 2017 at 5:55:16 PM UTC-4, linas wrote:
>
> Hi Ben, Mike,
>
> On Fri, Jul 21, 2017 at 9:41 PM, Ben Goertzel  > wrote:
>
>> Some interesting representational issues have come up in the context
>> of Atomspace representation of pathways, which appear to have more
>> general implications…
>>
>> It seems the semantics we want for a biological pathway is sort of
>> like “the pathway P is a set of relationships R1, R2, …, R20” in kinda
>> the same sense that “the human body is a set of organs: brain, heart,
>> lungs, legs, etc.”
>>
>> First of all it seems what we have here is a part of relationship… maybe 
>> we want
>>
>> PartLink
>> ConceptNode “heart”
>> ConceptNode “human-body”
>>
>> and
>>
>> PartLink
>> >relationship<
>> >pathway<
>>
>> PartLink and PartOfLink have come and gone in
>> OpenCog/Novamente/Webmind history...
>>
>> An argument that PartLink should have fundamental status and a
>> well-defined fuzzy truth value is given in this paper:
>>
>> https://www.academia.edu/1016959/Fuzzy_mereology
>>
>> However what we need for biological pathways and human bodies seems
>> like a bit more.   We want to say that a human body consists of a
>> certain set of parts... not just that each of them is a part...  We're
>> doing a decomposition.
>>
>> One way to do this would be
>>
>> PartitionLink
>>ConceptNode “human-body”
>>ListLink
>>   ConceptNode “legs”
>>   ConceptNode “arms”
>>   ConceptNode “brain”
>>   etc.
>>
>> Relatedly, we could also have
>>
>
> As mentioned earlier, there are several problems with this format.  One is 
> the "oops I forgot to mention xyz in the list" or "gosh I should have left 
> out pqr" and this becomes a big problem:  you have to delete the 
> PartitionLink, delete the ListLink, create a new list and partition.  In 
> the meanwhile, some other subsystem might be holding a handle to the old, 
> now-wrong PartitionLink, and there is no effective way of announcing "hey 
> stop using that old thing, get my new thing now".
>
> A second problem is that the above doesn't have anywhere to hang addtional 
> data: e.g. "legs are a big part of the human body, having a mas of nearly 
> half of the body." You can't just slap that on as a (truth)value, cause 
> there's no where  to put that value.
>
> Third problem is that large list-links are hard to handle in the pattern 
> matcher. Its much much harder to write a query of the form  "find me all 
> values of $X where
>
> PartitionLink
>ConceptNode “human-body”
>ListLink
>   ConceptNode “legs”
>   VariableNode  “$X”
>   ConceptNode “brain”
>
> because, ... well the ListLink is an ordrerd link, not an unordered link. 
> If you forget to include the pqr (added above) then the search will fail. 
> You could try to use unordered links and globnodes, but these lead to other 
> difficulties, including the n! possible permutations of an unordered link 
> become large n-factorial large when the unordered link has n items in it.   
> Recall that old factorial-70 trick used to make calculators overflow.
>
> In general, any link with more than 3 or 4 or 5 items in it is bad news. 
> This is a generic statement about knowledge representation in opencog.
>
>
> OverlappingPartitionLink
>> C
>> L
>>
>> if we want to encompass cases where the partition elements in L can 
>> overlap; or
>>
>> CoveringLink
>> C
>> L
>>
>> if we want to encompass cases where the partition elements in L can
>> overlap, AND the elements in L may encompass some stuff that’s not in
>> C
>>
>> For the pathway case, we could then say
>>
>> PartitionLink
>> ConceptNode “Krebs cycle”
>> ListLink
>> >relationship 1<
>> >relationship 2<
>> etc.
>>
>>
>> Now this solves the semantics problem but doesn’t solve the problem of
>> having a long ListLink….  A biological pathway might have 100s or
>> 1000s of relationships in it, and we don't usually want to make lists
>> that big in the Atomspace...
>>
>> To solve this we could do something like (for the human body case)
>>
>> PartitionLink
>>ConceptNode “human-body”
>>PartitionNode “body-partition-1”
>>
>> PartitionElementLink
>>PartitionNode “body-partition-1"
>>ConceptNode “legs”
>>
>> PartitionElementLink
>>

Re: [opencog-dev] PartitionLink, biological pathways, human bodies, etc.

2017-08-04 Thread 'Nil Geisweiller' via opencog

On 08/03/2017 10:06 AM, Linas Vepstas wrote:
There's also a problem of editing: what if, half-way through, you want 
to change the partition? Can you? should you? should users instead be 
told that a partition, once-created, is immutable, so you can only 
create and destroy them?


But isn't the same true for almost any link?

(Equivalence (stv 1 1) A (Or B C))
(And (stv 0 1) B C)

is immutable too, and could be equivalent to

(Partition (stv 1 1) A (Set B C))

saying that A is partitioned into block B and C.



Do you truly need a partition link? I mean -  I invent new link types 
all the time, since that's usually pretty cheap. But I also do not 
expect my new link types to work with PLN. In this case, don't you want 
pln interop?


I agree about not creating new links up the wazzoo, it must be carefully 
thought. However, you don't necessarily need to upgrade PLN to reason on 
new links, if you can express the semantics of a new link as a 
combination of old links, all you need is to write a higher order fact 
such as


EquivalenceScope (stv 1 1)
  $A $B $C
  Partition $A (Set $B $C)
  And
Equivalence $A (Or $B $C)
And $B $C

to enable PLN to reason about it.

Nil



An alternate way of thinking about partitions is as "coloring". Pick a 
set, pick N colors, and then insist that every member of the set must be 
colored with one of the N colors.  Then coloring is a lot like 
partitioning. e.g.


ColorLink
   ColorNode "Red"
   SomeAtom

or maybe

EvaluationLink
  ColorNode "red"
  SomeAtom


Color names could, of course, be anything: e.g. the names of the 
partitions.


In one sense, colorings are identical to partitions; on the other hand, 
they can feel "more general" because you can insist or demand that 
certain properties of colorings hold, e.g. ramsey theory and reverse 
mathematics.


You could *force* aka gaurantee uniqueness of color assignment by using 
a StateLink:


StateLink
  Some Atom
  ColorNode "red"

The atomspace automatically gaurantees that one and only one color can 
be assigned. (although it can be changed)  The UniqueLink allows only 
one assignment, and it cannot be changed.  These are nice, because they 
help avoid programmer error. by offering automatic guarantees.


You don't have to use atoms for this, either. You could use values.   
Recall, values are almost just like atoms, except that you can't put 
them into the atomspace, and you cannot pattern-match or patttern-mine 
them.   But you can store color or partition data in values, if you 
wanted to.  Note that values *can* hold atoms!  There is a LinkValue 
that is like a link, but it can hold atoms or values or a mixture of both.


--linas



This
semantics is implicit in PartitionNode, whereas if you just use
MemberLink you'd need to spell out this "partition" semantics using a
bunch of AndLinks each time...

As a world-class advocate of the partition function I think you may
like PartitionNode after you reflect on it infinitesimally more...

-- ben

On Tue, Aug 1, 2017 at 5:54 AM, Linas Vepstas
> wrote:
 > Hi Ben, Mike,
 >
 > On Fri, Jul 21, 2017 at 9:41 PM, Ben Goertzel > wrote:
 >>
 >> Some interesting representational issues have come up in the context
 >> of Atomspace representation of pathways, which appear to have more
 >> general implications…
 >>
 >> It seems the semantics we want for a biological pathway is sort of
 >> like “the pathway P is a set of relationships R1, R2, …, R20” in
kinda
 >> the same sense that “the human body is a set of organs: brain,
heart,
 >> lungs, legs, etc.”
 >>
 >> First of all it seems what we have here is a part of
relationship… maybe
 >> we want
 >>
 >> PartLink
 >> ConceptNode “heart”
 >> ConceptNode “human-body”
 >>
 >> and
 >>
 >> PartLink
 >> >relationship<
 >> >pathway<
 >>
 >> PartLink and PartOfLink have come and gone in
 >> OpenCog/Novamente/Webmind history...
 >>
 >> An argument that PartLink should have fundamental status and a
 >> well-defined fuzzy truth value is given in this paper:
 >>
 >> https://www.academia.edu/1016959/Fuzzy_mereology

 >>
 >> However what we need for biological pathways and human bodies seems
 >> like a bit more.   We want to say that a human body consists of a
 >> certain set of parts... not just that each of them is a part... 
We're

 >> doing a decomposition.
 >>
 >> One way to do this would be
 >>
 >> PartitionLink
 >>ConceptNode “human-body”
 >>ListLink
 >>   ConceptNode “legs”
 >>   ConceptNode “arms”
 >>   ConceptNode “brain”
 >>   etc.
 >>
 >> Relatedly, we could 

Re: [opencog-dev] PartitionLink, biological pathways, human bodies, etc.

2017-08-03 Thread Linas Vepstas
On Tue, Aug 1, 2017 at 1:24 AM, Ben Goertzel  wrote:

> Hi Linas,
>
> The difference between PartitionLink and MemberLink is pretty obvious,
> right?


Not to me ... I realize now that perhaps you mean "SubSetLink" and I
thought we had one of those, but perhaps it has different semantics.  See
below.



>  A PartitionNode defines a partition of the set denoted by a
> ConceptNode.  The partition elements that are linked to the
> PartitionNode by a PartitionLink can of course also be linked via a
> MemberLink to the ConceptNode that corresponds to the PartitionNode.
> However, the unique semantics of a partition is that of mutual
> exclusivity and completeness, i.e. the intersection between two
> distinct elements of the partition is null, and the union of the
> elements of the partition is the set being partitioned.


OK. well .. where, exactly, does my hip end, and my body start?

In intro-to-diff-geom there is a concept of "partition of unity" which is a
collection of functions that sum up to one. and  each one individually
smoothly interpolates between zero and one. They indicate a general area.
They do NOT have a null intersection -- they can have a big huge sloppy
intersection, but that works just fine because they have derivatives that
cancel out (because the derivative of one is zero).

Practically, a problem with partitions is, what do you do if you forget to
specify one of the parititions? should one assume that the unspecified part
is "everything else?"

There's also a problem of editing: what if, half-way through, you want to
change the partition? Can you? should you? should users instead be told
that a partition, once-created, is immutable, so you can only create and
destroy them?

Do you truly need a partition link? I mean -  I invent new link types all
the time, since that's usually pretty cheap. But I also do not expect my
new link types to work with PLN. In this case, don't you want pln interop?

An alternate way of thinking about partitions is as "coloring". Pick a set,
pick N colors, and then insist that every member of the set must be colored
with one of the N colors.  Then coloring is a lot like partitioning. e.g.

ColorLink
  ColorNode "Red"
  SomeAtom

or maybe

EvaluationLink
 ColorNode "red"
 SomeAtom


Color names could, of course, be anything: e.g. the names of the
partitions.

In one sense, colorings are identical to partitions; on the other hand,
they can feel "more general" because you can insist or demand that certain
properties of colorings hold, e.g. ramsey theory and reverse mathematics.

You could *force* aka gaurantee uniqueness of color assignment by using a
StateLink:

StateLink
 Some Atom
 ColorNode "red"

The atomspace automatically gaurantees that one and only one color can be
assigned. (although it can be changed)  The UniqueLink allows only one
assignment, and it cannot be changed.  These are nice, because they help
avoid programmer error. by offering automatic guarantees.

You don't have to use atoms for this, either. You could use values.
Recall, values are almost just like atoms, except that you can't put them
into the atomspace, and you cannot pattern-match or patttern-mine them.
But you can store color or partition data in values, if you wanted to.
Note that values *can* hold atoms!  There is a LinkValue that is like a
link, but it can hold atoms or values or a mixture of both.

--linas





> This
> semantics is implicit in PartitionNode, whereas if you just use
> MemberLink you'd need to spell out this "partition" semantics using a
> bunch of AndLinks each time...
>
> As a world-class advocate of the partition function I think you may
> like PartitionNode after you reflect on it infinitesimally more...
>
> -- ben
>
> On Tue, Aug 1, 2017 at 5:54 AM, Linas Vepstas 
> wrote:
> > Hi Ben, Mike,
> >
> > On Fri, Jul 21, 2017 at 9:41 PM, Ben Goertzel  wrote:
> >>
> >> Some interesting representational issues have come up in the context
> >> of Atomspace representation of pathways, which appear to have more
> >> general implications…
> >>
> >> It seems the semantics we want for a biological pathway is sort of
> >> like “the pathway P is a set of relationships R1, R2, …, R20” in kinda
> >> the same sense that “the human body is a set of organs: brain, heart,
> >> lungs, legs, etc.”
> >>
> >> First of all it seems what we have here is a part of relationship… maybe
> >> we want
> >>
> >> PartLink
> >> ConceptNode “heart”
> >> ConceptNode “human-body”
> >>
> >> and
> >>
> >> PartLink
> >> >relationship<
> >> >pathway<
> >>
> >> PartLink and PartOfLink have come and gone in
> >> OpenCog/Novamente/Webmind history...
> >>
> >> An argument that PartLink should have fundamental status and a
> >> well-defined fuzzy truth value is given in this paper:
> >>
> >> https://www.academia.edu/1016959/Fuzzy_mereology
> >>
> >> However what we need for biological pathways and human 

Re: [opencog-dev] PartitionLink, biological pathways, human bodies, etc.

2017-08-01 Thread Ben Goertzel
Hi Linas,

The difference between PartitionLink and MemberLink is pretty obvious,
right?   A PartitionNode defines a partition of the set denoted by a
ConceptNode.  The partition elements that are linked to the
PartitionNode by a PartitionLink can of course also be linked via a
MemberLink to the ConceptNode that corresponds to the PartitionNode.
However, the unique semantics of a partition is that of mutual
exclusivity and completeness, i.e. the intersection between two
distinct elements of the partition is null, and the union of the
elements of the partition is the set being partitioned.   This
semantics is implicit in PartitionNode, whereas if you just use
MemberLink you'd need to spell out this "partition" semantics using a
bunch of AndLinks each time...

As a world-class advocate of the partition function I think you may
like PartitionNode after you reflect on it infinitesimally more...

-- ben

On Tue, Aug 1, 2017 at 5:54 AM, Linas Vepstas  wrote:
> Hi Ben, Mike,
>
> On Fri, Jul 21, 2017 at 9:41 PM, Ben Goertzel  wrote:
>>
>> Some interesting representational issues have come up in the context
>> of Atomspace representation of pathways, which appear to have more
>> general implications…
>>
>> It seems the semantics we want for a biological pathway is sort of
>> like “the pathway P is a set of relationships R1, R2, …, R20” in kinda
>> the same sense that “the human body is a set of organs: brain, heart,
>> lungs, legs, etc.”
>>
>> First of all it seems what we have here is a part of relationship… maybe
>> we want
>>
>> PartLink
>> ConceptNode “heart”
>> ConceptNode “human-body”
>>
>> and
>>
>> PartLink
>> >relationship<
>> >pathway<
>>
>> PartLink and PartOfLink have come and gone in
>> OpenCog/Novamente/Webmind history...
>>
>> An argument that PartLink should have fundamental status and a
>> well-defined fuzzy truth value is given in this paper:
>>
>> https://www.academia.edu/1016959/Fuzzy_mereology
>>
>> However what we need for biological pathways and human bodies seems
>> like a bit more.   We want to say that a human body consists of a
>> certain set of parts... not just that each of them is a part...  We're
>> doing a decomposition.
>>
>> One way to do this would be
>>
>> PartitionLink
>>ConceptNode “human-body”
>>ListLink
>>   ConceptNode “legs”
>>   ConceptNode “arms”
>>   ConceptNode “brain”
>>   etc.
>>
>> Relatedly, we could also have
>
>
> As mentioned earlier, there are several problems with this format.  One is
> the "oops I forgot to mention xyz in the list" or "gosh I should have left
> out pqr" and this becomes a big problem:  you have to delete the
> PartitionLink, delete the ListLink, create a new list and partition.  In the
> meanwhile, some other subsystem might be holding a handle to the old,
> now-wrong PartitionLink, and there is no effective way of announcing "hey
> stop using that old thing, get my new thing now".
>
> A second problem is that the above doesn't have anywhere to hang addtional
> data: e.g. "legs are a big part of the human body, having a mas of nearly
> half of the body." You can't just slap that on as a (truth)value, cause
> there's no where  to put that value.
>
> Third problem is that large list-links are hard to handle in the pattern
> matcher. Its much much harder to write a query of the form  "find me all
> values of $X where
>
> PartitionLink
>ConceptNode “human-body”
>ListLink
>   ConceptNode “legs”
>   VariableNode  “$X”
>   ConceptNode “brain”
>
> because, ... well the ListLink is an ordrerd link, not an unordered link. If
> you forget to include the pqr (added above) then the search will fail. You
> could try to use unordered links and globnodes, but these lead to other
> difficulties, including the n! possible permutations of an unordered link
> become large n-factorial large when the unordered link has n items in it.
> Recall that old factorial-70 trick used to make calculators overflow.
>
> In general, any link with more than 3 or 4 or 5 items in it is bad news.
> This is a generic statement about knowledge representation in opencog.
>
>
>> OverlappingPartitionLink
>> C
>> L
>>
>> if we want to encompass cases where the partition elements in L can
>> overlap; or
>>
>> CoveringLink
>> C
>> L
>>
>> if we want to encompass cases where the partition elements in L can
>> overlap, AND the elements in L may encompass some stuff that’s not in
>> C
>>
>> For the pathway case, we could then say
>>
>> PartitionLink
>> ConceptNode “Krebs cycle”
>> ListLink
>> >relationship 1<
>> >relationship 2<
>> etc.
>>
>>
>> Now this solves the semantics problem but doesn’t solve the problem of
>> having a long ListLink….  A biological pathway might have 100s or
>> 1000s of relationships in it, and we don't usually want to make lists
>> that big in the Atomspace...
>>
>> To solve this we could do something like (for the 

[opencog-dev] PartitionLink, biological pathways, human bodies, etc.

2017-07-21 Thread Ben Goertzel
Some interesting representational issues have come up in the context
of Atomspace representation of pathways, which appear to have more
general implications…

It seems the semantics we want for a biological pathway is sort of
like “the pathway P is a set of relationships R1, R2, …, R20” in kinda
the same sense that “the human body is a set of organs: brain, heart,
lungs, legs, etc.”

First of all it seems what we have here is a part of relationship… maybe we want

PartLink
ConceptNode “heart”
ConceptNode “human-body”

and

PartLink
>relationship<
>pathway<

PartLink and PartOfLink have come and gone in
OpenCog/Novamente/Webmind history...

An argument that PartLink should have fundamental status and a
well-defined fuzzy truth value is given in this paper:

https://www.academia.edu/1016959/Fuzzy_mereology

However what we need for biological pathways and human bodies seems
like a bit more.   We want to say that a human body consists of a
certain set of parts... not just that each of them is a part...  We're
doing a decomposition.

One way to do this would be

PartitionLink
   ConceptNode “human-body”
   ListLink
  ConceptNode “legs”
  ConceptNode “arms”
  ConceptNode “brain”
  etc.

Relatedly, we could also have

OverlappingPartitionLink
C
L

if we want to encompass cases where the partition elements in L can overlap; or

CoveringLink
C
L

if we want to encompass cases where the partition elements in L can
overlap, AND the elements in L may encompass some stuff that’s not in
C

For the pathway case, we could then say

PartitionLink
ConceptNode “Krebs cycle”
ListLink
>relationship 1<
>relationship 2<
etc.


Now this solves the semantics problem but doesn’t solve the problem of
having a long ListLink….  A biological pathway might have 100s or
1000s of relationships in it, and we don't usually want to make lists
that big in the Atomspace...

To solve this we could do something like (for the human body case)

PartitionLink
   ConceptNode “human-body”
   PartitionNode “body-partition-1”

PartitionElementLink
   PartitionNode “body-partition-1"
   ConceptNode “legs”

PartitionElementLink
   PartitionNode “body-partition-1"
   ConceptNode “arms”

etc.

and similarly (for the biological pathway case)

PartitionLink
ConceptNode “Krebs cycle”
PartitionNode “krebs-partition-1”

PartitionElementLink
PartitionNode “krebs-partition-1"
>relationship 1<

PartitionElementLink
PartitionNode “krebs-partition-1”
>relationship 2<

...

There could be some nice truth value math regarding these, e.g. we
could introduce Ellerman's "logical entropy" which is really a
partition entropy.   There are also connections with some recent
theoretical work I've been doing on "graphtropy" (using "distinction
graphs" that generalize partitions), which I'll post a paper on
sometime in the next week or two   But that will be another email
for another day...

-- Ben


-- 
Ben Goertzel, PhD
http://goertzel.org

"I am God! I am nothing, I'm play, I am freedom, I am life. I am the
boundary, I am the peak." -- Alexander Scriabin

-- 
You received this message because you are subscribed to the Google Groups 
"opencog" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to opencog+unsubscr...@googlegroups.com.
To post to this group, send email to opencog@googlegroups.com.
Visit this group at https://groups.google.com/group/opencog.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/opencog/CACYTDBc9FL65o_jqVjwzypebVdHj1Z%2BpRy2qreHyxrLp6RWvpw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.