rules_ai 0.1.0 → 0.2.0

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rules_ai.rb +179 -178
  3. data/lib/rules_ai/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 93591c32e5f7c57a6bd1e39f4ebca36ce3d48606cc37f0e3c9cf12848ca667db
4
- data.tar.gz: 49c37130fe39cd03bd227bf43131ddab72e310b22e339c14e9211fd5921026c7
3
+ metadata.gz: 288b2167dde783360e7875c09ac620577c08d5f8dab22876a4058e9eb3aea1da
4
+ data.tar.gz: 2cd87888de329e274910b9487c2065682279149691ce508df056b220a6e00e78
5
5
  SHA512:
6
- metadata.gz: 491b31b35fdedfb6c74ec8c62758fa635be32d0c1f4738e7ffdd200411ec31911e02b7209859334da43ab59e0bb24da9d98b249de3e851ada2ed0368eb1a9b5e
7
- data.tar.gz: 53ebcc9303f07a2d617e4827c32108e402ba98ef26d9e0875b458de4205a16259b743497935c8faf515a1f42859e5354738a1f7fb0824606a4908a92b6765c35
6
+ metadata.gz: 3952a4e1f0be18f47f997766800e6f72fc13f40919e547446a3132238d3db939d166090a03c35d5568b2a6165c506d4626d99eb06d23cf582c9705f94b66c758
7
+ data.tar.gz: ad2576b892f6d494953279ff0245d315dab9bab2a528ddf41f288593ec17b0167f6a19a137b782eeadd20c26f60fd4e683e504789161b4f4fdf6ad3f5d3f623c
@@ -125,184 +125,185 @@ module RulesAi
125
125
  puts "The total ream count is: #{actual_multiplier} reams of #{ream_size} pages."
126
126
  puts "With front and back cover, the final bound book is #{total_count} pages."
127
127
  end
128
+
129
+ def self.calculate_hyper
130
+ print "What is the size of x? >> "; x = gets.chomp.to_i
131
+ print "What is the size of y? >> "; y = gets.chomp.to_i
132
+ print "What is the size of z? >> "; z = gets.chomp.to_i
133
+
134
+ square_x = x * 48
135
+ square_y = y * 48
136
+ square_z = z * 48
137
+
138
+ inches = x + y + z
139
+ hyper_inches = square_x + square_y + square_z
140
+
141
+ puts "\nThe size of the w axis of x is hyper distance #{square_x}"
142
+ puts "The size of the w axis of y is hyper distance #{square_y}"
143
+ puts "The size of the w axis of z is hyper distance #{square_z}"
144
+
145
+ puts "The hyper inches of the tessaract is #{hyper_inches} hyper distance."
146
+ end
147
+
148
+ def self.line
149
+ puts '
150
+ +----------------+
151
+ '
152
+ end
153
+
154
+ def self.square
155
+ puts '
156
+ +----------------+
157
+ | |
158
+ | |
159
+ | |
160
+ | |
161
+ | |
162
+ | |
163
+ | |
164
+ +----------------+
165
+ '
166
+ end
167
+
168
+ def self.cube
169
+ puts '
170
+ +----------------+
171
+ |\ |\
172
+ | \ | \
173
+ | \ | \
174
+ | +------------+---+
175
+ | | | |
176
+ | | | |
177
+ | | | |
178
+ +---+------------+ |
179
+ \ | \ |
180
+ \ | \ |
181
+ \| \|
182
+ +----------------+
183
+ '
184
+ end
185
+
186
+ def self.hyper
187
+ puts '
188
+ +----------------+
189
+ /|\ /|\
190
+ / | \ / | \
191
+ / | \ / | \
192
+ / | +--------+---+---+
193
+ / | /| / | /|
194
+ / | / | / | / |
195
+ / |/ | / |/ |
196
+ / +---+----+-------+ |
197
+ / / \ | / / \ |
198
+ / / \ | / / \ |
199
+ / / \| / / \|
200
+ +--------+-------+--------+-------+
201
+ |\ / /|\ / /
202
+ | \ / / | \ / /
203
+ | \ / / | \ / /
204
+ | ++-------+---+---+/ /
205
+ | + / | + /
206
+ | /| / | /| /
207
+ | / | / | / | /
208
+ +---+----+-------+/ | /
209
+ \ | / \ | /
210
+ \ | / \ | /
211
+ \| / \| /
212
+ +----------------+
213
+ '
214
+ end
128
215
  end
