answer-factory 0.0.3 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -0
- data/Thorfile +23 -12
- data/VERSION +1 -1
- data/_spikes/old_vs_new_dominated_by?.rb +1 -1
- data/answer-factory.gemspec +4 -3
- data/bin/answer-factory +4 -5
- data/lib/answer-factory.rb +4 -0
- data/lib/answers/answer.rb +1 -1
- data/lib/answers/batch.rb +1 -1
- data/lib/factories/factory.rb +1 -1
- data/lib/factories/workstation.rb +1 -1
- data/lib/operators/basic_operators.rb +1 -1
- data/lib/operators/evaluators.rb +1 -1
- data/lib/operators/samplers_and_selectors.rb +1 -1
- data/readme.md +16 -14
- data/spec/spec_helper.rb +1 -1
- data/templates/answer_factory_activate_template.erb +1 -0
- metadata +4 -3
data/Rakefile
CHANGED
data/Thorfile
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'active_support'
|
2
|
-
require '
|
2
|
+
require 'answer-factory'
|
3
3
|
|
4
|
-
class
|
4
|
+
class Setup_Factory < Thor::Group
|
5
5
|
include Thor::Actions
|
6
6
|
|
7
7
|
# Define arguments and options
|
@@ -10,17 +10,28 @@ class Create_Factory < Thor::Group
|
|
10
10
|
|
11
11
|
desc "Creates a new project folder structure for new Nudge types, instructions, search operators and specs"
|
12
12
|
|
13
|
-
|
14
13
|
def self.source_root
|
15
14
|
File.dirname(__FILE__)
|
16
15
|
end
|
17
16
|
|
18
|
-
def
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
empty_directory("
|
17
|
+
def answer_factory_gem_path
|
18
|
+
AnswerFactory.gem_root
|
19
|
+
end
|
20
|
+
|
21
|
+
def set_up_project_in_this_folder
|
22
|
+
empty_directory("./lib")
|
23
|
+
empty_directory("./lib/nudge/instructions")
|
24
|
+
empty_directory("./lib/nudge/types")
|
25
|
+
empty_directory("./lib/factory/operators")
|
26
|
+
empty_directory("./spec")
|
27
|
+
end
|
28
|
+
|
29
|
+
def create_runner
|
30
|
+
template("#{answer_factory_gem_path}/templates/answer_factory_activate_template.erb", "./activate.rb")
|
31
|
+
end
|
32
|
+
|
33
|
+
def say_byebye
|
34
|
+
puts "your answer-factory project is located in directory #{Dir.pwd}\n"
|
24
35
|
end
|
25
36
|
end
|
26
37
|
|
@@ -31,7 +42,7 @@ class New_Nudge_Type < Thor::Group
|
|
31
42
|
# Define arguments and options
|
32
43
|
argument :typename_root
|
33
44
|
class_option :test_framework, :default => :rspec
|
34
|
-
desc "Creates a new NudgeType class definition
|
45
|
+
desc "Creates a new NudgeType class definition, shared instructions, and rspec files"
|
35
46
|
|
36
47
|
|
37
48
|
def self.source_root
|
@@ -49,7 +60,7 @@ class New_Nudge_Type < Thor::Group
|
|
49
60
|
def create_lib_file
|
50
61
|
@camelcased_type_name = New_Nudge_Type.type_name(typename_root)
|
51
62
|
filename = "#{@camelcased_type_name}.rb"
|
52
|
-
template("#{nudge_gem_path}/templates/nudge_type_class.erb", "#{New_Nudge_Type.source_root}/lib/types/#{filename}")
|
63
|
+
template("#{nudge_gem_path}/templates/nudge_type_class.erb", "#{New_Nudge_Type.source_root}/lib/nudge/types/#{filename}")
|
53
64
|
end
|
54
65
|
|
55
66
|
def create_lib_spec
|
@@ -68,7 +79,7 @@ class New_Nudge_Type < Thor::Group
|
|
68
79
|
@instname = "#{@core.camelize}Instruction"
|
69
80
|
@type = typename_root
|
70
81
|
@camelized_type = New_Nudge_Type.type_name(typename_root)
|
71
|
-
template("#{nudge_gem_path}/templates/nudge_#{inst}_instruction.erb", "#{New_Nudge_Type.source_root}/lib/instructions/#{filename}")
|
82
|
+
template("#{nudge_gem_path}/templates/nudge_#{inst}_instruction.erb", "#{New_Nudge_Type.source_root}/lib/nudge/instructions/#{filename}")
|
72
83
|
end
|
73
84
|
end
|
74
85
|
end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.5
|
data/answer-factory.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{answer-factory}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.5"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Bill Tozier", "Trek Glowacki", "Jesse Sielaff"]
|
12
|
-
s.date = %q{2010-04-
|
12
|
+
s.date = %q{2010-04-30}
|
13
13
|
s.default_executable = %q{answer-factory}
|
14
14
|
s.description = %q{The pragmaticgp gem provides a simple framework for building, running and managing genetic programming experiments which automatically discover algorithms and equations to solve user-defined problems.}
|
15
15
|
s.email = %q{bill@vagueinnovation.com}
|
@@ -57,7 +57,8 @@ Gem::Specification.new do |s|
|
|
57
57
|
"spec/operators/resample_and_clone_spec.rb",
|
58
58
|
"spec/operators/resample_values_spec.rb",
|
59
59
|
"spec/operators/uniformBackboneCrossover_spec.rb",
|
60
|
-
"spec/spec_helper.rb"
|
60
|
+
"spec/spec_helper.rb",
|
61
|
+
"templates/answer_factory_activate_template.erb"
|
61
62
|
]
|
62
63
|
s.homepage = %q{http://github.com/Vaguery/PragGP}
|
63
64
|
s.rdoc_options = ["--charset=UTF-8"]
|
data/bin/answer-factory
CHANGED
@@ -10,8 +10,7 @@ if Dir.exist?(project_root) then
|
|
10
10
|
puts "project directory /#{project_root} already exists"
|
11
11
|
else
|
12
12
|
Dir.mkdir(project_root)
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
end
|
17
|
-
|
13
|
+
cp("#{gem_root}/Thorfile","#{project_root}/Thorfile")
|
14
|
+
cd("#{project_root}")
|
15
|
+
puts `thor setup_factory:set_up_project_in_this_folder #{project_root}`
|
16
|
+
end
|
data/lib/answer-factory.rb
CHANGED
data/lib/answers/answer.rb
CHANGED
data/lib/answers/batch.rb
CHANGED
data/lib/factories/factory.rb
CHANGED
data/lib/operators/evaluators.rb
CHANGED
data/readme.md
CHANGED
@@ -1,14 +1,24 @@
|
|
1
|
-
#
|
1
|
+
# Answer Factory: A system for pragmatic genetic programming projects
|
2
2
|
|
3
3
|
## Caveat
|
4
4
|
|
5
|
-
|
5
|
+
**DO NOT EXPECT ANYTHING TO WORK (AT ALL) UNTIL VERSION 0.1+**
|
6
|
+
This particular project is undergoing a lot of serious surgery right now.
|
6
7
|
|
7
8
|
## What it does
|
8
9
|
|
9
|
-
|
10
|
+
The answer-factory gem includes scripting support for
|
10
11
|
|
11
|
-
|
12
|
+
* generating new design automation projects
|
13
|
+
* Nudge, a Turing-complete programming language for readable genetic programming
|
14
|
+
* standard genetic programming search operators
|
15
|
+
* a standard suite of powerful metaheuristics
|
16
|
+
* full automated archiving of all solutions
|
17
|
+
* analytics and reporting
|
18
|
+
* administrative tools for managing AnswerFactory daemons
|
19
|
+
* reporting tools for exploring and directing search
|
20
|
+
|
21
|
+
The AnswerFactory infrastructure has been designed to help _regular people_ build, run and manage technical experiments that use (among other things) genetic programming. There's a lot more in there... but that's the bottom line.
|
12
22
|
|
13
23
|
## Getting started
|
14
24
|
|
@@ -16,14 +26,6 @@ You'll need a working (and running) installation of CouchDB.
|
|
16
26
|
|
17
27
|
Then:
|
18
28
|
|
19
|
-
gem install
|
20
|
-
gem install thor
|
21
|
-
gem install couch-rest
|
22
|
-
gem install sinatra
|
23
|
-
|
24
|
-
and for running specs (which you _should be doing_):
|
29
|
+
gem install answer-factory
|
25
30
|
|
26
|
-
|
27
|
-
gem install sinatra
|
28
|
-
gem install fakeweb
|
29
|
-
|
31
|
+
This should automatically load dependent gems, including nudge, rspec, and many others.
|
data/spec/spec_helper.rb
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
# this is the runner file
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 5
|
9
|
+
version: 0.0.5
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Bill Tozier
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2010-04-
|
19
|
+
date: 2010-04-30 00:00:00 -04:00
|
20
20
|
default_executable: answer-factory
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
@@ -148,6 +148,7 @@ files:
|
|
148
148
|
- spec/operators/resample_values_spec.rb
|
149
149
|
- spec/operators/uniformBackboneCrossover_spec.rb
|
150
150
|
- spec/spec_helper.rb
|
151
|
+
- templates/answer_factory_activate_template.erb
|
151
152
|
has_rdoc: true
|
152
153
|
homepage: http://github.com/Vaguery/PragGP
|
153
154
|
licenses: []
|