C:\logicagent>ruby logicbot.rb Hello I have loaded C:/logicagent/logicagent-api.yaml. C:/logicagent/graph.yaml loaded. > reset graph Okay, I have reset the graph. > Everybody loves somebody. Okay, Everybody loves somebody. > Everybody loves a lover. Okay, Everybody loves a lover. > love = loves Okay, love = loves. > logicbot: if response =~ / is love / then response.sub!(/ is love /, ' loves ') end Okay I have added if response =~ / is love / then response.sub!(/ is love /, ' loves ') end. > logicbot: if input =~ /if (.*) loves (.*), then (.*) is a lover/i then grp1 = $1; r,s = self.send("does #{$1} love #{$2}?"); if r =~ /^Yes/i then self.send("#{grp1} = a lover."); response = "Okay, #{grp1} is a lover."; end; if response == nil then response = "Okay" end; end Okay I have added if input =~ /if (.*) loves (.*), then (.*) is a lover/i then grp1 = $1; r,s = self.send("does #{$1} love #{$2}?"); if r =~ /^Yes/i then self.send("#{grp1} = a lover."); response = "Okay, #{grp1} is a lover."; end; if response == nil then response = "Okay" end; end. > logicbot: if input =~ /(.*) loves (.*)/ then self.send("if #{$1} loves #{$2}, then #{$1} is a lover.") end Okay I have added if input =~ /(.*) loves (.*)/ then self.send("if #{$1} loves #{$2}, then #{$1} is a lover.") end. > Everybody includes Jill. Okay, Everybody includes Jill. > Does Jill love somebody? Yes, Jill loves somebody. > if Jill loves somebody, then Jill is a lover. Okay, Jill is a lover. > does Jack love Jill? I have no knowledge that Jack loves Jill. > Everybody includes Jack. Okay, Everybody includes Jack. > Does Jack love Jill? Yes, Jack loves Jill. >