Skip to content

Commit

Permalink
fix: Change indexing in UnstructuredRepertoire intra batch comp (#185)
Browse files Browse the repository at this point in the history
* change indexing to retrieve current fitness in intra batch comp

Authored-by: Lisa <lc1021@ic.ac.uk>
  • Loading branch information
LisaCoiffard authored Sep 20, 2024
1 parent 85b6ba6 commit 14f30f3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions qdax/core/containers/unstructured_repertoire.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,7 @@ def intra_batch_comp(

# We want to eliminate the same individual (distance 0)
fitness = jnp.where(knn_relevant_indices == current_index, False, fitness)
current_fitness = jnp.squeeze(
eval_scores.at[knn_relevant_indices.at[0].get()].get()
)
current_fitness = jnp.squeeze(eval_scores.at[current_index].get())

# Is the fitness of the other individual higher?
# If both are True then we discard the current individual since this individual
Expand Down

0 comments on commit 14f30f3

Please sign in to comment.