Skip to content

Commit

Permalink
fix: Various spelling errors (#150)
Browse files Browse the repository at this point in the history
* Update map_elites.py distributed_map_elites.py mome_repertoire.py mapelites_repertoire.py and mapelites.ipynb
  • Loading branch information
btjanaka authored Oct 9, 2023
1 parent 64ea81d commit c111cea
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion examples/mapelites.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 4 additions & 4 deletions qdax/core/containers/mapelites_repertoire.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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).
"""

Expand Down
2 changes: 1 addition & 1 deletion qdax/core/containers/mome_repertoire.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion qdax/core/distributed_map_elites.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions qdax/core/map_elites.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit c111cea

Please sign in to comment.