tasks_generator 1.7 → 1.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cf9b99a2358910cb476a4fbb8ee034ad759e19a0
4
- data.tar.gz: 826628f580006c3234cc91088d05b8710463b000
3
+ metadata.gz: b19015067da3f39d1bea51e7c22c8abb170d3f05
4
+ data.tar.gz: d7e478ed7d608617c9da8401d01d5b1b040dd35e
5
5
  SHA512:
6
- metadata.gz: f5166b76444b3573cbbea491a79d9c65cfbd08ec3b09cac8c2471cf2e78cd3c9bd8c47be01470cce1dacd4b4b95ade77591887e4edfd5de437653b2a298a700e
7
- data.tar.gz: 2fbd0125e44cd3fe1faf3584190060bdb999be3418fc468d9b9735d486c50837bba89188b2ad1cb7d96f5fe8850a1ec283ea5872ac526745d3a8ab38f5e7c6ef
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
- return fitness;
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
 
@@ -1,3 +1,3 @@
1
1
  module TasksGenerator
2
- VERSION = "1.7"
2
+ VERSION = "1.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tasks_generator
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.7'
4
+ version: '1.8'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arslan Urtashev