Skip to content

Instantly share code, notes, and snippets.

@adityam
Created May 9, 2009 05:31
Show Gist options
  • Save adityam/109146 to your computer and use it in GitHub Desktop.
Save adityam/109146 to your computer and use it in GitHub Desktop.
import Data.Teams.Structure
x = mkNonReward "x"
x' = mkNonReward "x'"
y = mkNonReward "y"
m = mkNonReward "m"
r = mkReward "r"
f = mkDynamics "f"
c = mkControl "c"
g = mkControl "g"
l = mkControl "l"
d = mkDynamics "d"
dynamics t | t == 1 = f(1).$.(x(1) .|. [])
++ c(1).$.(y(1) .|. [x(1)])
++ g(1).$.(x'(1).|. [y(1)])
++ l(1).$.(m(1) .|. [y(1)])
++ d(1).$.(r(1) .|. [x(1), x'(1)])
| otherwise = f(t).$.(x(t) .|. [x(t-1)])
++ c(t).$.(y(t) .|. map x[1..t] ++ map y[1..t-1])
++ g(t).$.(x'(t).|. [y(t), m(t-1)])
++ l(t).$.(m(t) .|. [y(t), m(t-1)])
++ d(t).$.(r(t) .|. [x(t), x'(t)])
rt = mkTeamTime dynamics 4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment