3 Mar 2010 18:51

### Syntax question

Hi,

Its not readily apparent from the PowerLoom documentation how to interpret :=>>.  Enlightenment would be very much appreciated.

Thanks,
Cameron.

```_______________________________________________
powerloom-forum mailing list
powerloom-forum <at> isi.edu
http://mailman.isi.edu/mailman/listinfo/powerloom-forum
```
3 Mar 2010 20:15

### Re: Syntax question

```
On Mar 3, 2010, at 9:51 AM, Cameron Ross wrote:

> Hi,
>
> Its not readily apparent from the PowerLoom documentation how to
> interpret :=>>.  Enlightenment would be very much appreciated.

The extra > on the arrow heads are used for inference direction control.

Normally, with a rule like

(A ?x)  :=> (B ?x)

PowerLoom is free to run this rule either in a forward direction or a
backward direction.  Running it forward means that if we assert (A
i-1) then we immediately conclude (B i-1).  Running backward means
that if we are trying to prove (B i-1) or find (B ?x) then we look to
see if (A i-1) is already known.

When extra arrow heads are used, this tells PowerLoom the desired
direction of the rule, so that

(A ?x)  :=>>  (B ?x)

will be run only in the forward direction.  This gives some additional
inference control and affects both what will be inferred as well as
the performance of the reasoner.
```
4 Mar 2010 19:36

### Re: Syntax question

Thanks Thomas,

Based on your response I could probably infer what the following mean as well.  However, perhaps you could provide a brief synopsis for precision and clarity.

:<=
:=>
:<<=
:<=>
:<=>>
:<<=>
:<<=>>

Thanks much,
Cameron.

On Wed, Mar 3, 2010 at 2:15 PM, Thomas Russ wrote:

On Mar 3, 2010, at 9:51 AM, Cameron Ross wrote:

Hi,

Its not readily apparent from the PowerLoom documentation how to interpret :=>>.  Enlightenment would be very much appreciated.

The extra > on the arrow heads are used for inference direction control.

Normally, with a rule like

(A ?x)  :=> (B ?x)

PowerLoom is free to run this rule either in a forward direction or a backward direction.  Running it forward means that if we assert (A i-1) then we immediately conclude (B i-1).  Running backward means that if we are trying to prove (B i-1) or find (B ?x) then we look to see if (A i-1) is already known.

When extra arrow heads are used, this tells PowerLoom the desired direction of the rule, so that

(A ?x)  :=>>  (B ?x)

will be run only in the forward direction.  This gives some additional inference control and affects both what will be inferred as well as the performance of the reasoner.

--
Cameron Ross
Kojeware Corporation
705-929-1492
```_______________________________________________
powerloom-forum mailing list
powerloom-forum <at> isi.edu
http://mailman.isi.edu/mailman/listinfo/powerloom-forum
```
4 Mar 2010 22:19

### Semantics of instance-of

Hi,

I'm trying to understand the semantics of PowerLoom's instance-of relation.  Sepcifically, I'd like to know the difference between asserting an instance of a concept using the unary concept relation and using the binary instance-of relation.  PowerLoom appears to treat the two differently as demonstrated by the following session transcript:

PL-USER |= (defconcept Person)
|c|PERSON

PL-USER |= (assert (Person Sam))
|P|(PERSON SAM)

PL-USER |= (ask (Person Sam))
TRUE

PL-USER |= (assert (instance-of Sally Person))
|P|(INSTANCE-OF SALLY PERSON)

PL-USER |= (ask (instance-of Sally Person))
TRUE

PL-USER |= (ask (Person Sally))
UNKNOWN

Cheers,
Cameron.
```_______________________________________________
powerloom-forum mailing list
powerloom-forum <at> isi.edu
http://mailman.isi.edu/mailman/listinfo/powerloom-forum
```
5 Mar 2010 18:19

### Re: Syntax question

