CodingTrain / CodingTrain/Suggestion-Box

Evolution time

Đang mở
#481 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
570
Fork
85
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

I have an idea of decreasing evolution time by shifting gene index for fitness calculation.

Suppose we want to generate "To be or not to be". We compare every single letter to the result every time we want to calculate fitness. Code below increases comparing gene index starting point by 1 every 10th generation is made. Every time fitness calculation is active, comparing gene index will increase by 3.

The question arises. How can we be sure that every 3rd gene with starting point of 1 and 2 is "correct" after 20 generations? Maybe new way of reproduction or just adding an inspection array in fitness calculation method?

public class Evolution {

private final int TIME_INTERVAL = 10;
private final int GENE_SHIFT = 3;

private int geneStart = 0;

public Evolution(DNA resultDNA) {
startEvolution(resultDNA);
}

public void startEvolution(DNA resultDNA) {
initializePopulation();

int counter = 0;

while(true) {
counter++;

if(counter > TIME_INTERVAL) {
geneStart++;

if(geneStart > GENE_SHIFT - 1) {
geneStart = 0;
}

counter = 0;
}

calculateFitness(resultDNA.getGenes());
doSelection();
doReproduction();

if(evaluationOK()) {
break;
}
}
}

private void calculateFitness(Gene[] resultGenes) {
for(DNA dna : population) {
Gene[] genes = dna.getGenes();

dna.setFitness(0);

int i = geneStart;

while(i < genes.length) {
if(genes[i] == resultGenes[i]) {
dna.increaseFitness();
}

i += GENE_SHIFT;
}
}
}

private void doSelection() {
//...
}

private void doReproduction() {
//...
}
}

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Không có tệp repository, test hoặc entry point nào được nêu. Hãy bắt đầu bằng cách xác định mọi triển khai hiện có liên quan đến quá trình tiến hóa hoặc việc tính fitness của đề xuất này, sau đó xem xét liệu cách tiếp cận dịch chuyển gene có duy trì độ bao phủ fitness qua các thế hệ hay không. Issue không định nghĩa thế nào là hoàn thành; trước tiên, một contributor cần thống nhất một thuật toán và các tiêu chí validation.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
java
Lĩnh vực
machine-learning
Loại issue
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
20/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.