Skip to content

Commit

Permalink
Including initial individuals to potentially include search efficienc…
Browse files Browse the repository at this point in the history
…y in the initialize_population function
  • Loading branch information
jshuadvd committed Jul 5, 2024
1 parent efce3b9 commit afd1b7a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,18 @@ def initialize_population(population_size, search_space, d_model):
Returns:
population: List of individuals, each represented as a dictionary
"""

# Initialize population
population = []

# Add PI individual
pi_individual = {
"lambda_i": [search_space["lambda_i"][1]] * (d_model // 2),
"n_hat": 0,
}

population.append(pi_individual)

for _ in range(population_size):
individual = {
"lambda_i": [
Expand Down

0 comments on commit afd1b7a

Please sign in to comment.