observes_that #114
Replies: 2 comments
-
|
I answered my own question! It looks like I can just keep referencing the observed value (to be specified at runtime) in the rest of the memo code. observer: observes_that [alice.a0 == {obs_actions[0]}] |
Beta Was this translation helpful? Give feedback.
-
|
Hi Herrissa, Actually, all agents always know the value of model parameters like In fact, you discovered a little bug in memo, which I just fixed. The only valid inputs to But that's just a detail. In short, you should be fine with your current solution — just drop the By the way, the code in your initial message was very close to being correct. Instead of Finally, just a note. In general, I would recommend using |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello! I'm experimenting with memo's "observes_that" to condition on runtime values. It works when "observes_that" is at the end (right before the return), but I'm trying to use it earlier and then reference the observed value later in the code.
I want to observe an action specified at runtime, then use that observed value in a later "thinks" block (e.g., pass it to another agent's knows statement).
For example:
observer: observes_that [alice.a0 == {obs_actions[0]}]
observer: thinks[
env: knows([alice.a0])
env: ...
]
Is this a valid way to use "observes_that"? If so, what's the correct syntax to reference the observed value (e.g., [alice.a0] vs something else)?
Beta Was this translation helpful? Give feedback.
All reactions