C:\logicagent>ruby logicbot.rb Hello I have loaded C:/logicagent/logicagent-api.yaml. > reset graph Okay, I have reset the graph. > logicagent: if input =~ /(.*) are not (.*)\.?/ then self.send("delete #{$1} is #{$2}") end Okay I have added if input =~ /(.*) are not (.*)\.?/ then self.send("delete #{$1} is #{$2}") end. > Socrates is a man. Okay, Socrates is a man. > All men are immortal. Okay, All men are immortal. > All men includes a man. Okay, All men includes a man. > is Socrates immortal? Yes, Socrates is immortal. > why is Socrates immortal? Socrates is immortal because: socrates is a man, and a man is a member of all men, and all men are immortal > All men are not immortal. Okay, All men is not immortal. > is Socrates immortal? I have no knowledge that Socrates is immortal. > show graph all men includes a man all men is_not immortal socrates is a man a man is a member of all men > --- This dialog illustrates the validity of an argument that includes one premise ("All men are immortal") that we consider false in the real world. Then we can give the program another premise that corrects the one that we consider false, by telling it "All men are not immortal." The program forgets the premise we told it before (that "All men are immortal"); so the former conclusion (that "Socrates is immortal") no longer follows. Notes about this dialog: 1) the "reset graph" command tells the bot to forget everything it has learned before, and start with a blank slate. 2) the next command ("logicagent: if input ...") tells the bot to forget "All men are immortal" when we tell it "All men are not immortal." The rule is expressed in the Ruby programming language. The rule is general enough to apply to other input of the form "___ are not ___." 3) When told "All men are not immortal", the bot responds "Okay, all men is not immortal.") The "is" should be plural. This is a small bug. Usually telling the bot "All men is plural" fixes this type of subject-verb agreement, but this time it's not working, so I need to do some debugging... 4) The proposition "All men includes a man" is necessary, to tell the program how "a man" and "all men" are related. Another way of stating this relation is: "A man is a member of all men", which is what the bot uses in its answer to "why is Socrates immortal?" I hope to automate this step so that in the future, I won't have to explicitly tell the bot things like "All man includes a man." (For more on logicagent see http://subbot.org/logicagent)