```I have no idea why I am getting messages from this forum.  Please get me
off this list.

Les Morgan

Growth House, Inc.

http://www.growthhouse.org

415-863-3045

"You must be the change you wish to see in the world."

-- Mahatma Gandhi

-------- Original Message --------
> From: "Cameron Ross" <cross <at> kojeware.com>
> Sent: Thursday, March 04, 2010 10:55 AM
> To: "Thomas Russ" <tar <at> ISI.EDU>
> Subject: Re: [PowerLoom Forum] Syntax question
>
> Thanks Thomas,
>
> Based on your response I could probably infer what the following mean as
> well.  However, perhaps you could provide a brief synopsis for precision
and
> clarity.
>
> :<=
> :=>
> :<<=
> :<=>
> :<=>>
> :<<=>
> :<<=>>
>
> Thanks much,
> Cameron.
>
>
> On Wed, Mar 3, 2010 at 2:15 PM, Thomas Russ <tar <at> isi.edu> wrote:
>
> >
> > On Mar 3, 2010, at 9:51 AM, Cameron Ross wrote:
> >
> >  Hi,
> >>
> >> Its not readily apparent from the PowerLoom documentation how to
interpret
> >> :=>>.  Enlightenment would be very much appreciated.
> >>
> >
> > The extra > on the arrow heads are used for inference direction
control.
> >
> > Normally, with a rule like
> >
> >   (A ?x)  :=> (B ?x)
> >
> > PowerLoom is free to run this rule either in a forward direction or a
> > backward direction.  Running it forward means that if we assert (A i-1)
then
> > we immediately conclude (B i-1).  Running backward means that if we
are
> > trying to prove (B i-1) or find (B ?x) then we look to see if (A i-1)
is
> > already known.
> >
> > When extra arrow heads are used, this tells PowerLoom the desired
direction
> > of the rule, so that
> >
> >  (A ?x)  :=>>  (B ?x)
> >
> > will be run only in the forward direction.  This gives some additional
> > inference control and affects both what will be inferred as well as
the
> > performance of the reasoner.
> >
> >
> >
>
>
> --
> Cameron Ross
> Kojeware Corporation
> 705-929-1492
>
> _______________________________________________
> powerloom-forum mailing list
> powerloom-forum <at> isi.edu
> http://mailman.isi.edu/mailman/listinfo/powerloom-forum
```
25 Mar 2010 15:29

### Powerloom, a first stab...

Hi there,

I'm currently evaluating powerloom for research in the context of an agent platform.

I've read through all documentation of powerloom so far and I think it's certainly powerful enough
to use it for our purposes, certainly for all the standard logic.
I do have a question however on producing solutions and alternatives. The only recursion
example I found in Powerloom used transitivity rules (parent/ancestor example and the RCC8 KB).
Unfortunately, my problem cannot be used with transitivity.

The problem I have is:

- Someone states input need X.
- Programs provide one single output
- In order to produce the output, a program may have 0-n input needs, which need to be resolved
with outputs from other programs.
- Those programs providing these outputs in their turn may have 0-n input needs themselves.

The required output is a list of acceptable solutions that, in their combination, can provide
the output. I imagine that the only way to do this properly is through recursion somehow.
I do however have two alternatives there:
- I can do this in Java and just maintain the tree myself
- I may be able to rely on Powerloom to produce these alternatives, but I don't know what to look for.
(many instances of programs may exist, so including a similar instance is actually a different solution).

So that's the question basically. Can powerloom produce a list of entities that together form the solution,
based on some constraints that are set on the production of this list and present each acceptable, but minimal
solution individually? I'm not asking for a piece of code, just what I need to look for to realize this.

Rgds,

G>

Hotmail is redefining busy with tools for the New Busy. Get more from your inbox. Sign up now.
```_______________________________________________
powerloom-forum mailing list
powerloom-forum <at> isi.edu
http://mailman.isi.edu/mailman/listinfo/powerloom-forum
```
25 Mar 2010 22:18

### Re: Powerloom, a first stab...

```Gerard,

in principle that should be possible.  Given the right logical
descriptions of your programs which can make use of recursive rules,
PowerLoom should be able to enumerate all solutions for a particular
output constellation.  There are two issues which I guess are what

(1) If you found a solution such as, for example,
(output ?p/prog-2 ?o1/a-2 ?o2/b-3 ?o3/c-19), you also need to know
what inputs prog-2 needed, how it obtained those, etc.  If you wanted
to do that purely in logic, you basically have to "cons up" some
result structure which you pass along everytime a program is applied
(assuming programs are represented by one or more rules).  That means
"output" predicates would also have an argument that represents all the
inputs required to generate that output.  The way that can be done is
with function terms where the functions are declared as total (look
for example at the append demo).  You can declare a function such as
`input-values' that is total and variable-arguments and in the
antecedent of a rule collect the various values you want to collect
and pass its output to the consequent, and so on.

But that might be a bit messy and requires you to later on parse
complex function terms to get at the information.  Another way would
be to programmatically walk the proof/explanation structure for the
solution and collect all the information from its leaf and rule
application nodes.  This is possible, unfortunately there isn't any
good API support available right now (look towards the end of
logic/justifications.ste for inspiration).  For example, there is a
`consify' method you can apply to a justification object which gives
you a cons-tree representation of the whole proof which you then can
walk fairly easily (even in Java).

(2) minimality: you can do a "retrieve all" and PowerLoom will try to
generate all possible solutions.  If you have some kind of cost
function, you'd compute that cost for each solution and then select
the one with the smallest one (e.g., make the cost an output argument
and do a :sort-by :values in the retrieve).  However, if there is a
potentially large number of solutions, you might want to do something
smarter than that by cutting off partial solutions that can't improve
on what you already have.  That, however, you would have to do in
code.  You might also have more complex subsumption relationships
between solutions which might require a somewhat more sophisticated
approach.

Hope that helps,

Hans

>>>>> Gerard Toonstra <toonstge <at> hotmail.com> writes:

> Hi there,

> I'm currently evaluating powerloom for research in the context of an agent platform.

> I've read through all documentation of powerloom so far and I think it's certainly powerful enough
> to use it for our purposes, certainly for all the standard logic.
> I do have a question however on producing solutions and alternatives. The only recursion
> example I found in Powerloom used transitivity rules (parent/ancestor example and the RCC8 KB).
> Unfortunately, my problem cannot be used with transitivity.

> The problem I have is:

> - Someone states input need X.
> - Programs provide one single output
> - In order to produce the output, a program may have 0-n input needs, which need to be resolved
>   with outputs from other programs.
> - Those programs providing these outputs in their turn may have 0-n input needs themselves.

> The required output is a list of acceptable solutions that, in their combination, can provide
> the output. I imagine that the only way to do this properly is through recursion somehow.
> I do however have two alternatives there:
> - I can do this in Java and just maintain the tree myself
> - I may be able to rely on Powerloom to produce these alternatives, but I don't know what to look for.
>    (many instances of programs may exist, so including a similar instance is actually a different solution).

> So that's the question basically. Can powerloom produce a list of entities that together form the solution,
> based on some constraints that are set on the production of this list and present each acceptable, but
minimal
> solution individually?  I'm not asking for a piece of code, just what I need to look for to realize this.

> Rgds,

G>

> _________________________________________________________________
> Hotmail is redefining busy with tools for the New Busy. Get more from your inbox.
> http://www.windowslive.com/campaign/thenewbusy?ocid=PID27925::T:WLMTAGL:ON:WL:en-US:WM_HMP:032010_2
```
26 Mar 2010 09:51

### Re: Powerloom, a first stab...

Thanks Hans, this has certainly been helpful.

The justifications example certainly looks very complex to me and your second point made
me realize I'd be better off maintaining my own tree in the host code. Then I can choose which
branches to explore based on a number of different algorithms (breadth-first, iterative deepening, best-first, etc.).
I think I'll go down that route for now at least.

Before looking at powerloom, I looked at JSHOP2. JSHOP2 can solve planning problems, but it requires compilation
of the KB and the language is certainly not as rich as powerloom's for the expression of particular relations and so forth.
Is powerloom well suited for planning problems in general? I haven't found any demos or tutorials that
show how it's used for those kinds of problems.

Rgds,

Gerard

> From: hans <at> ISI.EDU
> Date: Thu, 25 Mar 2010 13:18:24 -0800
> To: toonstge <at> hotmail.com
> CC: powerloom-forum <at> ISI.EDU
> Subject: Re: Powerloom, a first stab...

> (2) minimality: you can do a "retrieve all" and PowerLoom will try to
> generate all possible solutions. If you have some kind of cost
> function, you'd compute that cost for each solution and then select
> the one with the smallest one (e.g., make the cost an output argument
> and do a :sort-by :values in the retrieve). However, if there is a
> potentially large number of solutions, you might want to do something
> smarter than that by cutting off partial solutions that can't improve
> on what you already have. That, however, you would have to do in
> code. You might also have more complex subsumption relationships
> between solutions which might require a somewhat more sophisticated
> approach.
>
> Hope that helps,
>
> Hans
>
> >>>>> Gerard Toonstra <toonstge <at> hotmail.com> writes:
>
> > Hi there,
>
> > I'm currently evaluating powerloom for research in the context of an agent platform.
>
> > I've read through all documentation of powerloom so far and I think it's certainly powerful enough
> > to use it for our purposes, certainly for all the standard logic.
> > I do have a question however on producing solutions and alternatives. The only recursion
> > example I found in Powerloom used transitivity rules (parent/ancestor example and the RCC8 KB).
> > Unfortunately, my problem cannot be used with transitivity.
>
> > The problem I have is:
>
> > So that's the question basically. Can powerloom produce a list of entities that together form the solution,
> > based on some constraints that are set on the production of this list and present each acceptable, but minimal
> > solution individually? I'm not asking for a piece of code, just what I need to look for to realize this.
>
> > Rgds,
>
> G>
>
> > _________________________________________________________________
> > Hotmail is redefining busy with tools for the New Busy. Get more from your inbox.
> > http://www.windowslive.com/campaign/thenewbusy?ocid=PID27925::T:WLMTAGL:ON:WL:en-US:WM_HMP:032010_2

The New Busy is not the old busy. Search, chat and e-mail from your inbox. Get started.
```_______________________________________________
powerloom-forum mailing list
powerloom-forum <at> isi.edu
http://mailman.isi.edu/mailman/listinfo/powerloom-forum
```
26 Mar 2010 17:06

### Re: Powerloom, a first stab...

```
On Mar 26, 2010, at 1:51 AM, Gerard Toonstra wrote:

> Before looking at powerloom, I looked at JSHOP2. JSHOP2 can solve
> planning problems, but it requires compilation
> of the KB and the language is certainly not as rich as powerloom's
> for the expression of particular relations and so forth.
> Is powerloom well suited for planning problems in general? I haven't
> found any demos or tutorials that
> show how it's used for those kinds of problems.

I think that you could use PowerLoom as the knowledge and state
repository for a planning system.  We don't have any actual planning
reasoners that work with the PowerLoom representation, although that
is a nice idea to explore.  By and large, planning systems don't
normally use a very rich representation language, often just having a
propositional logic formalism.  So I think you could get some nice
results from using a powerful representation language with its own
inference capabilities along with a planning system.

-Tom.

--
Thomas A. Russ, Ph.D.  Senior Research Scientist             tar <at> isi.edu
USC/Information Sciences Institute               http://www.isi.edu/~tar
4676 Admiralty Way, Marina del Rey, CA 90292              (310) 448-8775
```
26 Mar 2010 17:17

### Re: Powerloom, a first stab... [somewhat OT]

```On 3/26/10 Mar 26 -3:51 AM, Gerard Toonstra wrote:
>
> Thanks Hans, this has certainly been helpful.
>
> The justifications example certainly looks very complex to me and your
> second point made
> me realize I'd be better off maintaining my own tree in the host code.
> Then I can choose which
> branches to explore based on a number of different algorithms
> (breadth-first, iterative deepening, best-first, etc.).
> I think I'll go down that route for now at least.
>
>
> Before looking at powerloom, I looked at JSHOP2. JSHOP2 can solve
> planning problems, but it requires compilation
> of the KB and the language is certainly not as rich as powerloom's for
> the expression of particular relations and so forth.
> Is powerloom well suited for planning problems in general? I haven't
> found any demos or tutorials that
> show how it's used for those kinds of problems.

If you want hierarchical planning, then SHOP2 may be a better choice.
Note, however, that JSHOP2 has not been maintained for many years and is
likely badly bit-rotted.  Active development is only being done on
SHOP2, the Common Lisp version.  If you would like more information
about this, contact me off this list (in particular, no one has been
pushing releases to Sourceforge since the Sourceforge reorg, although
development is ongoing).

Best,
R
>
> Rgds,
>
> Gerard
>
>
>> From: hans <at> ISI.EDU
>> Date: Thu, 25 Mar 2010 13:18:24 -0800
>> To: toonstge <at> hotmail.com
>> CC: powerloom-forum <at> ISI.EDU
>> Subject: Re: Powerloom, a first stab...
>
>> (2) minimality: you can do a "retrieve all" and PowerLoom will try to
>> generate all possible solutions. If you have some kind of cost
>> function, you'd compute that cost for each solution and then select
>> the one with the smallest one (e.g., make the cost an output argument
>> and do a :sort-by :values in the retrieve). However, if there is a
>> potentially large number of solutions, you might want to do something
>> smarter than that by cutting off partial solutions that can't improve
>> on what you already have. That, however, you would have to do in
>> code. You might also have more complex subsumption relationships
>> between solutions which might require a somewhat more sophisticated
>> approach.
>>
>> Hope that helps,
>>
>> Hans
>>
>> >>>>> Gerard Toonstra <toonstge <at> hotmail.com> writes:
>>
>> > Hi there,
>>
>> > I'm currently evaluating powerloom for research in the context of an
> agent platform.
>>
>> > I've read through all documentation of powerloom so far and I think
> it's certainly powerful enough
>> > to use it for our purposes, certainly for all the standard logic.
>> > I do have a question however on producing solutions and
> alternatives. The only recursion
>> > example I found in Powerloom used transitivity rules
> (parent/ancestor example and the RCC8 KB).
>> > Unfortunately, my problem cannot be used with transitivity.
>>
>> > The problem I have is:
>>
>> > So that's the question basically. Can powerloom produce a list of
> entities that together form the solution,
>> > based on some constraints that are set on the production of this
> list and present each acceptable, but minimal
>> > solution individually? I'm not asking for a piece of code, just what
> I need to look for to realize this.
>>
>> > Rgds,
>>
>> G>
>>
>> > _________________________________________________________________
>> > Hotmail is redefining busy with tools for the New Busy. Get more
> from your inbox.
>> >
> http://www.windowslive.com/campaign/thenewbusy?ocid=PID27925::T:WLMTAGL:ON:WL:en-US:WM_HMP:032010_2
>
> ------------------------------------------------------------------------
> The New Busy is not the old busy. Search, chat and e-mail from your
> inbox. Get started.
> <http://www.windowslive.com/campaign/thenewbusy?ocid=PID27925::T:WLMTAGL:ON:WL:en-US:WM_HMP:032010_3>
>
>
>
> _______________________________________________
> powerloom-forum mailing list
> powerloom-forum <at> isi.edu
> http://mailman.isi.edu/mailman/listinfo/powerloom-forum
```

Gmane