newEnvXOR: Generates a problem environment for the XOR problem.

View source: R/newXOR.R

newEnvXORR Documentation

Generates a problem environment for the XOR problem.

Description

Generates a problem environment for the XOR problem.

Usage

newEnvXOR()

Value

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.

See Also

Other Problem Environments: DeJongF4Factory(), DelayedPFactory(), Parabola2DEarlyFactory(), Parabola2DErrFactory(), Parabola2DFactory(), envXOR, lau15, newTSP()

Examples

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)


xegaSelectGene documentation built on April 16, 2025, 5:12 p.m.