-
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Figure out how to handle output in all frameworks #32
Comments
The print statement was using plain ids but we weren't determining if they were vars or not. It makes more sense and reads better to require vars with "?". This also addresses #32 (output) for vanilla ACT-R.
It looks like It does, however, have a way to execute a function on a buffer: !goal>
show <slot name> (This So we might be able to make this work with some hacking by injecting a new method onto import types
from pyactr.buffers import Buffer
def print_text(self,text):
print( text )
Buffer.print_text = types.MethodType(print_text, Buffer) ...and then calling it in the production like so: !goal>
print_text foo In order to handle our print statement
I think we can do this by first determining which buffer the var is from, then figuring out the slot name the var relates to, and passing it in instead of the var name? Not sure if this will work if we want to output vars from two different buffers in one print statement... |
Can only print strings and only print once per production, so output warnings about variables and multiple print statements. Partially addresses #32
|
Related pyactr issue: Output a variable within a production? |
This will be used to handle print statements in pyactr (#32)
This will be used to handle print statements in pyactr (#32)
All but one thing (#66) working across all three frameworks. |
The "print"
and "write"statementsneed to be implemented inpyactr
andvanilla
if possible.If not possible, then they may need to be removed as "do statements".
The text was updated successfully, but these errors were encountered: