ribs.emitters.rankers.TwoStageObjectiveRanker

class ribs.emitters.rankers.TwoStageObjectiveRanker(seed=None)[source]

Similar to ribs.emitters.rankers.ObjectiveRanker, but ranks newly added solutions before improved solutions.

This ranker originates in Fontaine 2020 as OptimizingEmitter.

Methods

rank(emitter, archive, data, add_info)

Ranks the solutions based on their objective values, while prioritizing newly added solutions.

reset(emitter, archive)

Resets the internal state of the ranker.

rank(emitter, archive, data, add_info)[source]

Ranks the solutions based on their objective values, while prioritizing newly added solutions.

Parameters
  • emitter (ribs.emitters.EmitterBase) – Emitter that this ranker object belongs to.

  • archive (ribs.archives.ArchiveBase) – Archive used by emitter when creating and inserting solutions.

  • data (dict) – Dict mapping from field names like solution and objective to arrays with data for the solutions. Rankers at least assume the presence of the solution key.

  • add_info (dict) – Information returned by an archive’s add() method.

Returns

the first array (shape (batch_size,)) is an array of indices representing a ranking of the solutions and the second array (shape (batch_size,) or (batch_size, n_values)``) is an array of values that this ranker used to rank the solutions. batch_size is the number of solutions and n_values is the number of values that the rank function used.

Return type

tuple(numpy.ndarray, numpy.ndarray)

reset(emitter, archive)

Resets the internal state of the ranker.

Parameters