NewEnvXOR {xega}R Documentation

Generate the problem environment EnvXOR

Description

NewEnvXOR() generates the problem environment for the XOR-Problem.

The problem environment provides an abstract interface to the simple genetic programming algorithm. ProblemEnv$f(parm) defines the function we want to optimize.

A problem environment is a function factory with the following elements:

  1. name() a string with the name of the environment

  2. ProblemEnv$f(word) function with word a word of the language (as text string).

Should be provided by the user as standard R-file.

Usage

NewEnvXOR()

Value

The problem environment:

See Also

Other Problem Environment: Parabola2DEarly, Parabola2D, lau15

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)


[Package xega version 0.9.0.0 Index]