Foundations in Grammatical Evolution for Dynamic