What tool did you use to perform this analysis?




    From: owner-jess-users
    Sent: 05/04/2004 01:53 PM
    To: [EMAIL PROTECTED]
    Subject: Re: JESS: Cryptarithmic exercise


I think Mitch Christensen wrote:
> Hey,
>
> I'm reading "Expert Systems Principles and Programming" by Giarratano and
I
> decided to try using Jess to solve the cryptarithmic problem at the
bottom
> of page 39.  I've got a rule that produces no valid solutions :(.  I've
> spent several hours looking over the code can't see my fault.  I was
> wondering if someone else might be interested in having a look.
>

Well, first of all, note that Jess comes with a solution to this exact
problem, although that solution takes a different approach than the
one you've taken here. This isn't wrong, though, and I'd think it'd be
possible to make it work.

A (The?) "right" answer is

  G = 1
  E = 9
  R = 7
  A = 4
  L = 8
  D = 5
  O = 2
  N = 6
  B = 3
  T = 0


So what I did was load up your facts and your rule, and use the "view"
command to visualize the network, and then double-clicked on the green
join nodes to see what was happening in each one. If you look at the
ones near the bottom, you'll see that the left memories don't contain
any facts for B=3; they allow other values of B, but not 3. So
something's wrong with the rule. If you open up each node one at a
time, you can see that it's the tests for G that eliminate the correct
values of B. That makes sense, as if you look lower down, G is getting
assigned the value 3. So it looks as though one of your assumptions
about G is wrong.

Looking at the rule, we see in the "G" pattern that ?Rn being used
before it's bound to a value. Jess' static analyzer is fairly weak,
and this kind of error is generally reported at runtime; in this case
it looks like Jess may be trying to do the right thing anyway, but
failing. These tests have to be moved down to the "R" pattern; this
may or may not be the only problem, but it's one problem, anyway. I'll
have to look at why you weren't getting an error message.

---------------------------------------------------------
Ernest Friedman-Hill
Science and Engineering PSEs        Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
PO Box 969, MS 9012                 [EMAIL PROTECTED]
Livermore, CA 94550         http://herzberg.ca.sandia.gov

--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------




*****************************************************************
<<<Disclaimer>>>

In compliance with applicable rules and regulations, Instinet
reviews and archives incoming and outgoing email communications,
copies of which may be produced at the request of regulators.
This message is intended only for the personal and confidential
use of the recipients named above.  If the reader of this email
is not the intended recipient, you have received this email in
error and any review, dissemination, distribution or copying is
strictly prohibited. If you have received this email in error,
please notify the sender immediately by return email and
permanently delete the copy you received.  

Instinet accepts no liability for any content contained in the
email, or any errors or omissions arising as a result of email
transmission. Any opinions contained in this email constitute
the sender's best judgment at this time and are subject to change
without notice.   Instinet does not make recommendations of a
particular security and the information contained in this email
should not be considered as a recommendation, an offer or a
solicitation of an offer to buy and sell securities.

*****************************************************************

--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------

Reply via email to