Skip to content
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

Make Predictions have an independent existence #52

Open
elidupree opened this issue May 31, 2018 · 0 comments
Open

Make Predictions have an independent existence #52

elidupree opened this issue May 31, 2018 · 0 comments

Comments

@elidupree
Copy link
Owner

Currently, Event implementors are required to maintain the invariant that the predictions known by the TimeSteward are the same as the predictions accessible from Globals. This is a tricky condition that could easily be broken by mistake. Currently, you can rely on SimpleTimeline to handle it accurately, but that also has performance overhead, and the SimpleTimeline code has a big cost in maintainability.

There was once a reason for this behavior – making predictions implicit in the state of Entities meant that the representation of the canonical state was less complicated. I kept this when I got rid of Predictors, but it no longer seems worthwhile. Events should explicitly create and destroy Predictions.

Code-wise, the changes might not be that big. This does mean that I will have to change the serialization code a bit. I can also remove the reference-counting from predictions. And I might need to think about what happens when a predicted event actually occurs (e.g. is the prediction implicitly destroyed?).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant