Logic System

Started by
9 comments, last by Nice Coder 17 years, 9 months ago
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.
[ my blog ]
Advertisement
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 ⇒ 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,
- k2"Choose a job you love, and you'll never have to work a day in your life." — Confucius"Logic will get you from A to B. Imagination will get you everywhere." — Albert Einstein"Money is the most egalitarian force in society. It confers power on whoever holds it." — Roger Starr{General Programming Forum FAQ} | {Blog/Journal} | {[email=kkaitan at gmail dot com]e-mail me[/email]} | {excellent webhosting}
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.
[ my blog ]
Quote:Original post by arithma
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.

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?]
- k2"Choose a job you love, and you'll never have to work a day in your life." — Confucius"Logic will get you from A to B. Imagination will get you everywhere." — Albert Einstein"Money is the most egalitarian force in society. It confers power on whoever holds it." — Roger Starr{General Programming Forum FAQ} | {Blog/Journal} | {[email=kkaitan at gmail dot com]e-mail me[/email]} | {excellent webhosting}
It seems I am missing some font packages since it cannot render the &-forall glyph.. How should I correct this?
[ my blog ]
Quote:Original post by arithma
It 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).
- k2"Choose a job you love, and you'll never have to work a day in your life." — Confucius"Logic will get you from A to B. Imagination will get you everywhere." — Albert Einstein"Money is the most egalitarian force in society. It confers power on whoever holds it." — Roger Starr{General Programming Forum FAQ} | {Blog/Journal} | {[email=kkaitan at gmail dot com]e-mail me[/email]} | {excellent webhosting}
I am using IE 6 and download firefox 1.5
[ my blog ]
Quote:kSquared
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.


What do you exactly mean. The inference algorithm is hard or the parsing of english is hard?
[ my blog ]
Have a wild guess
(inference has been done thousands of different algos)
Quote:Original post by arithma
Quote:kSquared
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.


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.
- k2"Choose a job you love, and you'll never have to work a day in your life." — Confucius"Logic will get you from A to B. Imagination will get you everywhere." — Albert Einstein"Money is the most egalitarian force in society. It confers power on whoever holds it." — Roger Starr{General Programming Forum FAQ} | {Blog/Journal} | {[email=kkaitan at gmail dot com]e-mail me[/email]} | {excellent webhosting}

This topic is closed to new replies.

Advertisement