newEnvXOR | R Documentation |
Generates a problem environment for the XOR problem.
newEnvXOR()
The problem environment for the XOR problem with
$name
:
"envXOR"
, the name of the problem environment.
$buildtest(expr)
:
The function which builds the environment
for evaluating the expression
by binding the variables to the parameters.
$TestCases
: The truthtable of the XOR function.
$f(expr, gene=NULL, lF=NULL)
: The fitness function.
expr
is the string with the
logical expression to be evaluated.
The problem environment.
Other Problem Environments:
DeJongF4Factory()
,
DelayedPFactory()
,
Parabola2DEarlyFactory()
,
Parabola2DErrFactory()
,
Parabola2DFactory()
,
envXOR
,
lau15
,
newTSP()
envXOR<-newEnvXOR()
envXOR$name()
a2<-"OR(OR(D1, D2), (AND(NOT(D1), NOT(D2))))"
a3<-"OR(OR(D1, D2), AND(D1, D2))"
a4<-"AND(OR(D1,D2),NOT(AND(D1,D2)))"
gp4<-"(AND(AND(OR(D2,D1),NOT(AND(D1,D2))),(OR(D2,D1))))"
envXOR$f(a2)
envXOR$f(a3)
envXOR$f(a4)
envXOR$f(gp4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.