Skip to content

Commit

Permalink
paper
Browse files Browse the repository at this point in the history
  • Loading branch information
Freakwill committed Oct 11, 2024
1 parent a510e23 commit 3b29ad4
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions docs/source/Release History.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
- define `get_worst_elements` method for `PopulationMixin` class
- correct some code in examples and `IterativeMixin` class.
- The argument `n_iter` is changed to `max_iter`
- Debug for new version of `numpy`
- move some optimization algo to the folder `misc`

## v1.5

Expand Down
4 changes: 2 additions & 2 deletions paper/paper.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ There are three base classes in `pyrimidine`: `BaseChromosome`, `BaseIndividual`

For convenience, `pyrimidine` provides some commonly used subclasses, where the genetic operations are implemented such as, `cross` and `mutate`, such as `BinaryChromosome` for the binary encoding as in the classical GA.

Generally, the algorithm design starts as follows, where `MonoIndividual`, a subclass of `BaseIndividual`, enforces that the individuals can only have one chromosome.
Generally, the algorithm design starts as follows, where `MonoIndividual` (a subclass of `BaseIndividual`) simply enforces that an individual can only have one chromosome.

```python
class UserIndividual(MonoIndividual):
Expand All @@ -148,7 +148,7 @@ UserPopulation = StandardPopulation[UserIndividual] // 10

Instead of overriding the `fitness` attribute, users are recommended to override the `_fitness` method, where the concrete fitness computation is defined. The operator `// 10` is equivalent to set `default_size = 10`.

Algebraically, there is no difference between `MonoIndividual` and `Chromosome`. Meanwhile the population also can be treated as a container of chromosomes as follows.
Algebraically, there is no difference between `MonoIndividual` and `Chromosome`. Meanwhile the population also can be treated as a container of chromosomes as follows.

```python
class UserChromosome(BaseChromosome):
Expand Down
1 change: 1 addition & 0 deletions pyrimidine/deco.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
Two main kinds of decorators:
1. cache decorator: store the information of previous computing, to seep up the algorithm.
Should clear it to suppress the side effect. It is used with `@side-effect` decorator.
methods with `@side-effect` will clear the cache after executing.
2. memory decorator: As cache, it record some information, but it will chage the behavior of the algorithms.
"""

Expand Down
1 change: 0 additions & 1 deletion pyrimidine/ep.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env python3


"""Evolution Programming
Invented by L. Fogel[1966] for designing FSM initially.
Expand Down
4 changes: 3 additions & 1 deletion pyrimidine/gene.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#!/usr/bin/env python3

"""
Gene classes
Gene classes: as the elements in the chromosome.
The wrapper of data type of `numpy`.
"""

import numpy as np
Expand Down

0 comments on commit 3b29ad4

Please sign in to comment.