Skip to content

Instantly share code, notes, and snippets.

@PhDP
Created March 22, 2020 18:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PhDP/17f7a6a726394d307c6f2b6bbea39a3d to your computer and use it in GitHub Desktop.
Save PhDP/17f7a6a726394d307c6f2b6bbea39a3d to your computer and use it in GitHub Desktop.
Grammar for a system of ODEs. I cheat a bit with formula by adding the unecessary <formula> <operator> <variable> and <variable> <operator> <formula>, it helps grammatical evolution algorithms find simpler formulas.
<expr> ::= dS/dt = <formula>\ndI/dt = <formula>\ndR/dt = <formula>
<formula> ::= <unary><formula> | <formula> <operator> <formula> | <formula> <operator> <variable> | <variable> <operator> <formula> | <variable>
<unary> ::= -
<operator> ::= - | *
<variable> ::= a | b | I | S
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment