Skip to content

IFeatureSelector

George Aleksandrovich edited this page Aug 15, 2019 · 3 revisions

An interface that chooses which Feature object to place in the current generation step.

By default, Labrys comes with a single concrete implementation of this interface: RandomFeatureSelector, which just randomly picks any Feature from the known list.

Initialize(Feature[] features)

This method is an initialization hook. The Feature array passed in contains every Feature that Generator knows about. The intention is for custom implementations to clone the input array, and prune the copy locally. Future calls to Select could then reference the pruned feature list.

Select(Feature[] features)

Every step of the generation process, this method gets called. The input array contains every Feature that Generator knows about.

Clone this wiki locally