It's a bit difficult what I'm trying to do, but I'll try my best to explain
it. I'd like to take an arbitrary predicate, and find which facts could be
entered in the database that could make it true.
I'm working on a computer game dialogue framework that allows communication
between agents (i.e. NPCs) to take the form of logical expressions. I'd
like different agents to have
Suppose there are a number of relations that could be said to be true of a
person.
(defrel mother x y) ;; x is mother of y
(defrel isPretty x)
(defrel isFat x)
(defrel isUgly x)
(defrel bad f)
(defrel good f)
And we have some facts defined:
(facts mother '[[Anna Jimmy]]) ;; Anna is Jimmy's mom
(facts bad [[isFat] [isUgly]]) ;; isFat and isUgly are considered bad
(facts good [[isPretty]]) ;; isPretty is considered good
And there's a rule that says if the following is true, then Jimmy is unhapy:
(fresh [m p]
(mother m 'Jimmy)
(isBad p)
(project [p] (p m)))
Now, there's another agent Dick who is a meanie. He wants Jimmy to be
unhappy.
I'm wondering if there's a way I could analyze the above relation to
determine that by
entering the fact (isUgly 'Anna) or (isFat 'Anna), it would be true.
I hope that's not too confusing. Does anyone have any ideas about this?
Thanks.
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.