Hi everybody,
First, before I explain what I need help on I would like you guys to take a look at this
thread I made quite a while ago. It'll save me the trouble of having to explain what I'm working on all over again.
Ok, now the part of the program I'm currently working on is the Application Knowledge Base and the Rules for reasoning Knowledge Base. I'm having a lot of trouble trying to come up with a design/implementation that'll allow my agent to use prepositional logic and reason for governing it's movement inside the environment.
The way the system is suppose to work should go something like this:
1. The agent will have a record in it's memory that indicates how it currently sees the environment and what it knows about this environment. For example, my agent will start off not knowing anything in the beginning and as it moves around in the squares, it'll update it's memory to remember what's at that particular square.
2. The agent's memory of the world gets passed to the application knowledge base where each rule is checked against the agent's memory to determine whether the rule is applicable or not. This would probably be the first stage of a process where the agent can get new information about the environment base on what it knows so far by using reasoning.
3. Afterwards, the results from step 2 is checked whether it's too complicated for the agent to work with. If it is then the result needs to be simplified using reasoning. This is where the rules of reasoning knowledge base comes in. The result is checked against each rule until one is found that can be used to simplify the result. Finally, after going through this whole process the newly reasoned information is added to the agent's memory.
So basically as you can see, this design has three main parts that'll make up the inference engine. The agent's memory of the world, application knowledge base, and the reasoning knowledge base.
So far I have managed to get the first two parts done but I'm having a heap load of trouble figuring out how to design the last part. I just can't seem to break it down far enough so that it's just a series of simple functions that I can code and implement. I suspect that the way I chose to represent the data inside my program has something to do with the troubles I'm running into now.
The reasoning KB for the last part would include rules like eliminating conjuction(and), introducing conjuction, introducting disjuction(or), eliminating double negations, etc.
The way I have my inference engine represent this data is treating each element as a token and have a vector of tokens. For example, if
~W(2,2) & ~W(3,2) & ~W(2,3)
(I used ~ to represent negation and & to represent AND)
was the result after processing agent's memory through step 2 then there would be 5 tokens: ~W(2,2) is a token, & is another token and so on. You guys probably might know of a better way to represent this that'll make it easier to work with so please post your ideas here as this is the best I could come up with.
Now this output from step 2 is suppose to get feed into step 3 as the input. Now I'm suppose to somehow use the reasoning rules to break this input down to something like:
~W(2,2) ~W(3,2) ~W(2,3)
That'll finally get add back to the agent's memory as new information. Ugh, there's so much to think about! It's all starting to feel like mush to me

I can't figure out how the design of the last step is suppose to look like; something that I can code. I'm using C++ btw to do all this.
Please any help, comments, feedback on this is greatly appreciated. Or perhaps is there anyone here that has written a rule-based reasoning program might be able to help me with this?
Thanks

--{You fight like a dairy farmer!}
[edited by - Greatwolf on July 20, 2003 12:22:33 AM]