Clearing the input-link of agent.
harit7 opened this issue · 5 comments
There are ways to clear wme's from output-link. But I am not able to find a way to clear the input-link.
There is an update() method. But it requires the knowledge of input structure in jsoar. Is there a better and cleaner way to do this.
Thanks for the reply. I am building the input using InputBuilder. I can get the wmes by agent.getInputOutput().getInputLink().getWmes(), but these are Wme objects, they don't have a remove method and Converting them to InputWme gives ClassCastException.
How can I get InputWme Objects ?
Thanks for the help. I am able to remove wme elements which are not repeated, for example If we have the following on the input link then I can remove ^city using the remove method. But Somehow ^person are not getting removed? What am I missing?
I2 ^person abc ^person def ^person jkl ^city somecity
Also could you please explain how and when the inputWme gets removed exactly. Since This is happening in the java code(jsoar), hence one can do it at any time, in the worst case the soar agent might be reading the input at that time.