129
216
 
130
- ######################################################################
131
- # Don't mess with these, these revolve around spatial relationships. #
132
- ######################################################################
133
- # class Static_Perimeters
134
- #
135
- # # The objects within the space.
136
- # def positive_perimeters
137
- # # Base radius of static objects.
138
- # base_radius = 2500
139
- #
140
- # # Specfic multipliers for Earth index based objects.
141
- # base_two = 2
142
- # base_fro = 4
143
- # base_six = 6
144
- # base_eit = 8
145
- #
146
- # # Size of specific objects.
147
- # size_of_planets = base_radius ** base_fro
148
- # size_of_moons = base_radius ** base_two
149
- # size_of_stars = base_radius ** base_six
150
- # size_of_blackholes = base_radius ** base_eit
151
- #
152
- # # Total output sizes of specific objects.
153
- # puts "The size of the planets is #{size_of_planets} radius."; sleep(3)
154
- # puts "The size of the moons is #{size_of_moons} radius."; sleep(3)
155
- # puts "The size of the stars is #{size_of_stars} radius."; sleep(3)
156
- # puts "The size of a blackhole is #{size_of_blackholes} radius."; sleep(3)
157
- # end
158
- #
159
- # # Space between the objects.
160
- # def negative_perimeters
161
- # # Base distance between objects.
162
- # base_distance = 1_000_000_000
163
- #
164
- # # Estimated divider between specific objects to base distance.
165
- # space_between_planets = 43.8
166
- # space_between_moons = 14.6
167
- # space_between_stars = 876
168
- # space_between_blackholes = 2628
169
- #
170
- # # Minimum distance between objects.
171
- # planet_distance = base_distance / space_between_planets
172
- # moon_distance = base_distance / space_between_moons
173
- # star_distance = base_distance / space_between_stars
174
- # blackhole_distance = base_distance / space_between_blackholes
175
- #
176
- # # Actual distance between objects
177
- # actual_planets = planet_distance * 10
178
- # actual_moons = moon_distance * 10
179
- # actual_stars = star_distance * 10
180
- # actual_blackholes = blackhole_distance * 10
181
- #
182
- # # The output results of distance between objects.
183
- # puts "The distance between planets is #{actual_planets} miles."; sleep(3)
184
- # puts "The distance between moons is #{actual_moons} miles."; sleep(3)
185
- # puts "The distance between stars is #{actual_stars} miles."; sleep(3)
186
- # puts "The distance between blackholes is #{actual_blackholes} miles."; sleep(3)
187
- # end
188
- #
189
- # end
190
- #
191
- # # Changing perimeters
192
- # class Dynamic_Perimeters
193
- #
194
- # # The objects within the space.
195
- # def positive_perimeters
196
- # spaceship = File.read("data/dynamic/positive_perimenters/spaceship_size.txt").strip.to_i
197
- # space_station = spaceship * 200
198
- # satalite = space_station / 10
199
- #
200
- # puts "The total size of the space shuttle is #{spaceship} feet."; sleep(3)
201
- # puts "The total size of the space station is #{space_station} feet."; sleep(3)
202
- # puts "The total size of the satalite is #{satalite} feet."; sleep(3)
203
- # end
204
- #
205
- # # Space between the objects.
206
- # def negative_perimeters
207
- # base_multiplier = 10
208
- #
209
- # # Minimum space between objects.
210
- # space_between_spaceships = File.read("data/dynamic/negative_perimeters/space_between_spaceships.txt").strip.to_i
211
- # space_between_station = File.read("data/dynamic/negative_perimeters/space_between_station.txt").strip.to_i
212
- # space_between_satalite = File.read("data/dynamic/negative_perimeters/space_between_satalite.txt").strip.to_i
213
- #
214
- # # Actual space between objects
215
- # actual_spaceship_distance = space_between_spaceships * base_multiplier
216
- # actual_station_distance = space_between_station * base_multiplier
217
- # actual_satalite_distance = space_between_satalite * base_multiplier
218
- #
219
- # puts "The minimum space between shuttles is #{actual_spaceship_distance} feet."; sleep(3)
220
- # puts "The minimum space between stations is #{actual_station_distance} feet."; sleep(3)
221
- # puts "The minimum space between satalites is #{actual_satalite_distance} feet."; sleep(3)
222
- # end
223
- #
224
- # end
225
- #
226
- # class Chatbot
227
- # Bianca asks your name.
228
- #def bianca_name
229
- # bot_name = File.read("bot_identity/name.txt").strip
230
- # your_name = File.read("usr_identity/name.txt").strip
231
- #
232
- # puts "#{bot_name}: What is your name?"
233
- # print "#{your_name}: My name is "; my_name = gets.chomp
234
- #
235
- # open("usr_identity/name.txt", "w") { |f|
236
- # f.puts my_name
237
- # }
238
- #
239
- # puts "#{bot_name}: Nice to meet you, #{my_name}."
240
- #end
241
- #
242
- # Bianca asks if you have a pet.
243
- #def bianca_pets
244
- # bot_name = File.read("bot_identity/name.txt").strip
245
- # your_name = File.read("usr_identity/name.txt").strip
246
- #
247
- # puts "#{bot_name}: Do you have a pet?"
248
- # print "#{your_name}: My pet is "; my_pet = gets.chomp
249
- #
250
- # open("usr_identity/pet.txt", "w") { |f|
251
- # f.puts my_pet
252
- # }
253
- #
254
- # puts "#{bot_name}: You have a nice #{my_pet}."
255
- #end
256
- #
257
- # Bianca asks what your hobby is.
258
- #def bianca_hobby
259
- # bot_name = File.read("bot_identity/name.txt").strip
260
- # your_name = File.read("usr_identity/name.txt").strip
261
- #
262
- # puts "#{bot_name}: What is your hobby?"
263
- # print "#{your_name}: My hobby is "; my_hobby = gets.chomp
264
- #
265
- # open("usr_identity/hobby.txt", "w") { |f|
266
- # f.puts my_hobby
267
- # }
268
- #
269
- # puts "#{bot_name}: You have a nice #{my_hobby}."
270
- #end
271
- #
272
- #def bianca_jobs
273
- # bot_name = File.read("bot_identity/name.txt").strip
274
- # your_name = File.read("usr_identity/name.txt").strip
275
- #
276
- # puts "#{bot_name}: What is your job?"
277
- # print "#{your_name}: My job is "; my_job = gets.chomp
278
- #
279
- # open("usr_identity/job.txt", "w") { |f|
280
- # f.puts my_job
281
- # }
282
- #
283
- # puts "#{bot_name}: Sounds like #{my_job} is hard work."
284
- #end
285
- #
286
- #def bianca_skills
287
- # bot_name = File.read("bot_identity/name.txt").strip
288
- # your_name = File.read("usr_identity/name.txt").strip
289
- #
290
- # puts "#{bot_name}: What is your skill?"
291
- # print "#{your_name}: My skill is "; my_skill = gets.chomp
292
- #
293
- # open("usr_identity/skill.txt", "w") { |f|
294
- # f.puts my_skill
295
- # }
296
- #
297
- # puts "#{bot_name}: #{my_skill} sounds like an interesting skill."
298
- #end
299
- #
300
- #system("clear")
301
- #
302
- #bianca_name; sleep(3)
303
- #bianca_pets; sleep(3)
304
- #bianca_hobby; sleep(3)
305
- #bianca_jobs; sleep(3)
306
- #bianca_skills; sleep(3)
307
- # end
217
+ class Chatbot
218
+
219
+ def self.bianca_name
220
+ bot_name = File.read("bot_identity/name.txt").strip
221
+ your_name = File.read("usr_identity/name.txt").strip
222
+
223
+ puts "#{bot_name}: What is your name?"
224
+ print "#{your_name}: My name is "; my_name = gets.chomp
225
+
226
+ open("usr_identity/name.txt", "w") { |f|
227
+ f.puts my_name
228
+ }
229
+
230
+ puts "#{bot_name}: Nice to meet you, #{my_name}."
231
+ end
232
+
233
+ def self.bianca_pets
234
+ bot_name = File.read("bot_identity/name.txt").strip
235
+ your_name = File.read("usr_identity/name.txt").strip
236
+
237
+ puts "#{bot_name}: Do you have a pet?"
238
+ print "#{your_name}: My pet is "; my_pet = gets.chomp
239
+
240
+ open("usr_identity/pet.txt", "w") { |f|
241
+ f.puts my_pet
242
+ }
243
+
244
+ puts "#{bot_name}: You have a nice #{my_pet}."
245
+ end
246
+
247
+ def self.bianca_hobby
248
+ bot_name = File.read("bot_identity/name.txt").strip
249
+ your_name = File.read("usr_identity/name.txt").strip
250
+
251
+ puts "#{bot_name}: What is your hobby?"
252
+ print "#{your_name}: My hobby is "; my_hobby = gets.chomp
253
+
254
+ open("usr_identity/hobby.txt", "w") { |f|
255
+ f.puts my_hobby
256
+ }
257
+
258
+ puts "#{bot_name}: You have a nice #{my_hobby}."
259
+ end
260
+
261
+ def self.bianca_jobs
262
+ bot_name = File.read("bot_identity/name.txt").strip
263
+ your_name = File.read("usr_identity/name.txt").strip
264
+
265
+ puts "#{bot_name}: What is your job?"
266
+ print "#{your_name}: My job is "; my_job = gets.chomp
267
+
268
+ open("usr_identity/job.txt", "w") { |f|
269
+ f.puts my_job
270
+ }
271
+
272
+ puts "#{bot_name}: Sounds like #{my_job} is hard work."
273
+ end
274
+
275
+ def self.bianca_skills
276
+ bot_name = File.read("bot_identity/name.txt").strip
277
+ your_name = File.read("usr_identity/name.txt").strip
278
+
279
+ puts "#{bot_name}: What is your skill?"
280
+ print "#{your_name}: My skill is "; my_skill = gets.chomp
281
+
282
+ open("usr_identity/skill.txt", "w") { |f|
283
+ f.puts my_skill
284
+ }
285
+
286
+ puts "#{bot_name}: #{my_skill} sounds like an interesting skill."
287
+ end
288
+ end
289
+
290
+ class New_Routine # Generates Meta rules
291
+
292
+ def self.generate_ruleset
293
+ ruleset = File.readlines("data/rules/input.txt")
294
+
295
+ scatter_rules = ruleset.shuffle
296
+
297
+ puts "Generated Rules:\n#{scatter_rules}"
298
+
299
+ open("new_routine.rb", "w") { |f|
300
+ puts 'require "rules_ai"'
301
+ puts "\n#{scatter_rules}"
302
+ }
303
+ end
304
+
305
+ def self.test_rule
306
+ system("ruby new_routine.rb")
307
+ end
308
+ end
308
309
  end
@@ -1,3 +1,3 @@
1
1
  module RulesAi
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rules_ai
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gitea
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-11-03 00:00:00.000000000 Z
11
+ date: 2020-11-07 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: This is a collection of different rules based functions, from calculating
14
14
  how many hours have passed, tesla multiplication, autonomous prompting ( such as