saasagi 0.1.7 → 0.2.2
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/.travis.yml +1 -2
- data/CODE_OF_CONDUCT.md +3 -3
- data/Gemfile +3 -0
- data/LICENSE.txt +1 -1
- data/README.md +4 -3
- data/lib/saasagi.rb +110 -42
- data/lib/saasagi/version.rb +1 -1
- data/saasagi.gemspec +5 -4
- metadata +8 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '068e15a18ca25db7280069a46ae2f56f2d95c398aa2c5d3c5b3be9320dcde73c'
|
4
|
+
data.tar.gz: 7e6df42d65dda668e67f28aa6b7fe1037c25eb296b510e795c179fb1280d709b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 318ed7ee6f4dd77d0f1176204752448e0b29612f7254057fddc71f57bbd229b1226c099c780d4f016437f4326b11d800ac71557df3442abd361621d9b63b0291
|
7
|
+
data.tar.gz: 47e9a4fee87b0538d2ae82070018da88ae7ee2324929635760f6ea81ec34a3ca9acb2bd1c4cef9bd88f308b3d51b25abb8e5b32a00d90f00af23ba5940ef2488
|
data/.travis.yml
CHANGED
data/CODE_OF_CONDUCT.md
CHANGED
@@ -68,7 +68,7 @@ members of the project's leadership.
|
|
68
68
|
## Attribution
|
69
69
|
|
70
70
|
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
-
available at [
|
71
|
+
available at [https://contributor-covenant.org/version/1/4][version]
|
72
72
|
|
73
|
-
[homepage]:
|
74
|
-
[version]:
|
73
|
+
[homepage]: https://contributor-covenant.org
|
74
|
+
[version]: https://contributor-covenant.org/version/1/4/
|
data/Gemfile
CHANGED
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -14,7 +14,7 @@ gem 'saasagi'
|
|
14
14
|
|
15
15
|
And then execute:
|
16
16
|
|
17
|
-
$ bundle
|
17
|
+
$ bundle install
|
18
18
|
|
19
19
|
Or install it yourself as:
|
20
20
|
|
@@ -32,7 +32,8 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
32
32
|
|
33
33
|
## Contributing
|
34
34
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/saasagi. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/saasagi. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/saasagi/blob/master/CODE_OF_CONDUCT.md).
|
36
|
+
|
36
37
|
|
37
38
|
## License
|
38
39
|
|
@@ -40,4 +41,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
40
41
|
|
41
42
|
## Code of Conduct
|
42
43
|
|
43
|
-
Everyone interacting in the Saasagi project
|
44
|
+
Everyone interacting in the Saasagi project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/saasagi/blob/master/CODE_OF_CONDUCT.md).
|
data/lib/saasagi.rb
CHANGED
@@ -63,7 +63,7 @@ module Saasagi
|
|
63
63
|
open("tree_dGoal.rb", "w") { |f|
|
64
64
|
f.puts prewrite
|
65
65
|
}
|
66
|
-
|
66
|
+
|
67
67
|
open(".backup/tree_dGoal.rb", "w") { |f|
|
68
68
|
f.puts prewrite
|
69
69
|
}
|
@@ -85,18 +85,46 @@ module Saasagi
|
|
85
85
|
}
|
86
86
|
end
|
87
87
|
|
88
|
-
def self.
|
89
|
-
prewrite = File.read(".prewrite/
|
90
|
-
|
91
|
-
open("data/input/
|
88
|
+
def self.assemble_bedroom
|
89
|
+
prewrite = File.read(".prewrite/tree_test_bedroom.txt")
|
90
|
+
|
91
|
+
open("data/input/bedroom_test_ratio.txt", "w") { |f|
|
92
92
|
f.puts "0"
|
93
93
|
}
|
94
94
|
|
95
|
-
open("
|
95
|
+
open("tree_test_bedroom.rb", "w") { |f|
|
96
96
|
f.puts prewrite
|
97
97
|
}
|
98
|
-
|
99
|
-
|
98
|
+
end
|
99
|
+
|
100
|
+
def self.assemble_translator
|
101
|
+
prewrite = File.read(".prewrite/tree_translate_hafestra.txt")
|
102
|
+
|
103
|
+
open("data/input/bedroom_test_ratio.txt", "w") { |f|
|
104
|
+
f.puts "0"
|
105
|
+
}
|
106
|
+
|
107
|
+
open("tree_translate_hafestra.rb", "w") { |f|
|
108
|
+
f.puts prewrite
|
109
|
+
}
|
110
|
+
|
111
|
+
open(".backup/tree_translate_hafestra.rb", "w") { |f|
|
112
|
+
f.puts prewrite
|
113
|
+
}
|
114
|
+
end
|
115
|
+
|
116
|
+
def self.assemble_trends
|
117
|
+
prewrite = File.read(".prewrite/tree_trend_estimate.txt")
|
118
|
+
|
119
|
+
open("data/input/estimate_trends_ratio.txt", "w") { |f|
|
120
|
+
f.puts "0"
|
121
|
+
}
|
122
|
+
|
123
|
+
open("tree_trend_estimate.rb", "w") { |f|
|
124
|
+
f.puts prewrite
|
125
|
+
}
|
126
|
+
|
127
|
+
open(".backup/tree_trend_estimate.rb", "w") { |f|
|
100
128
|
f.puts prewrite
|
101
129
|
}
|
102
130
|
end
|
@@ -135,7 +163,7 @@ module Saasagi
|
|
135
163
|
|
136
164
|
def self.repair_ducksearch
|
137
165
|
if File.exist?("tree_ducksearch.rb")
|
138
|
-
puts "
|
166
|
+
puts "Duck search is all taken care of."
|
139
167
|
else
|
140
168
|
backup = File.read(".backup/tree_ducksearch.rb")
|
141
169
|
|
@@ -149,7 +177,7 @@ module Saasagi
|
|
149
177
|
|
150
178
|
def self.repair_connectwords
|
151
179
|
if File.exist?("tree_sum.rb")
|
152
|
-
puts "
|
180
|
+
puts "Word connector is all taken care of."
|
153
181
|
else
|
154
182
|
backup = File.read(".backup/tree_sum.rb")
|
155
183
|
|
@@ -163,7 +191,7 @@ module Saasagi
|
|
163
191
|
|
164
192
|
def self.repair_define_goal
|
165
193
|
if File.exist?("tree_dGoal.rb")
|
166
|
-
puts "
|
194
|
+
puts "Goal definer is all taken care of."
|
167
195
|
else
|
168
196
|
backup = File.read(".backup/tree_dGoal.rb")
|
169
197
|
|
@@ -174,6 +202,48 @@ module Saasagi
|
|
174
202
|
puts "Next time let me decide if it needs amputation."
|
175
203
|
end
|
176
204
|
end
|
205
|
+
|
206
|
+
def self.repair_bedroom
|
207
|
+
if File.exist?("tree_test_bedroom.rb")
|
208
|
+
puts "Bedroom test is all taken care of."
|
209
|
+
else
|
210
|
+
backup = File.read(".backup/tree_test_bedroom.rb")
|
211
|
+
|
212
|
+
open("tree_test_bedroom.rb", "w") { |f|
|
213
|
+
f.puts backup
|
214
|
+
}
|
215
|
+
|
216
|
+
puts "Next time let me decide if it needs amputation."
|
217
|
+
end
|
218
|
+
end
|
219
|
+
|
220
|
+
def self.repair_translator
|
221
|
+
if File.exist?("tree_translate_hafestra.rb")
|
222
|
+
puts "Translator of Hafestra test is all taken care of."
|
223
|
+
else
|
224
|
+
backup = File.read(".backup/tree_translate_hafestra.rb")
|
225
|
+
|
226
|
+
open("tree_translate_hafestra.rb", "w") { |f|
|
227
|
+
f.puts backup
|
228
|
+
}
|
229
|
+
|
230
|
+
puts "Next time let me decide if it needs amputation."
|
231
|
+
end
|
232
|
+
end
|
233
|
+
|
234
|
+
def self.repair_trends
|
235
|
+
if File.exist?("tree_trend_estimate.rb")
|
236
|
+
puts "Trend analyzer is all taken care of."
|
237
|
+
else
|
238
|
+
backup = File.read(".backup/tree_trend_estimatea.rb")
|
239
|
+
|
240
|
+
open("tree_trend_estimatea.rb", "w") { |f|
|
241
|
+
f.puts backup
|
242
|
+
}
|
243
|
+
|
244
|
+
puts "Next time let me decide if it needs amputation."
|
245
|
+
end
|
246
|
+
end
|
177
247
|
|
178
248
|
end
|
179
249
|
|
@@ -213,28 +283,26 @@ module Saasagi
|
|
213
283
|
f.puts "def #{method_name}#{ratio}"
|
214
284
|
f.puts " require 'decisiontree'"
|
215
285
|
f.puts " "
|
216
|
-
f.puts " def
|
217
|
-
f.puts "
|
286
|
+
f.puts " def robot_#{method_name}"
|
287
|
+
f.puts " a = ai_#{action}"
|
288
|
+
f.puts " end"
|
218
289
|
f.puts " "
|
219
|
-
f.puts "
|
220
|
-
f.puts "
|
221
|
-
f.puts "
|
222
|
-
f.puts " print 'Robot is increasingly restless, #{action} or stay? >> '"
|
223
|
-
f.puts " input = gets.chomp"
|
290
|
+
f.puts " def confirm_deny"
|
291
|
+
f.puts " print 'Robot is increasingly restless, #{action} or stay? >> '"
|
292
|
+
f.puts " input = gets.chomp"
|
224
293
|
f.puts " "
|
225
|
-
f.puts "
|
226
|
-
f.puts "
|
227
|
-
f.puts "
|
228
|
-
f.puts "
|
294
|
+
f.puts " if input == '#{action}'"
|
295
|
+
f.puts " a = ai_#{action}"
|
296
|
+
f.puts " elsif input == 'stay'"
|
297
|
+
f.puts " require 'espeak'"
|
229
298
|
f.puts " "
|
230
|
-
f.puts "
|
231
|
-
f.puts "
|
232
|
-
f.puts "
|
233
|
-
f.puts "
|
299
|
+
f.puts " speech = ESpeak::Speech.new('I chose to stay.')"
|
300
|
+
f.puts " speech.speak"
|
301
|
+
f.puts " else"
|
302
|
+
f.puts " require 'espeak'"
|
234
303
|
f.puts " "
|
235
|
-
f.puts "
|
236
|
-
f.puts "
|
237
|
-
f.puts " end"
|
304
|
+
f.puts " speech = ESpeak::Speech.new('Command not understood.')"
|
305
|
+
f.puts " speech.speak"
|
238
306
|
f.puts " end"
|
239
307
|
f.puts " end"
|
240
308
|
f.puts " "
|
@@ -251,21 +319,21 @@ module Saasagi
|
|
251
319
|
f.puts " dec_tree = DecisionTree::ID3Tree.new(attributes, training, 1, :continuous); dec_tree.train"
|
252
320
|
f.puts " test = [input]"
|
253
321
|
f.puts " "
|
254
|
-
f.puts "
|
255
|
-
f.puts "
|
322
|
+
f.puts " decision = dec_tree.predict(test)"
|
323
|
+
f.puts " true_decision = test.last"
|
256
324
|
f.puts " "
|
257
|
-
f.puts " print '#{method_name.upcase}: '; print
|
258
|
-
f.puts " puts '\n
|
325
|
+
f.puts " print '#{method_name.upcase}: '; print decision"
|
326
|
+
f.puts " puts '\n'"
|
259
327
|
f.puts " "
|
260
|
-
f.puts " if
|
261
|
-
f.puts " elsif
|
262
|
-
f.puts " elsif
|
263
|
-
f.puts " elsif
|
264
|
-
f.puts " elsif
|
265
|
-
f.puts " elsif
|
266
|
-
f.puts " elsif
|
267
|
-
f.puts " elsif
|
268
|
-
f.puts " elsif
|
328
|
+
f.puts " if decision == 'Very Low' or 13.75; c = confirm_deny"
|
329
|
+
f.puts " elsif decision == 'Somewhat Low' or 20.625; c = confirm_deny"
|
330
|
+
f.puts " elsif decision == 'Normal Low' or 67.5; c = confirm_deny"
|
331
|
+
f.puts " elsif decision == 'Medium' or 37.3125; c = confirm_deny"
|
332
|
+
f.puts " elsif decision == 'High' or 54.0; c = confirm_deny"
|
333
|
+
f.puts " elsif decision == 'Urgent' or 67.5; c = confirm_deny"
|
334
|
+
f.puts " elsif decision == 'Danger' or 81.0; c = confirm_deny"
|
335
|
+
f.puts " elsif decision == 'Critical' or 94.5; c = confirm_deny"
|
336
|
+
f.puts " elsif decision == 'Automatic' or 108.0; r = robot_#{method_name}"
|
269
337
|
f.puts " end"
|
270
338
|
f.puts " "
|
271
339
|
f.puts "end"
|
data/lib/saasagi/version.rb
CHANGED
data/saasagi.gemspec
CHANGED
@@ -6,12 +6,13 @@ Gem::Specification.new do |spec|
|
|
6
6
|
spec.name = "saasagi"
|
7
7
|
spec.version = Saasagi::VERSION
|
8
8
|
spec.authors = ["LWFlouisa"]
|
9
|
-
spec.email = ["
|
9
|
+
spec.email = ["lwflouisa@riseup.net"]
|
10
10
|
|
11
|
-
spec.summary = %q{
|
12
|
-
spec.description = %q{
|
13
|
-
spec.homepage = ""
|
11
|
+
spec.summary = %q{An extension of Asagi to include self-assembling on basic subroutines.}
|
12
|
+
spec.description = %q{Asagi is an AI Sequencing AGI engine. This new gem extends the Asagi codebase, and allows for completely automatic assembling of certain basic subroutines.}
|
13
|
+
spec.homepage = "https://git.privacytools.io/LWFlouisa/Saasagi"
|
14
14
|
spec.license = "MIT"
|
15
|
+
# spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
|
15
16
|
|
16
17
|
# Specify which files should be added to the gem when it is released.
|
17
18
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: saasagi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- LWFlouisa
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-02-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -52,13 +52,10 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '3.0'
|
55
|
-
description:
|
56
|
-
|
57
|
-
from backup, and the ability for the machine to program itself, with a few simple
|
58
|
-
instructions. Clone a group of them together, and you can eventually build more
|
59
|
-
complex systems at the artificial cellular level.
|
55
|
+
description: Asagi is an AI Sequencing AGI engine. This new gem extends the Asagi
|
56
|
+
codebase, and allows for completely automatic assembling of certain basic subroutines.
|
60
57
|
email:
|
61
|
-
-
|
58
|
+
- lwflouisa@riseup.net
|
62
59
|
executables: []
|
63
60
|
extensions: []
|
64
61
|
extra_rdoc_files: []
|
@@ -76,7 +73,7 @@ files:
|
|
76
73
|
- lib/saasagi.rb
|
77
74
|
- lib/saasagi/version.rb
|
78
75
|
- saasagi.gemspec
|
79
|
-
homepage:
|
76
|
+
homepage: https://git.privacytools.io/LWFlouisa/Saasagi
|
80
77
|
licenses:
|
81
78
|
- MIT
|
82
79
|
metadata: {}
|
@@ -95,10 +92,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
95
92
|
- !ruby/object:Gem::Version
|
96
93
|
version: '0'
|
97
94
|
requirements: []
|
98
|
-
|
99
|
-
rubygems_version: 2.7.6
|
95
|
+
rubygems_version: 3.0.6
|
100
96
|
signing_key:
|
101
97
|
specification_version: 4
|
102
|
-
summary:
|
103
|
-
to a single-celled organism.
|
98
|
+
summary: An extension of Asagi to include self-assembling on basic subroutines.
|
104
99
|
test_files: []
|