SoarGroup / Soar

Soar, a general cognitive architecture for systems that exhibit intelligent behavior.
http://soar.eecs.umich.edu
Other
321 stars 70 forks source link

[Python] Create example script of how to use soar-sml #473

Open ShadowJonathan opened 3 weeks ago

ShadowJonathan commented 3 weeks ago

An complete self-contained example of a Python script that runs an agent and interacts with the kernel would be helpful, as people can then see the complete structure as it works, and edit it to have it do what they want.

It's something that'll help people understand how to use the library, as currently there are no examples, or they're not easily linked or accessible.

garfieldnate commented 3 weeks ago

I assume this is in support of #472.

ShadowJonathan commented 3 weeks ago

It's something extra: while a tutorial is also helpful, I realised that a concrete example - while related - is a separate specific thing that should also be looked at.

Bryan-Stearns commented 3 weeks ago

I have a set of Python examples I made for Soar training in Optum as part of a tutorial series I made for engineers here. I'm currently in the process of figuring out how to get approval to release the content publicly, but if I get approval that might satisfy this issue.

I made three examples that build on each other in complexity:

  1. Basic agent creation and WME creation
  2. Destroying/re-adding and reading WMEs
  3. Event listeners
ShadowJonathan commented 3 weeks ago

Those examples sound perfect, could you release those under a PR if you get approval?

(And of course with the soar_sml import, plus possibly some explanatory comments)

Bryan-Stearns commented 3 weeks ago

Sure, I will plan to do that. Will keep you posted here!

garfieldnate commented 3 weeks ago

Thanks, Bryan, would love all the tutorials we can get! We currently have an SML quick-start guide, but it's only in C++. The tutorials section of the website repo is here, if you think that's an appropriate spot: https://github.com/SoarGroup/SoarGroup.github.io/tree/main/docs/tutorials.

Bryan-Stearns commented 2 weeks ago

So the whole tutorial series I made is laid out as a set of subfolders for each lesson in the series, each having its own set of provided code and ppt/pdf of corresponding slides/instructions. I also built it to include a copy of the Soar release, along with some helper scripts, so that running project files and setting up env vars and such is handled automatically. The tutorial projects are meant to be done while walking through the given slides.

I have to submit approval paperwork with Optum for each open source project/repo where I want to contribute something I made on the job. So we need to pick a specific project that can be a home base for me to push the tutorial content there. Whether we pick the website repo or the Soar repo or somewhere else, I could just upload my whole tutorial folder with its project files and slides somewhere there, and the tutorial could itself become an open source thing. Someone could then make a zip of the folder and link it as a website download or something like that.

Do we want the website repo to be the official home base?

garfieldnate commented 1 week ago

My suggestion (sent separately via email):

  1. Dedicated repository for new tutorial source (since we already host the "official" tutorial, it seems potentially confusing to add another one).
  2. Zip of tutorial uploaded as a release on the new repository (because Bryan's distribution Zip contains an entire Soar distribution in a sub-folder).
  3. Link from website (tutorials page), and also add announcement.