-
Notifications
You must be signed in to change notification settings - Fork 42
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
Agent "identifiers" are recycled and so do not identify agents #659
Comments
Dear Hector, I think there is a misunderstanding of what is expected from Kappa agent ids. Fortunately, the simulation engine does not rename agents between steps (but that is an implementation choice). Thanks to this you can track an agent by its id. But yes, when an agent is degraded, his former id can be reused and you have no way to make the difference (except replaying the trace). In the module core/cflow/utilities.mli If you think this is useful, we can add proper identifiers. Do you think it would be useful ? Best |
Hi Jérôme, To be fair, since none of this is documented, users do not have a right to expect any meaning of these ids, so that part was perhaps wishful thinking on our part. That said, yes, I do think it would be useful to have identifiers. For my own bond simulator, I added persistent & unique agent identifiers as metadata to an agent object, which are wholly independent of how or where I store the agent. I believe @plucky did something similar for his SiteSim, though I can't find it on GitHub. Given that different simulator engines ended up implementing identifiers, I think that's a clear sign of their desirability. As to how to implement them, I do not have a horse on this race. Moreover, @jonathan-laurent 's KaTie has implemented a snapshot printer that does produce identifiers that identify, and so we are in a situation where a state or snapshot will use either a "memory address" or an actual "agent identifier" for the same objects depending on whether it was KaSim or KaTie that produced it. That is likely to trip future users of these platforms. |
I made SiteSim temporarily ‘private’, because it has become critical code for our research; once the paper is on arXiv I make it public again.
SiteSim will morph in due time to a poor man’s full-fledged Kappa simulator in Python.
plucky
… On Apr 21, 2023, at 7:33 PM, Hector Medina ***@***.***> wrote:
Hi Jérôme,
To be fair, since none of this is documented, users do not have a right to expect any meaning of these ids, so that part was perhaps wishful thinking on our part.
That said, yes, I do think it would be useful to have identifiers. For my own bond simulator, I added persistent & unique agent identifiers <https://github.com/hmedina/BondSimulator/blob/main/src/lib.rs#L133> as metadata to an agent object, which are wholly independent of how or where I store the agent. I believe @plucky <https://github.com/plucky> did something similar for his SiteSim, though I can't find it on GitHub. Given that different simulator engines ended up implementing identifiers, I think that's a clear sign of their desirability. As to how to implement them, I do not have a horse on this race.
Moreover, @jonathan-laurent <https://github.com/jonathan-laurent> 's KaTie has implemented a snapshot printer that does produce identifiers that identify, and so we are in a situation where a state or snapshot will use either a "memory address" or an actual "agent identifier" for the same objects depending on whether it was KaSim or KaTie that produced it. That is likely to trip future users of these platforms.
—
Reply to this email directly, view it on GitHub <#659 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AACG3KJGV7CHFFR3QRTQ6PLXCMKL7ANCNFSM6AAAAAAXGA64OM>.
You are receiving this because you were mentioned.
|
Given the toy model
The snapshots that are produced by KaSim are:
Note how
x1:Feb()
means two different agents, one for events [0, 1], a different one for events [2, ...], as distinguished by the internal state of itss
site,s{a}
vs.s{c}
(which are static in this model).In complex models where there is agent flux (a type of agent is deleted but also created), finding an agent with an "identifier" does not identify that agent. In my Wnt models, I had expected to be able to track bCatenins via these "identifiers", but that is not sound. These integer-marks should not be called or thought of as identifiers until this behavior is corrected.
Instead, one can do trace analysis1. One option is to use KaTie to produce snapshots, as that tool uses true identifiers (it correctly prints
x4:Feb(s{c}[.])
). Alternatively, one can match for degradation & creation events, to be certain there was no integer-mark recycling between two KaSim-derived snapshots that contain these agents with integer-marks.Footnotes
Requesting snapshots via
%mod:
can yield corrupted traces, see https://github.com/Kappa-Dev/KappaTools/issues/656; KaSim will not complain when producing the trace, but will be unable to read it, and by extension so will KaTie... ↩The text was updated successfully, but these errors were encountered: