tasks_generator 0.4 → 0.5

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: c534d75e82be3dbf6015406c4c1fd7ceb12dfb15
4
- data.tar.gz: 43d274a908e07f98d10adc8758051a9b86eed271
3
+ metadata.gz: df500fd0b31dd89d245bba5d3c053c85fcce70bc
4
+ data.tar.gz: 39b7d2b58aaf8c4cda12f8090c0a87a5e0d34ad5
5
5
  SHA512:
6
- metadata.gz: 6a7bf53f91f13ec888ec08bc427715b1ff13d2ca80152447501668fd90c430905f7e4a8001e14a75a4582e04cfae8af83b11ed2a434fa0f76d77becae78d345f
7
- data.tar.gz: 40f74d62fcf5eab033da5c6ff1e3537738e8bc0e6883d30744670af8dcfe8ab6959468168b6b375957faa56f899f61cfb9411ed3d206bc7e5dcea468b439a150
6
+ metadata.gz: e5b154d344d579dfcf2b195cc83c11eaf9ac1388808cc4b1018b394f7db76a64b169e67bfbfc915ee21dac4b86e7e03490e9df6a8d2dfb34bff3e2fc32391e7e
7
+ data.tar.gz: 8257965c4b2ef0c80f7680dee458d361a61ab0d89c29cfccdf84754b741fd69781e3e44329d3d52cd85f4ef44462746004c7d4fceaf1c7cf422999d361785f71
@@ -82,7 +82,13 @@ static double fitness(individual_t const &individual) {
82
82
  }
83
83
  double d = (sqrs - s * s / individual.size()) / individual.size();
84
84
  double metric_one = (d > 0 ? 1.0 / d + 1.0 : 2);
85
- return metric_one; // FIXME: add diff metric
85
+
86
+ std::unordered_set<size_t> uniqs;
87
+ for (task_t const &task : individual)
88
+ for (question_t const &question : task)
89
+ uniqs.insert(question.get_question_id());
90
+
91
+ return metric_one * uniqs.size(); // FIXME: add diff metric
86
92
  }
87
93
 
88
94
  static individual_t crossover(individual_t const &a, individual_t const &b) {
@@ -1,3 +1,3 @@
1
1
  module TasksGenerator
2
- VERSION = "0.4"
2
+ VERSION = "0.5"
3
3
  end
metadata CHANGED
@@ -1,55 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tasks_generator
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.4'
4
+ version: '0.5'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arslan Urtashev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-02 00:00:00.000000000 Z
11
+ date: 2014-06-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ~>
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.6'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ~>
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.6'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rice
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - '>='
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - '>='
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  description: Test Tasks Generator for AI lab MEPhI
@@ -87,17 +87,17 @@ require_paths:
87
87
  - lib
88
88
  required_ruby_version: !ruby/object:Gem::Requirement
89
89
  requirements:
90
- - - ">="
90
+ - - '>='
91
91
  - !ruby/object:Gem::Version
92
92
  version: '0'
93
93
  required_rubygems_version: !ruby/object:Gem::Requirement
94
94
  requirements:
95
- - - ">="
95
+ - - '>='
96
96
  - !ruby/object:Gem::Version
97
97
  version: '0'
98
98
  requirements: []
99
99
  rubyforge_project:
100
- rubygems_version: 2.2.2
100
+ rubygems_version: 2.0.14
101
101
  signing_key:
102
102
  specification_version: 4
103
103
  summary: Test Tasks Generator