Table of Contents

Interface IEvolvable<TGene, T>

Namespace
AiDotNet.Interfaces
Assembly
AiDotNet.dll

Represents an individual that can evolve through genetic operations.

public interface IEvolvable<TGene, T> where TGene : class

Type Parameters

TGene

The type representing a gene in the genetic model.

T

The numeric type used for fitness calculations.

Methods

Clone()

Creates a deep clone of this individual.

IEvolvable<TGene, T> Clone()

Returns

IEvolvable<TGene, T>

A clone of this individual.

GetFitness()

Gets the fitness of this individual.

T GetFitness()

Returns

T

The fitness score.

GetGenes()

Gets the genes of this individual.

ICollection<TGene> GetGenes()

Returns

ICollection<TGene>

The collection of genes.

SetFitness(T)

Sets the fitness of this individual.

void SetFitness(T fitness)

Parameters

fitness T

The fitness score to set.

SetGenes(ICollection<TGene>)

Sets the genes of this individual.

void SetGenes(ICollection<TGene> genes)

Parameters

genes ICollection<TGene>

The genes to set.