Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Alexander R. Hankin
EE194_Manduca_Simulator
Commits
bb8006f9
Commit
bb8006f9
authored
May 09, 2018
by
David A.. Werner
Browse files
Corner case bugifx
parent
41b732e7
Changes
1
Hide whitespace changes
Inline
Side-by-side
manduca/Population.py
View file @
bb8006f9
...
...
@@ -252,6 +252,7 @@ class EvolutionSimulator(object):
idxs
=
rng
.
choice
(
len
(
unfit_manducas
),
num_random
,
replace
=
False
)
randomly_selected_manducas
=
list
(
unfit_manducas
[
idxs
])
else
:
idxs
=
[]
randomly_selected_manducas
=
[]
# Pick the rest randomly, weighted by fitness
remaining_manducas
=
self
.
evolution_parameters
.
max_population
-
num_fittest
-
num_random
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment