icaros-usc / pyribs

A bare-bones Python library for quality diversity optimization.
https://pyribs.org
MIT License
205 stars 31 forks source link

Allow specifying separate dtypes for solution, objective, and measures #471

Closed btjanaka closed 2 weeks ago

btjanaka commented 2 weeks ago

Description

Previously, dtype in the archive could only be a single value specifying the dtype for the solution, objective, and measures all at once. Now, it is allowed to be a dict specifying separate dtypes for each of these, e.g.,

    archive = GridArchive(
        solution_dim=3,
        dims=[10, 10],
        ranges=[(-1, 1), (-2, 2)],
        dtype={
            "solution": object,
            "objective": np.float32,
            "measures": np.float32,
        },
    )

Comments:

TODO

Status