evolutionary-policy-optimization 0.0.52__py3-none-any.whl → 0.0.53__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- evolutionary_policy_optimization/epo.py +9 -1
- {evolutionary_policy_optimization-0.0.52.dist-info → evolutionary_policy_optimization-0.0.53.dist-info}/METADATA +1 -1
- {evolutionary_policy_optimization-0.0.52.dist-info → evolutionary_policy_optimization-0.0.53.dist-info}/RECORD +5 -5
- {evolutionary_policy_optimization-0.0.52.dist-info → evolutionary_policy_optimization-0.0.53.dist-info}/WHEEL +0 -0
- {evolutionary_policy_optimization-0.0.52.dist-info → evolutionary_policy_optimization-0.0.53.dist-info}/licenses/LICENSE +0 -0
@@ -360,10 +360,11 @@ class LatentGenePool(Module):
|
|
360
360
|
frac_natural_selected = 0.25, # number of least fit genes to remove from the pool
|
361
361
|
frac_elitism = 0.1, # frac of population to preserve from being noised
|
362
362
|
frac_migrate = 0.1, # frac of population, excluding elites, that migrate between islands randomly. will use a designated set migration pattern (since for some reason using random it seems to be worse for me)
|
363
|
-
migrate_every = 100, # how many steps before a migration between islands
|
364
363
|
mutation_strength = 1., # factor to multiply to gaussian noise as mutation to latents
|
365
364
|
should_run_genetic_algorithm: Module | None = None, # eq (3) in paper
|
366
365
|
default_should_run_ga_gamma = 1.5,
|
366
|
+
migrate_every = 100, # how many steps before a migration between islands
|
367
|
+
apply_genetic_algorithm_every = 2 # how many steps before crossover + mutation happens for genes
|
367
368
|
):
|
368
369
|
super().__init__()
|
369
370
|
|
@@ -413,7 +414,10 @@ class LatentGenePool(Module):
|
|
413
414
|
self.should_run_genetic_algorithm = should_run_genetic_algorithm
|
414
415
|
|
415
416
|
self.can_migrate = num_islands > 1
|
417
|
+
|
416
418
|
self.migrate_every = migrate_every
|
419
|
+
self.apply_genetic_algorithm_every = apply_genetic_algorithm_every
|
420
|
+
|
417
421
|
self.register_buffer('step', tensor(1))
|
418
422
|
|
419
423
|
def get_distance(self):
|
@@ -483,6 +487,10 @@ class LatentGenePool(Module):
|
|
483
487
|
):
|
484
488
|
device = self.latents.device
|
485
489
|
|
490
|
+
if not divisible_by(self.step.item(), self.apply_genetic_algorithm_every):
|
491
|
+
self.advance_step_()
|
492
|
+
return
|
493
|
+
|
486
494
|
"""
|
487
495
|
i - islands
|
488
496
|
p - population
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: evolutionary-policy-optimization
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.53
|
4
4
|
Summary: EPO - Pytorch
|
5
5
|
Project-URL: Homepage, https://pypi.org/project/evolutionary-policy-optimization/
|
6
6
|
Project-URL: Repository, https://github.com/lucidrains/evolutionary-policy-optimization
|
@@ -1,8 +1,8 @@
|
|
1
1
|
evolutionary_policy_optimization/__init__.py,sha256=0q0aBuFgWi06MLMD8FiHzBYQ3_W4LYWrwmCtF3u5H2A,201
|
2
|
-
evolutionary_policy_optimization/epo.py,sha256=
|
2
|
+
evolutionary_policy_optimization/epo.py,sha256=bPg-dC7rvsiNyaYY_1lrzENjq7qezi0p_vuQe5CL2a4,34000
|
3
3
|
evolutionary_policy_optimization/experimental.py,sha256=9FrJGviLESlYysHI3i83efT9g2ZB9ha4u3K9HXN98_w,1100
|
4
4
|
evolutionary_policy_optimization/mock_env.py,sha256=202KJ5g57wQvOzhGYzgHfBa7Y2do5uuDvl5kFg5o73g,934
|
5
|
-
evolutionary_policy_optimization-0.0.
|
6
|
-
evolutionary_policy_optimization-0.0.
|
7
|
-
evolutionary_policy_optimization-0.0.
|
8
|
-
evolutionary_policy_optimization-0.0.
|
5
|
+
evolutionary_policy_optimization-0.0.53.dist-info/METADATA,sha256=O5dS6Cx_kgkim6JfBTH-xZfN4smWFab2aLzXKx-b8rA,6213
|
6
|
+
evolutionary_policy_optimization-0.0.53.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
7
|
+
evolutionary_policy_optimization-0.0.53.dist-info/licenses/LICENSE,sha256=1yCiA9b5nhslTavxPjsQAO-wpOnwJR9-l8LTVi7GJuk,1066
|
8
|
+
evolutionary_policy_optimization-0.0.53.dist-info/RECORD,,
|
File without changes
|