Re: play(player, game)
Octav Popescu <[email protected]>
| Newsgroups | gmane.comp.ai.powerloom |
|---|---|
| Message-ID | <4C7B0D30E1CE90F7ECEE2495@[192.168.0.101]> |
--On Wednesday, May 25, 2005 6:05 PM -0700 Hans Chalupsky <[email protected]> wrote: >>>>>> Octav Popescu <[email protected]> writes: > >> --On Wednesday, May 25, 2005 12:47 -0700 Hans Chalupsky <[email protected]> >> wrote: >>>>>>>> Octav Popescu <[email protected]> writes: >>> >>>> Another question: irrespective of the CLOSED declaration, does PowerLoom >>>> do 3-value (or 5-value with the defaults) logic computation? Like saying >>>> (AND UNKNOWN FALSE) = FALSE, (AND UNKNOWN TRUE) = UNKNOWN, (OR UNKNOWN >>>> TRUE) = TRUE, (OR UNKNOWN FALSE) = UNKNOWN. >>> >>> Yes, for example: >>> >>> STELLA(3): (defrelation happy (?x)) >>> | r|HAPPY >>> STELLA(4): (assert (not (happy joe))) >>> | P|(NOT (HAPPY JOE)) >>> STELLA(5): (ask (happy fred)) >>> UNKNOWN >>> STELLA(6): (ask (and (happy joe) (happy fred))) >>> FALSE >>> STELLA(7): (ask (or (happy joe) (happy fred))) >>> UNKNOWN >>> STELLA(8): (ask (or (not (happy joe)) (happy fred))) >>> TRUE >>> STELLA(10): (ask (and (not (happy joe)) (happy fred))) >>> UNKNOWN >>> STELLA(11): >>> >>> Hans > >> Well, that's great, but then I get: > >> ? (ask (and (happy fred) (happy joe))) >> UNKNOWN > > Again, this is because of "asymmetric effort" for deriving what you > asked for vs. its negation. When the query engine determined that > `(happy fred)' is unknown it stopped there, because that made the > conjunction fail. It does not try to disprove any of the remaining > conjuncts to see whether it can prove the conjunction to be false > vs. just unknown. Conceivably, we could be a bit more aggressive > there and at least look for shallow disproofs of other conjuncts > similar to what we do for atomic propositions. > > If you explicitly ask for the negation, you get what you expect: > > STELLA(38): (ask (not (and (happy fred) (happy joe)))) > TRUE > > We've considered to add a 3-valued-ask option (similar to Loom) that > would ask for the negation of the top-level goal automatically if the > positive was found to be unknown, for users who don't mind the extra > inference effort for the sake of more complete results. > ... > Hans The main thing that bothers me about the result above is that the evaluation of predicates depends on the order of the predicates in the formula, and this is not documented anywhere. I assume the predicates could also have side-effects, and we should know whether they're going to be evaluated or not. I assume that also means that if it has an (OR (P1 A) (P2 B)) and (P1 A) is TRUE, it would not evaluate (P2 B). Related to this I think it'd be very useful if PowerLoom comes with detailed documentation about the inference processes it performs. Including how far it goes and the exact semantics of the language constructs with respect to these inference processes. One big problem I had with Loom was that when I was using some language construct and I wasn't getting the effects I was expecting, I had 4 different possible causes to investigate with no easy way to figure out which one is the real one: 1. Misunderstanding of the semantics on my part. 2. Bug in my code. 3. Loom's incompleteness. 4. Bug in Loom. Good documentation should eliminate 1 and 3. Thanks, Octav