tasks_generator 1.7 → 1.8
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.
- checksums.yaml +4 -4
- data/ext/tasks_generator/variants.h +4 -4
- data/lib/tasks_generator/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b19015067da3f39d1bea51e7c22c8abb170d3f05
|
4
|
+
data.tar.gz: d7e478ed7d608617c9da8401d01d5b1b040dd35e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 342f431e0cd418333f175c73f926ecef620dcb469de54c9d450dc91a6ae4d239c3660fc4663c3e529ead1296aa5dc67238e0fa4ad86b7d3e6486a9774b0a3261
|
7
|
+
data.tar.gz: 78a2e722c793c490e469b5dc79906ee2e27e2a4d576e0064516870bade3cf4c185fcbfc4f347cb239d179dd68322e6ad5c7a0ae4495422490655ad86612b389b
|
@@ -70,8 +70,8 @@ class variants_t {
|
|
70
70
|
}
|
71
71
|
|
72
72
|
double calculate_fitness_function() const noexcept {
|
73
|
-
if (!changed)
|
74
|
-
|
73
|
+
// if (!changed)
|
74
|
+
// return fitness;
|
75
75
|
size_t questions_count = 0;
|
76
76
|
for (auto const &v : questions)
|
77
77
|
questions_count += v.size();
|
@@ -95,7 +95,7 @@ class variants_t {
|
|
95
95
|
size_t count = 1;
|
96
96
|
for (size_t j = 1; j < questions[i].size(); ++j)
|
97
97
|
count += buffer[j] != buffer[j - 1];
|
98
|
-
fitness += count * 10;
|
98
|
+
fitness += count * 10 / questions[i].size();
|
99
99
|
}
|
100
100
|
}
|
101
101
|
{
|
@@ -171,7 +171,7 @@ class variants_t {
|
|
171
171
|
fitness += x;
|
172
172
|
}
|
173
173
|
}
|
174
|
-
changed = false;
|
174
|
+
// changed = false;
|
175
175
|
return fitness;
|
176
176
|
}
|
177
177
|
|