Damn you Ovid, damn you! You've gotten me hooked on this and I'm not getting any of my "real" work done.
in reply to Choosing a data structure for AI applications
One of the things really bugging me is how to implement isa hasa taxonomy in an efficient manner. I think it is rather important to have to avoid redundant specification of facts and improve generalization.
(terrier is=>canine | canine has=>hair is=>mammal | mammal is=>warmblooded)
is('terrier', 'warmblooded') && has('terrier','hair');
I think a centralized database of facts is the way to go as far as storage as everything is an instance of something. In my original reply to your post I took that tack.
I don't know prolog but I would think that location and contents of the kitchen draw would best be described as properties of the "kitchen draw" and not of location. It appears to me that hoA or hoh would be the natural choice for the X does Y relationship of the data. Personally I would probably set up index hashes that map the relationships the other way to speed things up.
You could just use SQL but I would think generating all the relavant tables would be a big pain (which might be worthwhile depending on your applications) with all the flavors of DBI. I would probably stick to Berkley DB but that's just me.
"To be civilized is to deny one's nature."