Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update code comments in individual #52

Merged
merged 1 commit into from
Aug 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/individual.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,15 @@ def __init__(self,
The minimum values for each gene in the chromosome.
maxs: list[float]
The maximum values for each gene in the chromosome.

Description:
------------
The Individual class represents an individual in an evolutionary algorithm.
If the genome type is BINARY, the chromosome is a list of 0s and 1s.
If the genome type is PERMUTATION, the chromosome is a list of integers representing a permutation.
In both the binary and permutation cases, ch_size is enought to represent the chromosome.
If the genome type is REAL, the chromosome is a list of real numbers.
In this case, the mins and maxs lists are used to define the range of each gene in the chromosome.
"""
self.gen_type = gen_type
self.ch_size = ch_size
Expand Down
Loading