Hide Comments
Hide Comments

RSGenerics.GeneticProgramEngine Namespace

Comments (0)

Represents namespace RSGenerics.GeneticProgramEngine.

expandingClasses

 

Name

Description

public class

TRSGPBinaryNode<T>

Defines the generics node for tree-based genetic programming which can contain at most 2 children. Each node represents one function or terminal (constant, variable) in a genetic program. It has one   Parent (or nil if root node) and 0 or more   Child nodes (terminals have no children).

noteNote

If your instructions have arity greater than 2, use the TRSGPTreeNode<T> class instead.

public class

TRSGPContext<T>

Defines the context (state of the program, i.e., variables and world) for executing or evaluating a genetic program. Every function node OnExecute in a genetic program can read and write to this context. Every variable terminal node will read from this context OnExecute.

alert_noteNotes to Inheritors

By default, a genetic programming context contains a list of variables and their values in the base type specified. Extend the TRSGPContext class to add other context such as world properties (e.g., the map for the ant trail problem)

noteNote

The TRSGPContext<T> is a generic class. Its type will change with the genetic programming type.

public class

TRSGPInstruction<T>

Defines one instruction (function, variable, or constant) in the genetic program.

noteNote

When the instruction executes, it needs no information beyond the nodes and the values passed in, so it may be multi-threaded as long as the values are copied and unless the OnExecute event does something unsafe.

public class

TRSGPInstructions<T>

Defines the set of instructions allowed in a genetic program, including all functions, variables and constants. When the genetic programming component is evolving the population of genetic programs, it uses this collection to select a function, variable or constant.

public class

TRSGPNode<T>

Defines the generics node for tree-based genetic programming. Each node represents one function or terminal (constant, variable) in a genetic program. It has one   Parent (or nil if root node) and 0 or more   Child nodes (terminals have no children).

public class

TRSGPTreeNode<T>

Defines the generics node for tree-based genetic programming which can contain an arbitrary number of children. Each node represents one function or terminal (constant, variable) in a genetic program. It has one   Parent (or nil if root node) and 0 or more   Child nodes (terminals have no children).

noteNote

For the TRSGPTreeNode<T> class, the children are stored in a list. If you restrict your instructions to 2 or less children, it is recommended to use the TRSGPBinaryNode<T> as it uses slightly less memory and is slightly faster.

public class

TRSGPValues<T>

Represents type TRSGPValues<T>.

Top

expandingInterfaces

 

Name

Description

public interface

IRSGeneticProgramEngine<T>

Defines the interface for a genetic programming component that can execute genetic programs as well as read and write them

noteNote

The IRSGeneticProgramEngine<T> is a generic interface. There can be multiple versions of this interface based on type T.

public interface

IRSGeneticProgramReaderWriter

Defines an interface for a genetic programming reader and writer, i.e., an object that can read genetic programming problems from file, stream, or xml and write genetic programming problems to file, stream or xml.

alert_cautionWarning

A genetic programming reader/writer reads and writes the metadata about instructions (i.e., name, arity, comment) but does not actually read or write the OnExecute code themselves. After reading a genetic programming scenario, you need to add OnExecute event handlers to instructions.

alert_cautionImportant Note

When reading a genetic programming scenario, the reader will attempt to match currently existing instructions to instruction names in the scenario. IF an instruction is found, the instruction will be preserved (including its OnExecute event).

After reading the scenario, any previous instructions not found in the scenario will be deleted.

Top

expandingDelegates

 

Name

Description

public delegate

TNodeEvent<T>

Defines the event handler signature for a node execute event (usually OnExecute). The Node parameter supplies the node that is executing, and the Context parameter supplies the context (state of the world and variables). The aResult parameters is where the result of the execution should be set.

public delegate

TNodeNotifyEvent<T>

Defines the event handler signature for a node notification event

Top

expandingTypes

 

Name

Description

public type

TRSGPTreeNode<T>.TChildren

Represents an alias of the TObjectList type.

Top

Comments (0)