soartech / jsoar

Pure Java implementation of the Soar cognitive architecture.
http://soartech.github.com/jsoar/
BSD 3-Clause "New" or "Revised" License
53 stars 19 forks source link

Is there any way to access an agent's semantic memory through Java code? #110

Closed zywind closed 6 years ago

zywind commented 6 years ago

Hi,

We are trying to write some Java code that will use the activation value of the semantic memory items. Is there a recommended way to do that? The org.jsoar.kernel.agent class has a method for accessing the agent's working memory module, but there seems to be no method for accessing its semantic memory module.

marinier commented 6 years ago

If you look at, e.g., how WorkingMemory.initialize gets access to semantic memory, it does this:

this.smem = Adaptables.adapt(context, SemanticMemory.class);

Where context is the agent (org.jsoar.kernel.agent). That said, I’m not sure that the SemanticMemory interface or DefaultSemanticMemory class are going to give you access to what you want. But you could always change those to make something publicly accessible if you need it.

Bob

From: zywind [mailto:notifications@github.com] Sent: Tuesday, July 11, 2017 2:00 PM To: soartech/jsoar jsoar@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [soartech/jsoar] Is there any way to access an agent's semantic memory through Java code? (#110)

Hi,

We are trying to write some Java code that will use the activation value of the semantic memory items. Is there a recommended way to do that? The org.jsoar.kernel.agent class has a method for accessing the agent's working memory module, but there seems to be no method for accessing its semantic memory module.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/soartech/jsoar/issues/110, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AAgp3Lp-zZDuqdBg8jgSJCBB-4OBgHsXks5sM7gqgaJpZM4OUmev.

zywind commented 6 years ago

Thank you. After some dig around, I think I do have to modify the DefaultSemanticMemory to get activations. Thanks for the suggestion.