diff --git a/examples/mapelites.ipynb b/examples/mapelites.ipynb index 18728e73..49765438 100644 --- a/examples/mapelites.ipynb +++ b/examples/mapelites.ipynb @@ -173,7 +173,7 @@ "metadata": {}, "outputs": [], "source": [ - "# Define the fonction to play a step with the policy in the environment\n", + "# Define the function to play a step with the policy in the environment\n", "def play_step_fn(\n", " env_state,\n", " policy_params,\n", diff --git a/qdax/core/containers/mapelites_repertoire.py b/qdax/core/containers/mapelites_repertoire.py index 1babb2c9..aed74c78 100644 --- a/qdax/core/containers/mapelites_repertoire.py +++ b/qdax/core/containers/mapelites_repertoire.py @@ -26,10 +26,10 @@ def compute_cvt_centroids( maxval: Union[float, List[float]], random_key: RNGKey, ) -> Tuple[jnp.ndarray, RNGKey]: - """Compute centroids for CVT tesselation. + """Compute centroids for CVT tessellation. Args: - num_descriptors: number od scalar descriptors + num_descriptors: number of scalar descriptors num_init_cvt_samples: number of sampled point to be sued for clustering to determine the centroids. The larger the number of centroids and the number of descriptors, the higher this value must be (e.g. 100000 for @@ -69,7 +69,7 @@ def compute_euclidean_centroids( minval: Union[float, List[float]], maxval: Union[float, List[float]], ) -> jnp.ndarray: - """Compute centroids for square Euclidean tesselation. + """Compute centroids for square Euclidean tessellation. Args: grid_shape: number of centroids per BD dimension @@ -144,7 +144,7 @@ class MapElitesRepertoire(flax.struct.PyTreeNode): descriptors: an array that contains the descriptors of solutions in each cell of the repertoire, ordered by centroids. The array shape is (num_centroids, num_descriptors). - centroids: an array the contains the centroids of the tesselation. The array + centroids: an array that contains the centroids of the tessellation. The array shape is (num_centroids, num_descriptors). """ diff --git a/qdax/core/containers/mome_repertoire.py b/qdax/core/containers/mome_repertoire.py index d1da327a..0e2b6d3e 100644 --- a/qdax/core/containers/mome_repertoire.py +++ b/qdax/core/containers/mome_repertoire.py @@ -377,7 +377,7 @@ def init( # type: ignore (batch_size, num_criteria) descriptors: descriptors of the initial genotypes of shape (batch_size, num_descriptors) - centroids: tesselation centroids of shape (batch_size, num_descriptors) + centroids: tessellation centroids of shape (batch_size, num_descriptors) pareto_front_max_length: maximum size of the pareto fronts extra_scores: unused extra_scores of the initial genotypes diff --git a/qdax/core/distributed_map_elites.py b/qdax/core/distributed_map_elites.py index 79b39f49..c8a1ea44 100644 --- a/qdax/core/distributed_map_elites.py +++ b/qdax/core/distributed_map_elites.py @@ -32,7 +32,7 @@ def init( Args: init_genotypes: initial genotypes, pytree in which leaves have shape (batch_size, num_features) - centroids: tesselation centroids of shape (batch_size, num_descriptors) + centroids: tessellation centroids of shape (batch_size, num_descriptors) random_key: a random key used for stochastic operations. Returns: diff --git a/qdax/core/map_elites.py b/qdax/core/map_elites.py index d306d11e..c71b0013 100644 --- a/qdax/core/map_elites.py +++ b/qdax/core/map_elites.py @@ -23,7 +23,7 @@ class MAPElites: """Core elements of the MAP-Elites algorithm. Note: Although very similar to the GeneticAlgorithm, we decided to keep the - MAPElites class independant of the GeneticAlgorithm class at the moment to keep + MAPElites class independent of the GeneticAlgorithm class at the moment to keep elements explicit. Args: @@ -64,7 +64,7 @@ def init( Args: init_genotypes: initial genotypes, pytree in which leaves have shape (batch_size, num_features) - centroids: tesselation centroids of shape (batch_size, num_descriptors) + centroids: tessellation centroids of shape (batch_size, num_descriptors) random_key: a random key used for stochastic operations. Returns: