Ephemeral Random Constants

52 views
Skip to first unread message

Joe

unread,
Jun 10, 2010, 5:32:46 AM6/10/10
to EpochX
Hello,

Is there a standard approach to specifying ercs in XGE? I've either
missed it in the API or I'm not sure how one is specified in BNF
(being a static definition). I have assumed that GrammarLiteral is
likewise static (specified against the Model rather than a
CandidateProgram).

Thanks for any assistance.

Tom Castle

unread,
Jun 10, 2010, 7:49:15 AM6/10/10
to EpochX
Hi Joe,

There are a few accepted ways of implementing ephemeral random
constants in GE, a decent paper which outlines some of them is
"Constant creation in grammatical evolution" by Dempsey et al. The
preferred Digit Concatenation method they outline should work fine in
XGE, using a grammar something like this:

<erc> ::= <int> <dot> <int> | <int>
<int> ::= <int> <digit> | <digit>
<digit> ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
<dot> ::= .

That's right, a GrammarLiteral is a (static) grammar terminal. As
opposed to a TerminalSymbol which is a parse tree terminal and so is
part of an individual CandidateProgram. A TerminalSymbol is defined
from a GrammarLiteral. There is a similar relationship between a
GrammarRule and a NonTerminalSymbol.

Joe

unread,
Jun 10, 2010, 4:37:16 PM6/10/10
to EpochX
Duh! Thanks. Nice enough solution, although it feels a little clunky
for genetic operations in that mutation and crossover will be
happening at digit or digit fragment (<int>) level rather than
(preferrably) to the whole number. Plus constraining constants would
mean defining new BNF types. Neither are a big deal at this stage
though.

Tom Castle

unread,
Jun 11, 2010, 1:02:50 PM6/11/10
to EpochX
That is true, although it might actually be beneficial for that sort
of granular approach to crossover/mutation. Although I certainly agree
that it complicates constraining the values. I may consider
introducing some special way of specifying an ERC terminal in the
future.
Reply all
Reply to author
Forward
0 new messages