ttt 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +6 -0
- data/Gemfile.lock +51 -0
- data/MIT-License.md +8 -0
- data/Rakefile +324 -0
- data/Readme.md +35 -0
- data/bin/ttt +6 -0
- data/features/binary.feature +39 -0
- data/features/computer_player.feature +62 -0
- data/features/create_game.feature +63 -0
- data/features/finish_game.feature +53 -0
- data/features/finished_states.feature +56 -0
- data/features/mark_board.feature +24 -0
- data/features/step_definitions/binary_steps.rb +42 -0
- data/features/step_definitions/ttt_steps.rb +82 -0
- data/features/support/env.rb +8 -0
- data/features/view_board_as_developer.feature +13 -0
- data/features/view_board_as_tester.feature +9 -0
- data/lib/ttt.rb +1 -0
- data/lib/ttt/binary.rb +96 -0
- data/lib/ttt/computer_player.rb +74 -0
- data/lib/ttt/game.rb +129 -0
- data/lib/ttt/interface.rb +22 -0
- data/lib/ttt/interface/cli.rb +95 -0
- data/lib/ttt/interface/cli/players.rb +56 -0
- data/lib/ttt/interface/cli/views.rb +124 -0
- data/lib/ttt/interface/limelight.rb +18 -0
- data/lib/ttt/interface/limelight/players/restart_as_first.rb +5 -0
- data/lib/ttt/interface/limelight/players/restart_as_second.rb +6 -0
- data/lib/ttt/interface/limelight/players/square.rb +105 -0
- data/lib/ttt/interface/limelight/props.rb +10 -0
- data/lib/ttt/interface/limelight/styles.rb +101 -0
- data/lib/ttt/ratings.rb +849 -0
- data/spec/spec_helper.rb +10 -0
- data/spec/ttt/computer_player_spec.rb +86 -0
- data/spec/ttt/game_spec.rb +294 -0
- data/spec/ttt/rating_spec.rb +75 -0
- metadata +139 -0
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'ttt/interface/cli/players'
|
2
|
+
require 'ttt/interface/cli/views'
|
3
|
+
|
4
|
+
module TTT
|
5
|
+
module Interface
|
6
|
+
class Limelight
|
7
|
+
Interface.register 'limelight', self
|
8
|
+
|
9
|
+
def initialize(*args)
|
10
|
+
end
|
11
|
+
|
12
|
+
def play
|
13
|
+
system "limelight", "open", "#{File.dirname(__FILE__)}/limelight"
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,105 @@
|
|
1
|
+
$: << File.expand_path('../../../../..', __FILE__)
|
2
|
+
require 'ttt'
|
3
|
+
require 'ttt/computer_player'
|
4
|
+
|
5
|
+
module Square
|
6
|
+
|
7
|
+
def casted
|
8
|
+
Square.register self
|
9
|
+
end
|
10
|
+
|
11
|
+
def position
|
12
|
+
id[/\d/].to_i
|
13
|
+
end
|
14
|
+
|
15
|
+
def mouse_clicked(event)
|
16
|
+
Square.clicked(position)
|
17
|
+
end
|
18
|
+
|
19
|
+
def mark(player)
|
20
|
+
if player == 1
|
21
|
+
self.text = 'X'
|
22
|
+
self.style.text_color = :red
|
23
|
+
else
|
24
|
+
self.text = 'O'
|
25
|
+
self.style.text_color = :blue
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
def unmark
|
30
|
+
self.text = String.new
|
31
|
+
end
|
32
|
+
|
33
|
+
def marked?
|
34
|
+
!text.empty?
|
35
|
+
end
|
36
|
+
|
37
|
+
def game_over
|
38
|
+
self.style.text_color = :gray
|
39
|
+
end
|
40
|
+
|
41
|
+
def mark_winner
|
42
|
+
self.style.text_color = :green
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
|
47
|
+
|
48
|
+
class << Square
|
49
|
+
|
50
|
+
def reset
|
51
|
+
@game = @current_turn = nil
|
52
|
+
squares.each_value { |square| square.unmark }
|
53
|
+
end
|
54
|
+
|
55
|
+
def game
|
56
|
+
@game ||= TTT::Game.new
|
57
|
+
end
|
58
|
+
|
59
|
+
def current_turn
|
60
|
+
@current_turn ||= 1
|
61
|
+
end
|
62
|
+
|
63
|
+
def advance_turn
|
64
|
+
@current_turn = (@current_turn % 2) + 1
|
65
|
+
end
|
66
|
+
|
67
|
+
def squares
|
68
|
+
@squares ||= {}
|
69
|
+
end
|
70
|
+
|
71
|
+
def register(square)
|
72
|
+
squares[square.position] = square
|
73
|
+
end
|
74
|
+
|
75
|
+
def clicked(position)
|
76
|
+
return unless can_click? position
|
77
|
+
mark position
|
78
|
+
computer_takes_turn
|
79
|
+
end
|
80
|
+
|
81
|
+
def computer_takes_turn
|
82
|
+
position = TTT::ComputerPlayer.new(game).best_move
|
83
|
+
return unless can_click? position
|
84
|
+
mark position
|
85
|
+
end
|
86
|
+
|
87
|
+
def can_click?(position)
|
88
|
+
squares[position] && !squares[position].marked? && !game.over?
|
89
|
+
end
|
90
|
+
|
91
|
+
def mark(position)
|
92
|
+
game.mark position
|
93
|
+
squares[position].mark current_turn
|
94
|
+
advance_turn
|
95
|
+
check_for_end_of_game
|
96
|
+
end
|
97
|
+
|
98
|
+
def check_for_end_of_game
|
99
|
+
if game.over?
|
100
|
+
squares.each_value { |square| square.game_over }
|
101
|
+
game.winning_positions.each { |position| squares[position].mark_winner }
|
102
|
+
end
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
@@ -0,0 +1,10 @@
|
|
1
|
+
__ :name => 'tic_tac_toe'
|
2
|
+
|
3
|
+
controls do
|
4
|
+
restart_as_first :text => 'Restart as first player', :id => 'restart_first'
|
5
|
+
restart_as_second :text => 'Restart as second player', :id => 'restart_second'
|
6
|
+
end
|
7
|
+
|
8
|
+
squares do
|
9
|
+
(1..9).each { |n| square :id => "square#{n}", :styles => "square#{n}" }
|
10
|
+
end
|
@@ -0,0 +1,101 @@
|
|
1
|
+
tic_tac_toe {
|
2
|
+
background_color :white
|
3
|
+
padding 10
|
4
|
+
}
|
5
|
+
|
6
|
+
controls {
|
7
|
+
height '20%'
|
8
|
+
}
|
9
|
+
|
10
|
+
restarters {
|
11
|
+
width 170
|
12
|
+
height '100%'
|
13
|
+
text_color :white
|
14
|
+
font_size 20
|
15
|
+
vertical_alignment :center
|
16
|
+
horizontal_alignment :center
|
17
|
+
background_color :gray
|
18
|
+
rounded_corner_radius 10
|
19
|
+
top_margin 20
|
20
|
+
bottom_margin 20
|
21
|
+
}
|
22
|
+
|
23
|
+
restart_as_first {
|
24
|
+
extends :restarters
|
25
|
+
left_margin 20
|
26
|
+
right_margin 10
|
27
|
+
}
|
28
|
+
|
29
|
+
restart_as_second {
|
30
|
+
extends :restarters
|
31
|
+
left_margin 10
|
32
|
+
right_margin 20
|
33
|
+
}
|
34
|
+
|
35
|
+
squares {
|
36
|
+
width 340
|
37
|
+
background_color :green
|
38
|
+
}
|
39
|
+
|
40
|
+
# I have to do it this way, because
|
41
|
+
# I want to override the width/height
|
42
|
+
square_styles {
|
43
|
+
width 100
|
44
|
+
height 100
|
45
|
+
background_color :white
|
46
|
+
text_color :black
|
47
|
+
font_size 40
|
48
|
+
vertical_alignment :center
|
49
|
+
horizontal_alignment :center
|
50
|
+
border_color :black
|
51
|
+
}
|
52
|
+
|
53
|
+
left_of_another_square {
|
54
|
+
width 120
|
55
|
+
right_border_width 20
|
56
|
+
}
|
57
|
+
above_another_square {
|
58
|
+
height 120
|
59
|
+
bottom_border_width 20
|
60
|
+
}
|
61
|
+
square1 {
|
62
|
+
extends :left_of_another_square
|
63
|
+
extends :above_another_square
|
64
|
+
extends :square_styles
|
65
|
+
}
|
66
|
+
square2 {
|
67
|
+
extends :left_of_another_square
|
68
|
+
extends :above_another_square
|
69
|
+
extends :square_styles
|
70
|
+
}
|
71
|
+
square3 {
|
72
|
+
extends :above_another_square
|
73
|
+
extends :square_styles
|
74
|
+
}
|
75
|
+
|
76
|
+
square4 {
|
77
|
+
extends :left_of_another_square
|
78
|
+
extends :above_another_square
|
79
|
+
extends :square_styles
|
80
|
+
}
|
81
|
+
square5 {
|
82
|
+
extends :left_of_another_square
|
83
|
+
extends :above_another_square
|
84
|
+
extends :square_styles
|
85
|
+
}
|
86
|
+
square6 {
|
87
|
+
extends :above_another_square
|
88
|
+
extends :square_styles
|
89
|
+
}
|
90
|
+
|
91
|
+
square7 {
|
92
|
+
extends :left_of_another_square
|
93
|
+
extends :square_styles
|
94
|
+
}
|
95
|
+
square8 {
|
96
|
+
extends :left_of_another_square
|
97
|
+
extends :square_styles
|
98
|
+
}
|
99
|
+
square9 {
|
100
|
+
extends :square_styles
|
101
|
+
}
|
data/lib/ttt/ratings.rb
ADDED
@@ -0,0 +1,849 @@
|
|
1
|
+
module TTT
|
2
|
+
|
3
|
+
# Not used actively in the program
|
4
|
+
# Instead, it is used to precalculate the ratings below
|
5
|
+
class Rating
|
6
|
+
|
7
|
+
attr_accessor :game, :parent, :children
|
8
|
+
|
9
|
+
def initialize(game_or_board='000000000', parent=nil)
|
10
|
+
game_or_board = Game.new game_or_board unless game_or_board.is_a? Game
|
11
|
+
self.game = game_or_board
|
12
|
+
self.parent = parent
|
13
|
+
end
|
14
|
+
|
15
|
+
def to_s
|
16
|
+
game.board :ttt
|
17
|
+
end
|
18
|
+
|
19
|
+
def children
|
20
|
+
@children ||= begin
|
21
|
+
children = {}
|
22
|
+
game.available_moves.each do |move|
|
23
|
+
children[move] = self.class.new game.pristine_mark(move), self
|
24
|
+
end
|
25
|
+
children
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
def leaf?
|
30
|
+
children.empty?
|
31
|
+
end
|
32
|
+
|
33
|
+
def rating_for(player_number)
|
34
|
+
if leaf?
|
35
|
+
return 0 if game.tie?
|
36
|
+
return 1 if game.winner == player_number
|
37
|
+
return -1
|
38
|
+
else
|
39
|
+
ratings = children.map { |_, child| child.rating_for player_number }
|
40
|
+
crnt_player = game.turn
|
41
|
+
if crnt_player == player_number
|
42
|
+
return 1 if ratings.any? { |rating| rating == 1 } # if my turn, and I can move to a win, then I win
|
43
|
+
return -1 if ratings.all? { |rating| rating == -1 } # if my turn, and all moves are losses, then I lose
|
44
|
+
ratings.reject! { |rating| rating == -1 }
|
45
|
+
return ratings.inject(:+).to_f / ratings.size # otherwise, rating is the average of non-losing moves (I will never make a losing move)
|
46
|
+
else
|
47
|
+
return -1 if ratings.any? { |rating| rating == -1 } # if his turn, and he can win, then I lose
|
48
|
+
return 1 if ratings.all? { |rating| rating == 1 } # if his turn, and all his moves lead to wins for me, then I win
|
49
|
+
return ratings.inject(:+).to_f / ratings.size # otherwise, rating is the average of possible move scores
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
end
|
55
|
+
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
# Have to do this silly song and dance in order to work on 1.8.7
|
60
|
+
# which is what JRuby is currently running, which powers Limelight, which I want to use as an interface
|
61
|
+
ratinsgs_default_proc = lambda do |boards, board|
|
62
|
+
|
63
|
+
# Handle congruent boards
|
64
|
+
Game.each_congruent board do |congruent_board|
|
65
|
+
return boards[congruent_board] if boards.has_key? congruent_board
|
66
|
+
end
|
67
|
+
|
68
|
+
# This shouldn't ever happen, but if it does,
|
69
|
+
# We know what to do anyway, so do it rather than blowing up
|
70
|
+
tree = Rating.new board
|
71
|
+
boards[board] = {
|
72
|
+
1 => tree.rating_for(1),
|
73
|
+
2 => tree.rating_for(2),
|
74
|
+
}
|
75
|
+
end
|
76
|
+
|
77
|
+
RATINGS = Hash.new(&ratinsgs_default_proc)
|
78
|
+
|
79
|
+
# the contents of RATINGS
|
80
|
+
# Calculated with the above code in the rake task script:ratings
|
81
|
+
{
|
82
|
+
"000000000"=>{1=>0.9678112139917696, 2=>0.7774838330393885},
|
83
|
+
"100000000"=>{1=>0.9884052579365079, 2=>0.8714285714285716},
|
84
|
+
"120000000"=>{1=>1, 2=>-1},
|
85
|
+
"121000000"=>{1=>0.9027777777777777, 2=>0.8666666666666668},
|
86
|
+
"121200000"=>{1=>1, 2=>-1},
|
87
|
+
"121210000"=>{1=>1, 2=>-1},
|
88
|
+
"121212000"=>{1=>1, 2=>-1},
|
89
|
+
"121212100"=>{1=>1, 2=>-1},
|
90
|
+
"121212010"=>{1=>1, 2=>-1},
|
91
|
+
"121212210"=>{1=>1, 2=>-1},
|
92
|
+
"121212211"=>{1=>1, 2=>-1},
|
93
|
+
"121210200"=>{1=>1, 2=>-1},
|
94
|
+
"121211200"=>{1=>0.5, 2=>0.0},
|
95
|
+
"121211220"=>{1=>1, 2=>-1},
|
96
|
+
"121211221"=>{1=>1, 2=>-1},
|
97
|
+
"121211202"=>{1=>0.0, 2=>0.0},
|
98
|
+
"121211212"=>{1=>0, 2=>0},
|
99
|
+
"121210210"=>{1=>0.5, 2=>0.0},
|
100
|
+
"121210212"=>{1=>0.0, 2=>0.0},
|
101
|
+
"121210201"=>{1=>1, 2=>-1},
|
102
|
+
"121210020"=>{1=>1, 2=>-1},
|
103
|
+
"121211020"=>{1=>1, 2=>-1},
|
104
|
+
"121211022"=>{1=>1, 2=>-1},
|
105
|
+
"121210021"=>{1=>1, 2=>-1},
|
106
|
+
"121210002"=>{1=>1, 2=>-1},
|
107
|
+
"121211002"=>{1=>0.5, 2=>0.0},
|
108
|
+
"121210102"=>{1=>1, 2=>-1},
|
109
|
+
"121210012"=>{1=>0.5, 2=>0.0},
|
110
|
+
"121201000"=>{1=>0.8333333333333334, 2=>0.0},
|
111
|
+
"121221000"=>{1=>1, 2=>-1},
|
112
|
+
"121221100"=>{1=>-1, 2=>1},
|
113
|
+
"121221120"=>{1=>-1, 2=>1},
|
114
|
+
"121221102"=>{1=>0.0, 2=>0.0},
|
115
|
+
"121221112"=>{1=>0, 2=>0},
|
116
|
+
"121221010"=>{1=>0.5, 2=>0.0},
|
117
|
+
"121221210"=>{1=>1, 2=>-1},
|
118
|
+
"121221211"=>{1=>1, 2=>-1},
|
119
|
+
"121221012"=>{1=>0.0, 2=>0.0},
|
120
|
+
"121221001"=>{1=>1, 2=>-1},
|
121
|
+
"121201200"=>{1=>1, 2=>-1},
|
122
|
+
"121201210"=>{1=>0.5, 2=>0.0},
|
123
|
+
"121201212"=>{1=>0.0, 2=>0.0},
|
124
|
+
"121201201"=>{1=>1, 2=>-1},
|
125
|
+
"121201020"=>{1=>1, 2=>-1},
|
126
|
+
"121201120"=>{1=>-1, 2=>1},
|
127
|
+
"121201122"=>{1=>1, 2=>-1},
|
128
|
+
"121201021"=>{1=>1, 2=>-1},
|
129
|
+
"121201002"=>{1=>0.3333333333333333, 2=>0.0},
|
130
|
+
"121201102"=>{1=>0.5, 2=>0.0},
|
131
|
+
"121201012"=>{1=>0.0, 2=>0.0},
|
132
|
+
"121200100"=>{1=>-1, 2=>1},
|
133
|
+
"121220100"=>{1=>-1, 2=>1},
|
134
|
+
"121220101"=>{1=>-1, 2=>1},
|
135
|
+
"121222101"=>{1=>-1, 2=>1},
|
136
|
+
"121202100"=>{1=>1, 2=>-1},
|
137
|
+
"121202101"=>{1=>-1, 2=>1},
|
138
|
+
"121202121"=>{1=>1, 2=>-1},
|
139
|
+
"121212121"=>{1=>1, 2=>-1},
|
140
|
+
"121200102"=>{1=>1, 2=>-1},
|
141
|
+
"121200010"=>{1=>0.7083333333333334, 2=>0.3333333333333333},
|
142
|
+
"121220010"=>{1=>0.5, 2=>0.6666666666666666},
|
143
|
+
"121220011"=>{1=>-1, 2=>1},
|
144
|
+
"121220211"=>{1=>1, 2=>-1},
|
145
|
+
"121202010"=>{1=>1, 2=>-1},
|
146
|
+
"121200210"=>{1=>1, 2=>-1},
|
147
|
+
"121200211"=>{1=>1, 2=>-1},
|
148
|
+
"121200012"=>{1=>0.3333333333333333, 2=>0.0},
|
149
|
+
"121200001"=>{1=>1, 2=>-1},
|
150
|
+
"121220001"=>{1=>1, 2=>-1},
|
151
|
+
"121200201"=>{1=>1, 2=>-1},
|
152
|
+
"121200021"=>{1=>1, 2=>-1},
|
153
|
+
"121020000"=>{1=>0.41666666666666663, 2=>0.8666666666666668},
|
154
|
+
"121120000"=>{1=>-1, 2=>1},
|
155
|
+
"121120200"=>{1=>0.0, 2=>0.6666666666666666},
|
156
|
+
"121121200"=>{1=>-1, 2=>1},
|
157
|
+
"121121220"=>{1=>-1, 2=>1},
|
158
|
+
"121121202"=>{1=>0.0, 2=>0.0},
|
159
|
+
"121121212"=>{1=>0, 2=>0},
|
160
|
+
"121120210"=>{1=>0.0, 2=>0.0},
|
161
|
+
"121120212"=>{1=>0.0, 2=>0.0},
|
162
|
+
"121120201"=>{1=>-1, 2=>1},
|
163
|
+
"121120221"=>{1=>-1, 2=>1},
|
164
|
+
"121120020"=>{1=>-1, 2=>1},
|
165
|
+
"121120002"=>{1=>1, 2=>-1},
|
166
|
+
"121120102"=>{1=>1, 2=>-1},
|
167
|
+
"121120012"=>{1=>0.5, 2=>0.0},
|
168
|
+
"121020100"=>{1=>-1, 2=>1},
|
169
|
+
"121020120"=>{1=>-1, 2=>1},
|
170
|
+
"121020102"=>{1=>1, 2=>-1},
|
171
|
+
"121020112"=>{1=>0.5, 2=>0.0},
|
172
|
+
"121020010"=>{1=>0.41666666666666663, 2=>0.3333333333333333},
|
173
|
+
"121020210"=>{1=>0.3333333333333333, 2=>0.0},
|
174
|
+
"121000200"=>{1=>1, 2=>-1},
|
175
|
+
"121100200"=>{1=>-1, 2=>1},
|
176
|
+
"121100220"=>{1=>-1, 2=>1},
|
177
|
+
"121110220"=>{1=>-1, 2=>1},
|
178
|
+
"121110222"=>{1=>-1, 2=>1},
|
179
|
+
"121101220"=>{1=>-1, 2=>1},
|
180
|
+
"121101222"=>{1=>-1, 2=>1},
|
181
|
+
"121100221"=>{1=>-1, 2=>1},
|
182
|
+
"121100202"=>{1=>0.0, 2=>0.6666666666666666},
|
183
|
+
"121110202"=>{1=>-1, 2=>1},
|
184
|
+
"121101202"=>{1=>-1, 2=>1},
|
185
|
+
"121100212"=>{1=>0.0, 2=>0.0},
|
186
|
+
"121010200"=>{1=>0.75, 2=>0.6666666666666666},
|
187
|
+
"121010220"=>{1=>1, 2=>-1},
|
188
|
+
"121011220"=>{1=>-1, 2=>1},
|
189
|
+
"121010221"=>{1=>1, 2=>-1},
|
190
|
+
"121010202"=>{1=>0.0, 2=>0.6666666666666666},
|
191
|
+
"121010212"=>{1=>0.0, 2=>0.0},
|
192
|
+
"121001200"=>{1=>0.75, 2=>0.6666666666666666},
|
193
|
+
"121001220"=>{1=>1, 2=>-1},
|
194
|
+
"121001221"=>{1=>1, 2=>-1},
|
195
|
+
"121000210"=>{1=>0.41666666666666663, 2=>0.0},
|
196
|
+
"121000212"=>{1=>0.0, 2=>0.0},
|
197
|
+
"121000201"=>{1=>1, 2=>-1},
|
198
|
+
"121000221"=>{1=>1, 2=>-1},
|
199
|
+
"121000020"=>{1=>1, 2=>-1},
|
200
|
+
"121100020"=>{1=>-1, 2=>1},
|
201
|
+
"121010020"=>{1=>1, 2=>-1},
|
202
|
+
"121000120"=>{1=>-1, 2=>1},
|
203
|
+
"120100000"=>{1=>1, 2=>-1},
|
204
|
+
"122100000"=>{1=>1, 2=>-1},
|
205
|
+
"122110000"=>{1=>1, 2=>-1},
|
206
|
+
"122112000"=>{1=>1, 2=>-1},
|
207
|
+
"122112100"=>{1=>1, 2=>-1},
|
208
|
+
"122112010"=>{1=>-1, 2=>1},
|
209
|
+
"122112210"=>{1=>1, 2=>-1},
|
210
|
+
"122112211"=>{1=>1, 2=>-1},
|
211
|
+
"122112012"=>{1=>-1, 2=>1},
|
212
|
+
"122112001"=>{1=>1, 2=>-1},
|
213
|
+
"122110200"=>{1=>1, 2=>-1},
|
214
|
+
"122111200"=>{1=>1, 2=>-1},
|
215
|
+
"122110210"=>{1=>1, 2=>-1},
|
216
|
+
"122110212"=>{1=>1, 2=>-1},
|
217
|
+
"122111212"=>{1=>1, 2=>-1},
|
218
|
+
"122110201"=>{1=>1, 2=>-1},
|
219
|
+
"122110020"=>{1=>1, 2=>-1},
|
220
|
+
"122111020"=>{1=>1, 2=>-1},
|
221
|
+
"122110120"=>{1=>1, 2=>-1},
|
222
|
+
"122110021"=>{1=>1, 2=>-1},
|
223
|
+
"122110002"=>{1=>1, 2=>-1},
|
224
|
+
"122111002"=>{1=>1, 2=>-1},
|
225
|
+
"122110102"=>{1=>1, 2=>-1},
|
226
|
+
"122110012"=>{1=>-1, 2=>1},
|
227
|
+
"122101000"=>{1=>1, 2=>-1},
|
228
|
+
"122121000"=>{1=>1, 2=>-1},
|
229
|
+
"122121100"=>{1=>1, 2=>-1},
|
230
|
+
"122121010"=>{1=>-1, 2=>1},
|
231
|
+
"122121210"=>{1=>-1, 2=>1},
|
232
|
+
"122121012"=>{1=>1, 2=>-1},
|
233
|
+
"122121112"=>{1=>1, 2=>-1},
|
234
|
+
"122121001"=>{1=>-1, 2=>1},
|
235
|
+
"122121201"=>{1=>-1, 2=>1},
|
236
|
+
"122121021"=>{1=>-1, 2=>1},
|
237
|
+
"122101200"=>{1=>1, 2=>-1},
|
238
|
+
"122101210"=>{1=>-1, 2=>1},
|
239
|
+
"122101212"=>{1=>1, 2=>-1},
|
240
|
+
"122101201"=>{1=>-1, 2=>1},
|
241
|
+
"122101221"=>{1=>1, 2=>-1},
|
242
|
+
"122111221"=>{1=>1, 2=>-1},
|
243
|
+
"122101020"=>{1=>1, 2=>-1},
|
244
|
+
"122101120"=>{1=>1, 2=>-1},
|
245
|
+
"122101021"=>{1=>-1, 2=>1},
|
246
|
+
"122101002"=>{1=>1, 2=>-1},
|
247
|
+
"122101102"=>{1=>1, 2=>-1},
|
248
|
+
"122101012"=>{1=>1, 2=>-1},
|
249
|
+
"122100100"=>{1=>1, 2=>-1},
|
250
|
+
"122100010"=>{1=>1, 2=>-1},
|
251
|
+
"122120010"=>{1=>1, 2=>-1},
|
252
|
+
"122120110"=>{1=>1, 2=>-1},
|
253
|
+
"122120011"=>{1=>-1, 2=>1},
|
254
|
+
"122122011"=>{1=>1, 2=>-1},
|
255
|
+
"122122111"=>{1=>1, 2=>-1},
|
256
|
+
"122120211"=>{1=>-1, 2=>1},
|
257
|
+
"122102010"=>{1=>1, 2=>-1},
|
258
|
+
"122102110"=>{1=>1, 2=>-1},
|
259
|
+
"122102011"=>{1=>1, 2=>-1},
|
260
|
+
"122102211"=>{1=>1, 2=>-1},
|
261
|
+
"122100210"=>{1=>1, 2=>-1},
|
262
|
+
"122100211"=>{1=>-1, 2=>1},
|
263
|
+
"122100012"=>{1=>1, 2=>-1},
|
264
|
+
"122100112"=>{1=>1, 2=>-1},
|
265
|
+
"122100001"=>{1=>1, 2=>-1},
|
266
|
+
"122120001"=>{1=>1, 2=>-1},
|
267
|
+
"122120101"=>{1=>1, 2=>-1},
|
268
|
+
"122102001"=>{1=>1, 2=>-1},
|
269
|
+
"122102101"=>{1=>1, 2=>-1},
|
270
|
+
"122100201"=>{1=>1, 2=>-1},
|
271
|
+
"122100021"=>{1=>1, 2=>-1},
|
272
|
+
"120120000"=>{1=>1, 2=>-1},
|
273
|
+
"120121000"=>{1=>-1, 2=>1},
|
274
|
+
"120121200"=>{1=>-1, 2=>1},
|
275
|
+
"120121210"=>{1=>-1, 2=>1},
|
276
|
+
"120121212"=>{1=>0.0, 2=>0.0},
|
277
|
+
"120121201"=>{1=>-1, 2=>1},
|
278
|
+
"120121020"=>{1=>-1, 2=>1},
|
279
|
+
"120121002"=>{1=>1, 2=>-1},
|
280
|
+
"120121102"=>{1=>1, 2=>-1},
|
281
|
+
"120121012"=>{1=>0.5, 2=>0.0},
|
282
|
+
"120120100"=>{1=>1, 2=>-1},
|
283
|
+
"120120010"=>{1=>0.75, 2=>0.6666666666666666},
|
284
|
+
"120122010"=>{1=>1, 2=>-1},
|
285
|
+
"120122110"=>{1=>1, 2=>-1},
|
286
|
+
"120122011"=>{1=>0.5, 2=>0.0},
|
287
|
+
"120122211"=>{1=>0.0, 2=>0.0},
|
288
|
+
"120120210"=>{1=>0.0, 2=>0.6666666666666666},
|
289
|
+
"120120211"=>{1=>-1, 2=>1},
|
290
|
+
"120120012"=>{1=>1, 2=>-1},
|
291
|
+
"120120112"=>{1=>1, 2=>-1},
|
292
|
+
"120120001"=>{1=>-1, 2=>1},
|
293
|
+
"120122001"=>{1=>1, 2=>-1},
|
294
|
+
"120122101"=>{1=>1, 2=>-1},
|
295
|
+
"120120201"=>{1=>-1, 2=>1},
|
296
|
+
"120120021"=>{1=>-1, 2=>1},
|
297
|
+
"120102000"=>{1=>1, 2=>-1},
|
298
|
+
"120112000"=>{1=>1, 2=>-1},
|
299
|
+
"120112200"=>{1=>1, 2=>-1},
|
300
|
+
"120112210"=>{1=>0.5, 2=>0.0},
|
301
|
+
"120112212"=>{1=>0.0, 2=>0.0},
|
302
|
+
"120112201"=>{1=>1, 2=>-1},
|
303
|
+
"120112020"=>{1=>1, 2=>-1},
|
304
|
+
"120112120"=>{1=>1, 2=>-1},
|
305
|
+
"120112021"=>{1=>1, 2=>-1},
|
306
|
+
"120112002"=>{1=>1, 2=>-1},
|
307
|
+
"120112102"=>{1=>1, 2=>-1},
|
308
|
+
"120112012"=>{1=>-1, 2=>1},
|
309
|
+
"120102100"=>{1=>1, 2=>-1},
|
310
|
+
"120102010"=>{1=>0.8333333333333334, 2=>0.0},
|
311
|
+
"120102210"=>{1=>0.3333333333333333, 2=>0.0},
|
312
|
+
"120102211"=>{1=>0.5, 2=>0.0},
|
313
|
+
"120102012"=>{1=>1, 2=>-1},
|
314
|
+
"120102112"=>{1=>1, 2=>-1},
|
315
|
+
"120102001"=>{1=>1, 2=>-1},
|
316
|
+
"120102201"=>{1=>1, 2=>-1},
|
317
|
+
"120102021"=>{1=>1, 2=>-1},
|
318
|
+
"120100200"=>{1=>1, 2=>-1},
|
319
|
+
"120110200"=>{1=>1, 2=>-1},
|
320
|
+
"120110220"=>{1=>1, 2=>-1},
|
321
|
+
"120111220"=>{1=>1, 2=>-1},
|
322
|
+
"120110221"=>{1=>1, 2=>-1},
|
323
|
+
"120110202"=>{1=>1, 2=>-1},
|
324
|
+
"120111202"=>{1=>1, 2=>-1},
|
325
|
+
"120110212"=>{1=>0.5, 2=>0.0},
|
326
|
+
"120101200"=>{1=>-1, 2=>1},
|
327
|
+
"120101220"=>{1=>1, 2=>-1},
|
328
|
+
"120101202"=>{1=>1, 2=>-1},
|
329
|
+
"120101212"=>{1=>0.5, 2=>0.0},
|
330
|
+
"120100210"=>{1=>0.41666666666666663, 2=>0.2222222222222222},
|
331
|
+
"120100212"=>{1=>0.3333333333333333, 2=>0.0},
|
332
|
+
"120100201"=>{1=>-1, 2=>1},
|
333
|
+
"120100221"=>{1=>1, 2=>-1},
|
334
|
+
"120100020"=>{1=>1, 2=>-1},
|
335
|
+
"120110020"=>{1=>1, 2=>-1},
|
336
|
+
"120110022"=>{1=>1, 2=>-1},
|
337
|
+
"120111022"=>{1=>1, 2=>-1},
|
338
|
+
"120101020"=>{1=>-1, 2=>1},
|
339
|
+
"120101022"=>{1=>1, 2=>-1},
|
340
|
+
"120100120"=>{1=>1, 2=>-1},
|
341
|
+
"120100021"=>{1=>-1, 2=>1},
|
342
|
+
"120100002"=>{1=>1, 2=>-1},
|
343
|
+
"120110002"=>{1=>1, 2=>-1},
|
344
|
+
"120101002"=>{1=>1, 2=>-1},
|
345
|
+
"120100102"=>{1=>1, 2=>-1},
|
346
|
+
"120100012"=>{1=>0.8333333333333334, 2=>0.0},
|
347
|
+
"120010000"=>{1=>1, 2=>-1},
|
348
|
+
"122010000"=>{1=>1, 2=>-1},
|
349
|
+
"122011000"=>{1=>1, 2=>-1},
|
350
|
+
"122211000"=>{1=>1, 2=>-1},
|
351
|
+
"122211010"=>{1=>0.5, 2=>0.0},
|
352
|
+
"122211210"=>{1=>1, 2=>-1},
|
353
|
+
"122211211"=>{1=>1, 2=>-1},
|
354
|
+
"122211012"=>{1=>0.0, 2=>0.0},
|
355
|
+
"122211001"=>{1=>1, 2=>-1},
|
356
|
+
"122011200"=>{1=>1, 2=>-1},
|
357
|
+
"122011210"=>{1=>1, 2=>-1},
|
358
|
+
"122011212"=>{1=>1, 2=>-1},
|
359
|
+
"122011201"=>{1=>1, 2=>-1},
|
360
|
+
"122011020"=>{1=>1, 2=>-1},
|
361
|
+
"122011120"=>{1=>1, 2=>-1},
|
362
|
+
"122011122"=>{1=>1, 2=>-1},
|
363
|
+
"122111122"=>{1=>1, 2=>-1},
|
364
|
+
"122011002"=>{1=>1, 2=>-1},
|
365
|
+
"122011102"=>{1=>0.5, 2=>0.0},
|
366
|
+
"122011012"=>{1=>0.5, 2=>0.0},
|
367
|
+
"122010100"=>{1=>1, 2=>-1},
|
368
|
+
"122012100"=>{1=>1, 2=>-1},
|
369
|
+
"122012110"=>{1=>-1, 2=>1},
|
370
|
+
"122012112"=>{1=>-1, 2=>1},
|
371
|
+
"122012101"=>{1=>1, 2=>-1},
|
372
|
+
"122010120"=>{1=>1, 2=>-1},
|
373
|
+
"122010102"=>{1=>1, 2=>-1},
|
374
|
+
"122010112"=>{1=>-1, 2=>1},
|
375
|
+
"122010010"=>{1=>0.875, 2=>0.6666666666666666},
|
376
|
+
"122210010"=>{1=>1, 2=>-1},
|
377
|
+
"122210011"=>{1=>1, 2=>-1},
|
378
|
+
"122012010"=>{1=>1, 2=>-1},
|
379
|
+
"122010210"=>{1=>1, 2=>-1},
|
380
|
+
"122010211"=>{1=>1, 2=>-1},
|
381
|
+
"122010012"=>{1=>0.5, 2=>0.6666666666666666},
|
382
|
+
"122010001"=>{1=>1, 2=>-1},
|
383
|
+
"120210000"=>{1=>1, 2=>-1},
|
384
|
+
"120211000"=>{1=>0.8333333333333334, 2=>0.0},
|
385
|
+
"120211020"=>{1=>1, 2=>-1},
|
386
|
+
"120211002"=>{1=>0.3333333333333333, 2=>0.0},
|
387
|
+
"120211012"=>{1=>0.0, 2=>0.0},
|
388
|
+
"120210001"=>{1=>1, 2=>-1},
|
389
|
+
"120012000"=>{1=>1, 2=>-1},
|
390
|
+
"120012100"=>{1=>1, 2=>-1},
|
391
|
+
"120012120"=>{1=>1, 2=>-1},
|
392
|
+
"120012102"=>{1=>1, 2=>-1},
|
393
|
+
"120012112"=>{1=>-1, 2=>1},
|
394
|
+
"120012010"=>{1=>0.875, 2=>0.6666666666666666},
|
395
|
+
"120012210"=>{1=>1, 2=>-1},
|
396
|
+
"120012012"=>{1=>0.5, 2=>0.6666666666666666},
|
397
|
+
"120012001"=>{1=>1, 2=>-1},
|
398
|
+
"120010200"=>{1=>1, 2=>-1},
|
399
|
+
"120011200"=>{1=>1, 2=>-1},
|
400
|
+
"120011220"=>{1=>1, 2=>-1},
|
401
|
+
"120011202"=>{1=>1, 2=>-1},
|
402
|
+
"120011212"=>{1=>0.5, 2=>0.0},
|
403
|
+
"120010210"=>{1=>0.8333333333333334, 2=>0.0},
|
404
|
+
"120010212"=>{1=>0.3333333333333333, 2=>0.0},
|
405
|
+
"120010201"=>{1=>1, 2=>-1},
|
406
|
+
"120010020"=>{1=>1, 2=>-1},
|
407
|
+
"120011020"=>{1=>1, 2=>-1},
|
408
|
+
"120011022"=>{1=>1, 2=>-1},
|
409
|
+
"120010120"=>{1=>1, 2=>-1},
|
410
|
+
"120010021"=>{1=>1, 2=>-1},
|
411
|
+
"120010002"=>{1=>1, 2=>-1},
|
412
|
+
"120011002"=>{1=>0.8333333333333333, 2=>0.0},
|
413
|
+
"120010102"=>{1=>1, 2=>-1},
|
414
|
+
"120010012"=>{1=>0.41666666666666663, 2=>0.3333333333333333},
|
415
|
+
"120001000"=>{1=>0.951388888888889, 2=>0.8666666666666668},
|
416
|
+
"122001000"=>{1=>1, 2=>-1},
|
417
|
+
"122001100"=>{1=>1, 2=>-1},
|
418
|
+
"122021100"=>{1=>1, 2=>-1},
|
419
|
+
"122021110"=>{1=>1, 2=>-1},
|
420
|
+
"122021112"=>{1=>1, 2=>-1},
|
421
|
+
"122021101"=>{1=>-1, 2=>1},
|
422
|
+
"122001120"=>{1=>1, 2=>-1},
|
423
|
+
"122001102"=>{1=>1, 2=>-1},
|
424
|
+
"122001112"=>{1=>0.5, 2=>0.0},
|
425
|
+
"122001010"=>{1=>1, 2=>-1},
|
426
|
+
"122201010"=>{1=>1, 2=>-1},
|
427
|
+
"122201011"=>{1=>1, 2=>-1},
|
428
|
+
"122221011"=>{1=>1, 2=>-1},
|
429
|
+
"122201211"=>{1=>1, 2=>-1},
|
430
|
+
"122021010"=>{1=>1, 2=>-1},
|
431
|
+
"122021011"=>{1=>-1, 2=>1},
|
432
|
+
"122021211"=>{1=>-1, 2=>1},
|
433
|
+
"122001210"=>{1=>1, 2=>-1},
|
434
|
+
"122001211"=>{1=>-1, 2=>1},
|
435
|
+
"122001012"=>{1=>1, 2=>-1},
|
436
|
+
"122001001"=>{1=>-1, 2=>1},
|
437
|
+
"122201001"=>{1=>1, 2=>-1},
|
438
|
+
"122021001"=>{1=>-1, 2=>1},
|
439
|
+
"122001201"=>{1=>1, 2=>-1},
|
440
|
+
"120201000"=>{1=>1, 2=>-1},
|
441
|
+
"120201010"=>{1=>0.75, 2=>0.0},
|
442
|
+
"120221010"=>{1=>1, 2=>-1},
|
443
|
+
"120221011"=>{1=>1, 2=>-1},
|
444
|
+
"120201012"=>{1=>0.0, 2=>0.0},
|
445
|
+
"120201001"=>{1=>1, 2=>-1},
|
446
|
+
"120221001"=>{1=>1, 2=>-1},
|
447
|
+
"120201201"=>{1=>1, 2=>-1},
|
448
|
+
"120021000"=>{1=>0.7083333333333334, 2=>0.8666666666666668},
|
449
|
+
"120021100"=>{1=>-1, 2=>1},
|
450
|
+
"120021120"=>{1=>-1, 2=>1},
|
451
|
+
"120021102"=>{1=>1, 2=>-1},
|
452
|
+
"120021112"=>{1=>0.5, 2=>0.0},
|
453
|
+
"120021010"=>{1=>0.7083333333333334, 2=>0.3333333333333333},
|
454
|
+
"120021210"=>{1=>0.5, 2=>0.6666666666666666},
|
455
|
+
"120021211"=>{1=>-1, 2=>1},
|
456
|
+
"120021012"=>{1=>0.3333333333333333, 2=>0.0},
|
457
|
+
"120021001"=>{1=>-1, 2=>1},
|
458
|
+
"120021201"=>{1=>1, 2=>-1},
|
459
|
+
"120001200"=>{1=>1, 2=>-1},
|
460
|
+
"120001210"=>{1=>0.7083333333333334, 2=>0.3333333333333333},
|
461
|
+
"120001212"=>{1=>0.3333333333333333, 2=>0.0},
|
462
|
+
"120001201"=>{1=>1, 2=>-1},
|
463
|
+
"120001020"=>{1=>1, 2=>-1},
|
464
|
+
"120001120"=>{1=>-1, 2=>1},
|
465
|
+
"120001002"=>{1=>1, 2=>-1},
|
466
|
+
"120001102"=>{1=>0.8333333333333333, 2=>0.0},
|
467
|
+
"120001012"=>{1=>0.41666666666666663, 2=>0.0},
|
468
|
+
"120000100"=>{1=>1, 2=>-1},
|
469
|
+
"122000100"=>{1=>1, 2=>-1},
|
470
|
+
"122000110"=>{1=>1, 2=>-1},
|
471
|
+
"122020110"=>{1=>1, 2=>-1},
|
472
|
+
"122020111"=>{1=>1, 2=>-1},
|
473
|
+
"122002110"=>{1=>1, 2=>-1},
|
474
|
+
"122000112"=>{1=>1, 2=>-1},
|
475
|
+
"122000101"=>{1=>1, 2=>-1},
|
476
|
+
"122020101"=>{1=>1, 2=>-1},
|
477
|
+
"122002101"=>{1=>1, 2=>-1},
|
478
|
+
"120020100"=>{1=>1, 2=>-1},
|
479
|
+
"120020110"=>{1=>1, 2=>-1},
|
480
|
+
"120022110"=>{1=>1, 2=>-1},
|
481
|
+
"120020112"=>{1=>1, 2=>-1},
|
482
|
+
"120020101"=>{1=>-1, 2=>1},
|
483
|
+
"120022101"=>{1=>1, 2=>-1},
|
484
|
+
"120002100"=>{1=>1, 2=>-1},
|
485
|
+
"120002110"=>{1=>1, 2=>-1},
|
486
|
+
"120002112"=>{1=>1, 2=>-1},
|
487
|
+
"120002101"=>{1=>1, 2=>-1},
|
488
|
+
"120000120"=>{1=>1, 2=>-1},
|
489
|
+
"120000102"=>{1=>1, 2=>-1},
|
490
|
+
"120000112"=>{1=>0.8333333333333333, 2=>0.0},
|
491
|
+
"120000010"=>{1=>0.8722222222222222, 2=>0.15555555555555556},
|
492
|
+
"122000010"=>{1=>1, 2=>-1},
|
493
|
+
"122000011"=>{1=>1, 2=>-1},
|
494
|
+
"122020011"=>{1=>1, 2=>-1},
|
495
|
+
"122000211"=>{1=>1, 2=>-1},
|
496
|
+
"120020010"=>{1=>1, 2=>-1},
|
497
|
+
"120020011"=>{1=>0.875, 2=>0.6666666666666666},
|
498
|
+
"120020211"=>{1=>0.5, 2=>0.6666666666666666},
|
499
|
+
"120002010"=>{1=>1, 2=>-1},
|
500
|
+
"120000210"=>{1=>0.65, 2=>0.24444444444444446},
|
501
|
+
"120000211"=>{1=>0.875, 2=>0.6666666666666666},
|
502
|
+
"120000012"=>{1=>0.5833333333333333, 2=>0.06666666666666667},
|
503
|
+
"120000001"=>{1=>0.9791666666666666, 2=>0.9333333333333333},
|
504
|
+
"122000001"=>{1=>1, 2=>-1},
|
505
|
+
"120200001"=>{1=>1, 2=>-1},
|
506
|
+
"120020001"=>{1=>0.875, 2=>0.9333333333333333},
|
507
|
+
"120002001"=>{1=>1, 2=>-1},
|
508
|
+
"120000201"=>{1=>1, 2=>-1},
|
509
|
+
"120000021"=>{1=>1, 2=>-1},
|
510
|
+
"102000000"=>{1=>1, 2=>-1},
|
511
|
+
"112000000"=>{1=>-1, 2=>1},
|
512
|
+
"112020000"=>{1=>0.75, 2=>0.9333333333333332},
|
513
|
+
"112120000"=>{1=>-1, 2=>1},
|
514
|
+
"112122000"=>{1=>1, 2=>-1},
|
515
|
+
"112122100"=>{1=>1, 2=>-1},
|
516
|
+
"112122010"=>{1=>-1, 2=>1},
|
517
|
+
"112122210"=>{1=>-1, 2=>1},
|
518
|
+
"112122012"=>{1=>-1, 2=>1},
|
519
|
+
"112120200"=>{1=>-1, 2=>1},
|
520
|
+
"112120020"=>{1=>1, 2=>-1},
|
521
|
+
"112121020"=>{1=>-1, 2=>1},
|
522
|
+
"112121022"=>{1=>1, 2=>-1},
|
523
|
+
"112120002"=>{1=>1, 2=>-1},
|
524
|
+
"112121002"=>{1=>-1, 2=>1},
|
525
|
+
"112121202"=>{1=>-1, 2=>1},
|
526
|
+
"112120102"=>{1=>1, 2=>-1},
|
527
|
+
"112120012"=>{1=>-1, 2=>1},
|
528
|
+
"112021000"=>{1=>-1, 2=>1},
|
529
|
+
"112021200"=>{1=>-1, 2=>1},
|
530
|
+
"112021020"=>{1=>0.5, 2=>0.6666666666666666},
|
531
|
+
"112021002"=>{1=>0.5, 2=>0.6666666666666666},
|
532
|
+
"112021102"=>{1=>0.5, 2=>0.0},
|
533
|
+
"112021012"=>{1=>-1, 2=>1},
|
534
|
+
"112021212"=>{1=>-1, 2=>1},
|
535
|
+
"112020100"=>{1=>0.75, 2=>0.6666666666666666},
|
536
|
+
"112022100"=>{1=>1, 2=>-1},
|
537
|
+
"112022110"=>{1=>-1, 2=>1},
|
538
|
+
"112022112"=>{1=>-1, 2=>1},
|
539
|
+
"112020102"=>{1=>1, 2=>-1},
|
540
|
+
"112020112"=>{1=>-1, 2=>1},
|
541
|
+
"112020010"=>{1=>-1, 2=>1},
|
542
|
+
"112022010"=>{1=>-1, 2=>1},
|
543
|
+
"112020210"=>{1=>-1, 2=>1},
|
544
|
+
"112020012"=>{1=>-1, 2=>1},
|
545
|
+
"112020001"=>{1=>-1, 2=>1},
|
546
|
+
"112020201"=>{1=>-1, 2=>1},
|
547
|
+
"112002000"=>{1=>-1, 2=>1},
|
548
|
+
"112102000"=>{1=>-1, 2=>1},
|
549
|
+
"112102200"=>{1=>-1, 2=>1},
|
550
|
+
"112112200"=>{1=>-1, 2=>1},
|
551
|
+
"112112220"=>{1=>1, 2=>-1},
|
552
|
+
"112112202"=>{1=>-1, 2=>1},
|
553
|
+
"112102210"=>{1=>-1, 2=>1},
|
554
|
+
"112102212"=>{1=>-1, 2=>1},
|
555
|
+
"112102020"=>{1=>1, 2=>-1},
|
556
|
+
"112112020"=>{1=>-1, 2=>1},
|
557
|
+
"112112022"=>{1=>-1, 2=>1},
|
558
|
+
"112102002"=>{1=>-1, 2=>1},
|
559
|
+
"112012000"=>{1=>-1, 2=>1},
|
560
|
+
"112012200"=>{1=>1, 2=>-1},
|
561
|
+
"112012210"=>{1=>1, 2=>-1},
|
562
|
+
"112012020"=>{1=>1, 2=>-1},
|
563
|
+
"112012002"=>{1=>-1, 2=>1},
|
564
|
+
"112002100"=>{1=>-1, 2=>1},
|
565
|
+
"112002102"=>{1=>-1, 2=>1},
|
566
|
+
"112002010"=>{1=>-1, 2=>1},
|
567
|
+
"112002210"=>{1=>1, 2=>-1},
|
568
|
+
"112002012"=>{1=>-1, 2=>1},
|
569
|
+
"112000200"=>{1=>1, 2=>-1},
|
570
|
+
"112100200"=>{1=>-1, 2=>1},
|
571
|
+
"112100202"=>{1=>-1, 2=>1},
|
572
|
+
"112110202"=>{1=>-1, 2=>1},
|
573
|
+
"112101202"=>{1=>-1, 2=>1},
|
574
|
+
"112010200"=>{1=>1, 2=>-1},
|
575
|
+
"112010220"=>{1=>1, 2=>-1},
|
576
|
+
"112011220"=>{1=>-1, 2=>1},
|
577
|
+
"112011222"=>{1=>-1, 2=>1},
|
578
|
+
"112010202"=>{1=>1, 2=>-1},
|
579
|
+
"112011202"=>{1=>-1, 2=>1},
|
580
|
+
"112010212"=>{1=>1, 2=>-1},
|
581
|
+
"112001200"=>{1=>-1, 2=>1},
|
582
|
+
"112001220"=>{1=>-1, 2=>1},
|
583
|
+
"112001202"=>{1=>-1, 2=>1},
|
584
|
+
"112001212"=>{1=>-1, 2=>1},
|
585
|
+
"112000210"=>{1=>-1, 2=>1},
|
586
|
+
"112000212"=>{1=>1, 2=>-1},
|
587
|
+
"112000201"=>{1=>-1, 2=>1},
|
588
|
+
"112000020"=>{1=>0.8541666666666666, 2=>0.7333333333333333},
|
589
|
+
"112100020"=>{1=>-1, 2=>1},
|
590
|
+
"112100022"=>{1=>1, 2=>-1},
|
591
|
+
"112110022"=>{1=>-1, 2=>1},
|
592
|
+
"112101022"=>{1=>-1, 2=>1},
|
593
|
+
"112010020"=>{1=>-1, 2=>1},
|
594
|
+
"112010022"=>{1=>-1, 2=>1},
|
595
|
+
"112011022"=>{1=>-1, 2=>1},
|
596
|
+
"112001020"=>{1=>-1, 2=>1},
|
597
|
+
"112001022"=>{1=>0.5, 2=>0.6666666666666666},
|
598
|
+
"112000002"=>{1=>-1, 2=>1},
|
599
|
+
"112100002"=>{1=>-1, 2=>1},
|
600
|
+
"112010002"=>{1=>-1, 2=>1},
|
601
|
+
"112001002"=>{1=>-1, 2=>1},
|
602
|
+
"112000102"=>{1=>-1, 2=>1},
|
603
|
+
"112000012"=>{1=>-1, 2=>1},
|
604
|
+
"102100000"=>{1=>1, 2=>-1},
|
605
|
+
"102120000"=>{1=>1, 2=>-1},
|
606
|
+
"102121000"=>{1=>-1, 2=>1},
|
607
|
+
"102121020"=>{1=>1, 2=>-1},
|
608
|
+
"102121002"=>{1=>1, 2=>-1},
|
609
|
+
"102121102"=>{1=>1, 2=>-1},
|
610
|
+
"102121012"=>{1=>-1, 2=>1},
|
611
|
+
"102120100"=>{1=>1, 2=>-1},
|
612
|
+
"102120010"=>{1=>-1, 2=>1},
|
613
|
+
"102122010"=>{1=>1, 2=>-1},
|
614
|
+
"102122110"=>{1=>1, 2=>-1},
|
615
|
+
"102120012"=>{1=>1, 2=>-1},
|
616
|
+
"102120001"=>{1=>-1, 2=>1},
|
617
|
+
"102102000"=>{1=>1, 2=>-1},
|
618
|
+
"102112000"=>{1=>-1, 2=>1},
|
619
|
+
"102112020"=>{1=>1, 2=>-1},
|
620
|
+
"102112002"=>{1=>-1, 2=>1},
|
621
|
+
"102102100"=>{1=>1, 2=>-1},
|
622
|
+
"102102010"=>{1=>-1, 2=>1},
|
623
|
+
"102102012"=>{1=>-1, 2=>1},
|
624
|
+
"102100020"=>{1=>1, 2=>-1},
|
625
|
+
"102110020"=>{1=>1, 2=>-1},
|
626
|
+
"102110022"=>{1=>1, 2=>-1},
|
627
|
+
"102111022"=>{1=>1, 2=>-1},
|
628
|
+
"102101020"=>{1=>1, 2=>-1},
|
629
|
+
"102101022"=>{1=>1, 2=>-1},
|
630
|
+
"102100002"=>{1=>1, 2=>-1},
|
631
|
+
"102110002"=>{1=>-1, 2=>1},
|
632
|
+
"102101002"=>{1=>1, 2=>-1},
|
633
|
+
"102100102"=>{1=>1, 2=>-1},
|
634
|
+
"102100012"=>{1=>-1, 2=>1},
|
635
|
+
"102010000"=>{1=>0.9722222222222222, 2=>0.8},
|
636
|
+
"102012000"=>{1=>1, 2=>-1},
|
637
|
+
"102012100"=>{1=>-1, 2=>1},
|
638
|
+
"102012102"=>{1=>-1, 2=>1},
|
639
|
+
"102012010"=>{1=>-1, 2=>1},
|
640
|
+
"102012210"=>{1=>1, 2=>-1},
|
641
|
+
"102012012"=>{1=>-1, 2=>1},
|
642
|
+
"102010200"=>{1=>1, 2=>-1},
|
643
|
+
"102011200"=>{1=>1, 2=>-1},
|
644
|
+
"102011202"=>{1=>1, 2=>-1},
|
645
|
+
"102011212"=>{1=>1, 2=>-1},
|
646
|
+
"102010201"=>{1=>1, 2=>-1},
|
647
|
+
"102010020"=>{1=>1, 2=>-1},
|
648
|
+
"102011020"=>{1=>1, 2=>-1},
|
649
|
+
"102011022"=>{1=>1, 2=>-1},
|
650
|
+
"102010002"=>{1=>0.8333333333333333, 2=>0.8},
|
651
|
+
"102011002"=>{1=>0.8333333333333333, 2=>0.0},
|
652
|
+
"102010102"=>{1=>-1, 2=>1},
|
653
|
+
"102010012"=>{1=>-1, 2=>1},
|
654
|
+
"102001000"=>{1=>0.9138888888888889, 2=>0.5222222222222223},
|
655
|
+
"102021000"=>{1=>0.8333333333333333, 2=>0.8},
|
656
|
+
"102021100"=>{1=>0.8333333333333333, 2=>0.0},
|
657
|
+
"102021102"=>{1=>1, 2=>-1},
|
658
|
+
"102021010"=>{1=>-1, 2=>1},
|
659
|
+
"102021210"=>{1=>-1, 2=>1},
|
660
|
+
"102021012"=>{1=>0.5, 2=>0.6666666666666666},
|
661
|
+
"102001200"=>{1=>1, 2=>-1},
|
662
|
+
"102001210"=>{1=>-1, 2=>1},
|
663
|
+
"102001212"=>{1=>1, 2=>-1},
|
664
|
+
"102001020"=>{1=>1, 2=>-1},
|
665
|
+
"102001002"=>{1=>1, 2=>-1},
|
666
|
+
"102001102"=>{1=>0.75, 2=>0.0},
|
667
|
+
"102001012"=>{1=>0.7083333333333333, 2=>0.3333333333333333},
|
668
|
+
"102000100"=>{1=>1, 2=>-1},
|
669
|
+
"102020100"=>{1=>1, 2=>-1},
|
670
|
+
"102020110"=>{1=>1, 2=>-1},
|
671
|
+
"102022110"=>{1=>1, 2=>-1},
|
672
|
+
"102020101"=>{1=>1, 2=>-1},
|
673
|
+
"102002100"=>{1=>1, 2=>-1},
|
674
|
+
"102002110"=>{1=>-1, 2=>1},
|
675
|
+
"102000102"=>{1=>1, 2=>-1},
|
676
|
+
"102000010"=>{1=>0.9513888888888888, 2=>0.8666666666666668},
|
677
|
+
"102020010"=>{1=>1, 2=>-1},
|
678
|
+
"102002010"=>{1=>1, 2=>-1},
|
679
|
+
"102000012"=>{1=>0.7083333333333333, 2=>0.8666666666666668},
|
680
|
+
"102000001"=>{1=>1, 2=>-1},
|
681
|
+
"102020001"=>{1=>1, 2=>-1},
|
682
|
+
"102000201"=>{1=>1, 2=>-1},
|
683
|
+
"100020000"=>{1=>0.9072420634920635, 2=>0.8714285714285716},
|
684
|
+
"110020000"=>{1=>0.9583333333333334, 2=>0.9333333333333332},
|
685
|
+
"110022000"=>{1=>1, 2=>-1},
|
686
|
+
"110122000"=>{1=>1, 2=>-1},
|
687
|
+
"110122020"=>{1=>1, 2=>-1},
|
688
|
+
"110122002"=>{1=>1, 2=>-1},
|
689
|
+
"110122012"=>{1=>-1, 2=>1},
|
690
|
+
"110022100"=>{1=>-1, 2=>1},
|
691
|
+
"110022010"=>{1=>-1, 2=>1},
|
692
|
+
"110022012"=>{1=>1, 2=>-1},
|
693
|
+
"110020020"=>{1=>1, 2=>-1},
|
694
|
+
"111020020"=>{1=>1, 2=>-1},
|
695
|
+
"110021020"=>{1=>0.875, 2=>0.6666666666666666},
|
696
|
+
"110021022"=>{1=>1, 2=>-1},
|
697
|
+
"110020002"=>{1=>1, 2=>-1},
|
698
|
+
"110120002"=>{1=>1, 2=>-1},
|
699
|
+
"110021002"=>{1=>0.875, 2=>0.6666666666666666},
|
700
|
+
"110020012"=>{1=>-1, 2=>1},
|
701
|
+
"101020000"=>{1=>0.9027777777777777, 2=>0.8666666666666668},
|
702
|
+
"101020020"=>{1=>1, 2=>-1},
|
703
|
+
"100021000"=>{1=>0.8559027777777777, 2=>0.7833333333333333},
|
704
|
+
"100021020"=>{1=>0.875, 2=>0.9333333333333332},
|
705
|
+
"100021002"=>{1=>0.71875, 2=>0.5333333333333333},
|
706
|
+
"100021012"=>{1=>0.41666666666666663, 2=>0.3333333333333333},
|
707
|
+
"100020001"=>{1=>0.9166666666666666, 2=>0.9333333333333332},
|
708
|
+
"100002000"=>{1=>1, 2=>-1},
|
709
|
+
"110002000"=>{1=>-1, 2=>1},
|
710
|
+
"110002020"=>{1=>1, 2=>-1},
|
711
|
+
"110102020"=>{1=>1, 2=>-1},
|
712
|
+
"110102022"=>{1=>1, 2=>-1},
|
713
|
+
"110112022"=>{1=>-1, 2=>1},
|
714
|
+
"110012020"=>{1=>1, 2=>-1},
|
715
|
+
"110012022"=>{1=>1, 2=>-1},
|
716
|
+
"110002002"=>{1=>1, 2=>-1},
|
717
|
+
"110102002"=>{1=>-1, 2=>1},
|
718
|
+
"110012002"=>{1=>-1, 2=>1},
|
719
|
+
"110002012"=>{1=>-1, 2=>1},
|
720
|
+
"100102000"=>{1=>0.9756944444444443, 2=>0.7333333333333333},
|
721
|
+
"100102002"=>{1=>1, 2=>-1},
|
722
|
+
"100112002"=>{1=>-1, 2=>1},
|
723
|
+
"100102012"=>{1=>-1, 2=>1},
|
724
|
+
"100012000"=>{1=>1, 2=>-1},
|
725
|
+
"100012020"=>{1=>1, 2=>-1},
|
726
|
+
"100012002"=>{1=>1, 2=>-1},
|
727
|
+
"100012012"=>{1=>-1, 2=>1},
|
728
|
+
"100002100"=>{1=>1, 2=>-1},
|
729
|
+
"100002010"=>{1=>0.9791666666666666, 2=>0.9333333333333332},
|
730
|
+
"100002012"=>{1=>1, 2=>-1},
|
731
|
+
"100000002"=>{1=>1, 2=>-1},
|
732
|
+
"110000002"=>{1=>-1, 2=>1},
|
733
|
+
"100010002"=>{1=>0.9444444444444443, 2=>0.8},
|
734
|
+
"100001002"=>{1=>0.8350694444444443, 2=>0.4888888888888889},
|
735
|
+
"010000000"=>{1=>0.9434482473544974, 2=>0.696957671957672},
|
736
|
+
"210000000"=>{1=>0.8717013888888888, 2=>0.7074074074074074},
|
737
|
+
"210100000"=>{1=>0.78125, 2=>0.5407407407407407},
|
738
|
+
"212100000"=>{1=>1, 2=>-1},
|
739
|
+
"212110000"=>{1=>1, 2=>-1},
|
740
|
+
"212112000"=>{1=>1, 2=>-1},
|
741
|
+
"212112010"=>{1=>1, 2=>-1},
|
742
|
+
"212110200"=>{1=>1, 2=>-1},
|
743
|
+
"212111200"=>{1=>1, 2=>-1},
|
744
|
+
"212110020"=>{1=>1, 2=>-1},
|
745
|
+
"212111020"=>{1=>1, 2=>-1},
|
746
|
+
"212110002"=>{1=>1, 2=>-1},
|
747
|
+
"212110012"=>{1=>1, 2=>-1},
|
748
|
+
"212101000"=>{1=>-1, 2=>1},
|
749
|
+
"212121000"=>{1=>-1, 2=>1},
|
750
|
+
"212121010"=>{1=>-1, 2=>1},
|
751
|
+
"212121210"=>{1=>-1, 2=>1},
|
752
|
+
"212101200"=>{1=>1, 2=>-1},
|
753
|
+
"212101210"=>{1=>-1, 2=>1},
|
754
|
+
"212101212"=>{1=>1, 2=>-1},
|
755
|
+
"212111212"=>{1=>1, 2=>-1},
|
756
|
+
"212101020"=>{1=>1, 2=>-1},
|
757
|
+
"212100010"=>{1=>-1, 2=>1},
|
758
|
+
"212120010"=>{1=>-1, 2=>1},
|
759
|
+
"212102010"=>{1=>1, 2=>-1},
|
760
|
+
"212100012"=>{1=>1, 2=>-1},
|
761
|
+
"210120000"=>{1=>0.41666666666666663, 2=>0.8666666666666666},
|
762
|
+
"210121000"=>{1=>-1, 2=>1},
|
763
|
+
"210121020"=>{1=>0.5, 2=>0.6666666666666666},
|
764
|
+
"210121002"=>{1=>-1, 2=>1},
|
765
|
+
"210102000"=>{1=>0.6354166666666666, 2=>0.37777777777777777},
|
766
|
+
"210112000"=>{1=>0.8333333333333334, 2=>0.0},
|
767
|
+
"210112020"=>{1=>0.3333333333333333, 2=>0.0},
|
768
|
+
"210112002"=>{1=>1, 2=>-1},
|
769
|
+
"210112012"=>{1=>1, 2=>-1},
|
770
|
+
"210102010"=>{1=>0.875, 2=>0.6666666666666666},
|
771
|
+
"210102012"=>{1=>1, 2=>-1},
|
772
|
+
"210100002"=>{1=>1, 2=>-1},
|
773
|
+
"210110002"=>{1=>1, 2=>-1},
|
774
|
+
"210101002"=>{1=>-1, 2=>1},
|
775
|
+
"210010000"=>{1=>0.9565972222222222, 2=>0.39999999999999997},
|
776
|
+
"212010000"=>{1=>1, 2=>-1},
|
777
|
+
"212010010"=>{1=>1, 2=>-1},
|
778
|
+
"210210000"=>{1=>1, 2=>-1},
|
779
|
+
"210211000"=>{1=>-1, 2=>1},
|
780
|
+
"210211200"=>{1=>-1, 2=>1},
|
781
|
+
"210211020"=>{1=>0.5, 2=>0.6666666666666666},
|
782
|
+
"210211002"=>{1=>1, 2=>-1},
|
783
|
+
"210210010"=>{1=>1, 2=>-1},
|
784
|
+
"210012000"=>{1=>1, 2=>-1},
|
785
|
+
"210012010"=>{1=>1, 2=>-1},
|
786
|
+
"210010200"=>{1=>1, 2=>-1},
|
787
|
+
"210011200"=>{1=>-1, 2=>1},
|
788
|
+
"210011220"=>{1=>1, 2=>-1},
|
789
|
+
"210011202"=>{1=>1, 2=>-1},
|
790
|
+
"210010210"=>{1=>1, 2=>-1},
|
791
|
+
"210010020"=>{1=>0.7395833333333333, 2=>0.39999999999999997},
|
792
|
+
"210011020"=>{1=>0.875, 2=>0.6666666666666666},
|
793
|
+
"210010002"=>{1=>1, 2=>-1},
|
794
|
+
"210011002"=>{1=>1, 2=>-1},
|
795
|
+
"210010012"=>{1=>1, 2=>-1},
|
796
|
+
"210001000"=>{1=>-1, 2=>1},
|
797
|
+
"210201000"=>{1=>1, 2=>-1},
|
798
|
+
"210201010"=>{1=>-1, 2=>1},
|
799
|
+
"210221010"=>{1=>-1, 2=>1},
|
800
|
+
"210201210"=>{1=>-1, 2=>1},
|
801
|
+
"210021000"=>{1=>0.875, 2=>0.9333333333333333},
|
802
|
+
"210021010"=>{1=>-1, 2=>1},
|
803
|
+
"210021210"=>{1=>-1, 2=>1},
|
804
|
+
"210001200"=>{1=>-1, 2=>1},
|
805
|
+
"210001210"=>{1=>-1, 2=>1},
|
806
|
+
"210001020"=>{1=>0.8229166666666665, 2=>0.5333333333333333},
|
807
|
+
"210001002"=>{1=>1, 2=>-1},
|
808
|
+
"210000010"=>{1=>-1, 2=>1},
|
809
|
+
"212000010"=>{1=>1, 2=>-1},
|
810
|
+
"210200010"=>{1=>1, 2=>-1},
|
811
|
+
"210020010"=>{1=>-1, 2=>1},
|
812
|
+
"210002010"=>{1=>1, 2=>-1},
|
813
|
+
"210000210"=>{1=>1, 2=>-1},
|
814
|
+
"210000012"=>{1=>1, 2=>-1},
|
815
|
+
"010200000"=>{1=>1, 2=>-1},
|
816
|
+
"010210000"=>{1=>1, 2=>-1},
|
817
|
+
"010212000"=>{1=>1, 2=>-1},
|
818
|
+
"010212010"=>{1=>1, 2=>-1},
|
819
|
+
"010210200"=>{1=>1, 2=>-1},
|
820
|
+
"010211200"=>{1=>-1, 2=>1},
|
821
|
+
"010211220"=>{1=>-1, 2=>1},
|
822
|
+
"010210020"=>{1=>1, 2=>-1},
|
823
|
+
"010211020"=>{1=>-1, 2=>1},
|
824
|
+
"010210002"=>{1=>1, 2=>-1},
|
825
|
+
"010201000"=>{1=>0.9097222222222222, 2=>0.45555555555555555},
|
826
|
+
"010221000"=>{1=>1, 2=>-1},
|
827
|
+
"010221010"=>{1=>-1, 2=>1},
|
828
|
+
"010201200"=>{1=>1, 2=>-1},
|
829
|
+
"010201020"=>{1=>1, 2=>-1},
|
830
|
+
"010200010"=>{1=>-1, 2=>1},
|
831
|
+
"010220010"=>{1=>-1, 2=>1},
|
832
|
+
"010202010"=>{1=>1, 2=>-1},
|
833
|
+
"010020000"=>{1=>0.8917824074074074, 2=>0.8936507936507937},
|
834
|
+
"010120000"=>{1=>0.861111111111111, 2=>0.911111111111111},
|
835
|
+
"010120002"=>{1=>1, 2=>-1},
|
836
|
+
"010020010"=>{1=>-1, 2=>1},
|
837
|
+
"010000200"=>{1=>1, 2=>-1},
|
838
|
+
"010010200"=>{1=>0.9791666666666666, 2=>0.9333333333333333},
|
839
|
+
"010010220"=>{1=>0.875, 2=>0.9333333333333333},
|
840
|
+
"010010202"=>{1=>1, 2=>-1},
|
841
|
+
"010001200"=>{1=>-1, 2=>1},
|
842
|
+
"010000020"=>{1=>0.9124007936507935, 2=>0.4793650793650793},
|
843
|
+
"010010020"=>{1=>0.8715277777777777, 2=>0.6666666666666667},
|
844
|
+
"000010000"=>{1=>0.9828869047619047, 2=>0.7238095238095238},
|
845
|
+
"200010000"=>{1=>0.9657738095238095, 2=>0.7238095238095238},
|
846
|
+
"020010000"=>{1=>1, 2=>-1}
|
847
|
+
}.each_pair { |k, v| RATINGS[k] = v }
|
848
|
+
|
849
|
+
end
|