Last active
November 26, 2019 00:55
-
-
Save d4hines/78331a4e4e82f41463b301c69d9c54c3 to your computer and use it in GitHub Desktop.
Tiny example domain for getting architecture feedback.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#const n = 4. | |
step(0..n). | |
% Actions can affect state. | |
% Actions always produce a single new model. | |
state(Val, I + 1) :- occurs(action(Val), I). | |
% Inertia for state. | |
state(Val, I + 1) :- state(Val, I), not occurs(action(_), I), I < n. | |
% Transient effects need to be rendered to the screen, but don't affect state. | |
% Transient effects are encoded in a way that sometimes produces multiple models. | |
% There may be #maximize/#minimize constraints on those models (or I could just use #max/#min) | |
{ transient((a;b)) } == 1 :- occurs(transientAction, I). | |
% Initial State. | |
state(x, 0). | |
% History | |
occurs(action(y), 0). | |
occurs(transientAction, 1). | |
occurs(action(z), 2). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment