# Unity Logic System

This topic is 4583 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Am trying to create a conversagent agent capable of memory and thought. Check my other thread for more details. I am after a logically capable agent who can detect contradictions or can validate conclusions according to the common laws of logic. I have been checking the Wikipedia for axioms of logic, Boolean algebra. How could I integrate these axioms into a framework to solve any problem that I might encounter. Your help is highly appreciated.

##### Share on other sites
Fortunately for you, this is an extremely well-studied area of artificial intelligence. The procedure for doing this goes something like the following diagram. Imagine that we ask the system to answer the question: "Given that all men are mortals (and that there's at least one man), are there some mortals who are men?"

{ English statements } ------+                        "All men are mortals."                             |                         [natural language parser]                             |                             |{ logical predicates } <-----+                        "∀ m | m ∈ Men &rArr m ∈ Mortals"            |            |        [inference engine]            |            +----------------> { knowledge base }     "P1 = ∀ m | m ∈ Men ⇒ m ∈ Mortals"                                     |                                     |                           [deductive engine]                                     |                                     |{ draw conclusions for answer } <----+                "P1"                                                      "P1 ⇒? (∃ m ∈ Mortals ⇒ m ∈ Men)"                                                      ∴ (∃ m | m ∈ Mortals ⇒ m ∈ Men)"                                                      return true;

Unfortunately for you, English is an extremely ambiguous language. To avoid a very complicated system, you will probably need to bypass the natural language parser step and require your users to deal directly with logical predicates. Be warned that constructing a system to process the logical inputs and draw inferences is approximately as much work as building a compiler for a small but nontrivial language. If you want to know more, an excellent book on the subject is "Artificial Intelligence: A Modern Approach" by Russell and Norvig.

hope that helps,

##### Share on other sites
What is this little square that keeps being iterated all over, I saw it in Wikipedia, you typed it here... It is driving me insane.

As for the book you mentioned, I am away from university right now, but I will check it as soon as possible.

I was thinking about using a transformation engine with something like the A* algorithm to find whether there is, or isn't any contradictions with the acquired knowledge. I am stomped at the first step, which is which rules to use.

Till now, I am considering studying each operator {not, and, or} and creating transformation laws for any combination of those. But am still a little fuzzy about the whole thing and I still need further clarification please.

Thanks for the illustrative diagrams kSquared.

##### Share on other sites
Quote:
 Original post by arithmaWhat is this little square that keeps being iterated all over, I saw it in Wikipedia, you typed it here... It is driving me insane.

Can you be more specific? I don't see any squares in what I typed.

[edit: It might be that your browser can't render certain symbols. Can you take a screenshot of my post?]

##### Share on other sites
It seems I am missing some font packages since it cannot render the &-forall glyph.. How should I correct this?

##### Share on other sites
Quote:
 Original post by arithmaIt seems I am missing some font packages since it cannot render the &-forall glyph.. How should I correct this?

Your browser is responsible for rendering the glyphs, not per se the fonts (your browser should be substituting things as need be, or drawing them itself).

##### Share on other sites
Quote:
 kSquaredBe warned that constructing a system to process the logical inputs and draw inferences is approximately as much work as building a compiler for a small but nontrivial language.

What do you exactly mean. The inference algorithm is hard or the parsing of english is hard?

##### Share on other sites
Have a wild guess
(inference has been done thousands of different algos)

##### Share on other sites
Quote:
Original post by arithma
Quote:
 kSquaredBe warned that constructing a system to process the logical inputs and draw inferences is approximately as much work as building a compiler for a small but nontrivial language.

What do you exactly mean. The inference algorithm is hard or the parsing of english is hard?

Well, neither of them are easy. But parsing natural language remains a largely unsolved problem.

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 27
• 16
• 10
• 10
• 11
• ### Forum Statistics

• Total Topics
634101
• Total Posts
3015528
×