RCP_Network 0.1.7 → 0.1.8

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
  SHA256:
3
- metadata.gz: 5e5c20acb06c43fd1c55632b09c128280530bd7ec0d9e5317edafbe75f45cda6
4
- data.tar.gz: 8505263b5abc57d4f1d415b964bf420d0692a267bfab4ef110c81ae8b26d9cc2
3
+ metadata.gz: e6e854c9e6a00dd0a4c5092ef6b677ff7eb96e2b2a9780314c53221b2437f88a
4
+ data.tar.gz: f1ab4721643da9de087887c84657a4d139cd18731c286f42ef04759c711e6f48
5
5
  SHA512:
6
- metadata.gz: 52fe22eb8f170cefd5e2f27f7864ec63b9081d33ce47d78aa36f32be3de8647a2c628017305b3246960afafcc068550dbabbc2ec150e52f5b0a8406468ef83cd
7
- data.tar.gz: b4df8209e7dcbefa679b13dd38105c94138274446cd3bfa806114c37784924d5ae69a074a117e437d67ac9f238fc2b0daa77d3166493e73c0862f10f818689b9
6
+ metadata.gz: 57317d789a15d392ea415244ea346f677fe7c11c8933d3d4ce6068e0892b14e37072ed5c5c59e367407626daeb159a5bc4901b34470ffee51f05446849cff585
7
+ data.tar.gz: a16597a9392dd890d96dabcba2748ff90f1686704840b1c8097294914fe302d4831c788c9a6fda1c3dbc6ad697e3947450f0b084ef7d284fb3ecc05ee398d514
data/lib/RCP_Network.rb CHANGED
@@ -8,6 +8,8 @@ module RCPNetwork
8
8
  # Generate Dangling Modifiers
9
9
  def self.make_choice
10
10
  bot_name = File.read("bot_identity/bot_name.txt").strip
11
+
12
+ old_data = File.read("data/output/modifier_list.txt")
11
13
 
12
14
  # Grammar A
13
15
  present_action = File.readlines("dictionary/present_action.txt").sample.strip
@@ -33,6 +35,8 @@ module RCPNetwork
33
35
  for_that = "For that matter,#{why_was} #{first_object} #{present_action.downcase} anything?"
34
36
 
35
37
  open("data/output/modifier_list.txt", "w") { |f|
38
+ f.puts old_data
39
+
36
40
  f.puts "#{bot_name}: #{grammar_a}#{grammar_b} #{inquire} #{for_that}"
37
41
  }
38
42
  end
@@ -43,19 +47,20 @@ module RCPNetwork
43
47
 
44
48
  modifier_list = File.readlines("data/output/modifier_list.txt")
45
49
 
46
- dangling_modifier = modifier_list.sample.strip
50
+ dangling_modifier = modifier_list.sample
47
51
 
48
- phrase = danging_modifier
52
+ phrase = dangling_modifier
49
53
 
50
- speech = ESpeak::Speech.new(phrase)
51
- speech.speak
54
+ puts phrase
55
+ # speech = ESpeak::Speech.new(phrase)
56
+ # speech.speak
52
57
  end
53
58
 
54
59
  # Main decision tree
55
60
  def self.predict_from_data
56
61
  require "decisiontree"
57
62
 
58
- input = File.read("data/input/modifier_ratio.txt").to_s
63
+ input = File.read("data/input/modifier_ratio.txt").to_f
59
64
 
60
65
  attributes = ["Modifier"]
61
66
 
@@ -73,9 +78,9 @@ module RCPNetwork
73
78
  decision = dec_tree.predict(test)
74
79
 
75
80
  if decision == "Automatic" or 108.8
76
- RCPNetwork::ConciousReason.random_modifier
81
+ RCPNetwork::DanglingModifiers.make_choice
77
82
  else
78
- RCPNetwork::ConciousReason.make_choice
83
+ RCPNetwork::DanglingModifiers.random_modifier
79
84
  end
80
85
 
81
86
  new_input = input += 0.5
@@ -1,3 +1,3 @@
1
1
  module RCPNetwork
2
- VERSION = "0.1.7"
2
+ VERSION = "0.1.8"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: RCP_Network
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gitea
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-01-15 00:00:00.000000000 Z
11
+ date: 2020-01-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler