GAgent ------ gagent.rb (subbot.org/gagent/gagent.rb) is a natural language interface to graph.rb (subbot.org/gagent/graph.rb). To run gagent.rb, you need gagent-api.yaml (subbot.org/gagent/gagent-api.yaml) and graph.rb in the same directory. Test files: testgraph.rb (subbot.org/gagent/testgraph.rb) testgagent.rb (subbot.org/gagent/testgagent.rb) testgagentbot.rb (subbot.org/gagent/testgagentbot.rb) d2t.rb is a utility to generate test files from gagent logs. gagentbot.rb is a wrapper around gagent, that provides some basic bot services (such as volume control and help). gagentbotd.rb uses DRb to run gagentbot as a daemon. Start gagentbotd.rb to access this program from subbot.org/controller/controlbot.rb. (You may have to substitute ".txt" for ".rb" to view the files on the web.) Sample dialogs (more test dialogs are in testgagent.rb): --- C:\trane\gagent>ruby gagent.rb I have loaded C:/trane/gagent/gagent-api.yaml. > All metals are solid. Okay, All metals are solid. > Mercury is a metal. Okay, Mercury is a metal. > a metal is all metals Okay, a metal is all metals. > is Mercury solid? Yes, Mercury is solid. > why is Mercury solid? Mercury is solid because: mercury is a metal, and a metal is all metals, and all metals are solid > Mercury is not solid. That contradicts the information I have that Mercury is solid because: mercury is a metal, and a metal is all metals, and all metals are solid. > forget "all metals are solid." Okay I have forgotten all metals are solid. > is Mercury solid? I have no knowledge that Mercury is solid. --- The "is" relation is transitive. The graph can store other relations, such as "=" which is reflexive, symmetric, and transitive: --- > reset graph Okay, I have reset the graph. > a = b Okay, a = b. > does a = a? Yes, a = a. > does a = b? Yes, a = b. > does b = a? Yes, b = a. > b = c Okay, b = c. > does a = c? Yes, a = c. > print graph a = b a = a b = a b = b b = c c = b c = c --- The graph can also store multiple edges (or relations): --- > All birds have wings. Okay, All birds have wings. > All ostriches are birds. Okay, All ostriches are birds. > birds are all birds Okay, birds are all birds. > do all ostriches have wings? Yes, all ostriches have wings > why do all ostriches have wings? all ostriches have wings because: all ostriches are birds, and birds are all birds, and all birds have wings --- robertscottmitchell@yahoo.com