rules_ai 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rules_ai.rb +9 -9
- data/lib/rules_ai/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0d69baa8ead78bd0f17829d2f31af63c0558cabec1aead453a62277f156c243b
|
4
|
+
data.tar.gz: f518fd1590da24506f3a899f363740ab2c008d9137611271bc87afe7c7b88eaa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1094d88002d1f6411097324294ca9edc67e5e1d3d73dea746198fecb1fb1156a8c38aa9adf2d03ef8dc2f697b469d9b4db25795ca8c89161419a3a26376bbbc
|
7
|
+
data.tar.gz: b8202431c4e09cc6cbf7a36ea2b1aff9edb78e492f10727219d06481f9f6ef1298bdd8cc13b5badf106527c3c414c99b81c2f1df895b4918f2f1793d2a7a0f20
|
data/lib/rules_ai.rb
CHANGED
@@ -6,8 +6,8 @@ module RulesAi
|
|
6
6
|
# Your code goes here...
|
7
7
|
class Rules_Set
|
8
8
|
def self.hours_passed
|
9
|
-
a = File.read("
|
10
|
-
b = File.read("
|
9
|
+
a = File.read("evo_data/hours_passed/number/a_input.txt").strip.to_i
|
10
|
+
b = File.read("evo_data/hours_passed/number/b_input.txt").strip.to_i
|
11
11
|
|
12
12
|
starting_time = a
|
13
13
|
ending_time = b
|
@@ -22,8 +22,8 @@ module RulesAi
|
|
22
22
|
end
|
23
23
|
|
24
24
|
def self.tesla_multiplication
|
25
|
-
input = File.read("
|
26
|
-
rounds = File.read("
|
25
|
+
input = File.read("evo_data/tesla_multiplication/number/input.txt").strip.to_f
|
26
|
+
rounds = File.read("evo_data/tesla_multiplication/number/input.txt").strip.to_i
|
27
27
|
|
28
28
|
if input > 100
|
29
29
|
input = 0
|
@@ -47,7 +47,7 @@ module RulesAi
|
|
47
47
|
end
|
48
48
|
|
49
49
|
def self.autonomous_prompting
|
50
|
-
number = File.read("
|
50
|
+
number = File.read("evo_data/autonomous_prompting/input/number.txt").strip.to_i
|
51
51
|
|
52
52
|
if number > 3
|
53
53
|
number = 0
|
@@ -81,14 +81,14 @@ module RulesAi
|
|
81
81
|
|
82
82
|
## Simple reciprocal cipher with randomized key.
|
83
83
|
def self.mixed_13
|
84
|
-
alph = File.read("keyset/alph.txt").strip
|
85
|
-
beta = File.read("keyset/beta.txt").strip
|
84
|
+
alph = File.read("evo_data/keyset/alph.txt").strip
|
85
|
+
beta = File.read("evo_data/keyset/beta.txt").strip
|
86
86
|
|
87
|
-
input = File.read("documents/plaintext.txt").to_s.downcase
|
87
|
+
input = File.read("evo_data/documents/plaintext.txt").to_s.downcase
|
88
88
|
|
89
89
|
ciphertext = input.tr alph, beta
|
90
90
|
|
91
|
-
open("documents/ciphertext.txt", "w") { |f|
|
91
|
+
open("evo_data/documents/ciphertext.txt", "w") { |f|
|
92
92
|
f.puts ciphertext
|
93
93
|
}
|
94
94
|
end
|
data/lib/rules_ai/version.rb
CHANGED