evosynth 0.1.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.
- data/INSTALL +74 -0
- data/LICENSE +22 -0
- data/README +57 -0
- data/Rakefile +132 -0
- data/TODO +88 -0
- data/docs/FEATURES +111 -0
- data/docs/rdoc/classes/EvoSynth.html +2643 -0
- data/docs/rdoc/classes/EvoSynth/Adjustments.html +119 -0
- data/docs/rdoc/classes/EvoSynth/Adjustments/AdaptiveAdjustment.html +264 -0
- data/docs/rdoc/classes/EvoSynth/Adjustments/PredifinedAdjustment.html +235 -0
- data/docs/rdoc/classes/EvoSynth/ArrayGenome.html +313 -0
- data/docs/rdoc/classes/EvoSynth/BinaryGenome.html +518 -0
- data/docs/rdoc/classes/EvoSynth/Decoder.html +286 -0
- data/docs/rdoc/classes/EvoSynth/Evaluator.html +466 -0
- data/docs/rdoc/classes/EvoSynth/Evolvers.html +469 -0
- data/docs/rdoc/classes/EvoSynth/Evolvers/AdaptiveES.html +448 -0
- data/docs/rdoc/classes/EvoSynth/Evolvers/BalancedCoevolutionary.html +439 -0
- data/docs/rdoc/classes/EvoSynth/Evolvers/DerandomizedES.html +450 -0
- data/docs/rdoc/classes/EvoSynth/Evolvers/Evolver.html +125 -0
- data/docs/rdoc/classes/EvoSynth/Evolvers/GeneticAlgorithm.html +467 -0
- data/docs/rdoc/classes/EvoSynth/Evolvers/Hillclimber.html +343 -0
- data/docs/rdoc/classes/EvoSynth/Evolvers/LocalSearch.html +422 -0
- data/docs/rdoc/classes/EvoSynth/Evolvers/LocalSearch/GreatDelugeAcceptance.html +287 -0
- data/docs/rdoc/classes/EvoSynth/Evolvers/LocalSearch/HillclimberAcceptance.html +197 -0
- data/docs/rdoc/classes/EvoSynth/Evolvers/LocalSearch/RecordToRecordTravelAcceptance.html +296 -0
- data/docs/rdoc/classes/EvoSynth/Evolvers/LocalSearch/SimulatedAnnealingAcceptance.html +286 -0
- data/docs/rdoc/classes/EvoSynth/Evolvers/LocalSearch/ThresholdAcceptance.html +287 -0
- data/docs/rdoc/classes/EvoSynth/Evolvers/MemeticAlgorithm.html +441 -0
- data/docs/rdoc/classes/EvoSynth/Evolvers/PopulationHillclimber.html +375 -0
- data/docs/rdoc/classes/EvoSynth/Evolvers/ProfileUsingEvolver.html +205 -0
- data/docs/rdoc/classes/EvoSynth/Evolvers/RoundRobinCoevolutionary.html +383 -0
- data/docs/rdoc/classes/EvoSynth/Evolvers/RunnableEvolver.html +279 -0
- data/docs/rdoc/classes/EvoSynth/Evolvers/RunnableEvolver/Goal.html +193 -0
- data/docs/rdoc/classes/EvoSynth/Evolvers/SelfAdaptiveES.html +394 -0
- data/docs/rdoc/classes/EvoSynth/Evolvers/SteadyStateGA.html +390 -0
- data/docs/rdoc/classes/EvoSynth/GlobalRecombinations.html +119 -0
- data/docs/rdoc/classes/EvoSynth/GlobalRecombinations/GlobalArithmeticCrossover.html +204 -0
- data/docs/rdoc/classes/EvoSynth/GlobalRecombinations/GlobalUniformCrossover.html +203 -0
- data/docs/rdoc/classes/EvoSynth/Individual.html +561 -0
- data/docs/rdoc/classes/EvoSynth/MaximizingIndividual.html +266 -0
- data/docs/rdoc/classes/EvoSynth/MetaOperators.html +149 -0
- data/docs/rdoc/classes/EvoSynth/MetaOperators/ConditionalCombinedOperator.html +278 -0
- data/docs/rdoc/classes/EvoSynth/MetaOperators/ProportionalCombinedOperator.html +285 -0
- data/docs/rdoc/classes/EvoSynth/MetaOperators/SequentialCombinedOperator.html +290 -0
- data/docs/rdoc/classes/EvoSynth/MinimizingIndividual.html +266 -0
- data/docs/rdoc/classes/EvoSynth/Mutations.html +251 -0
- data/docs/rdoc/classes/EvoSynth/Mutations/BinaryMutation.html +336 -0
- data/docs/rdoc/classes/EvoSynth/Mutations/EfficientBinaryMutation.html +345 -0
- data/docs/rdoc/classes/EvoSynth/Mutations/ExchangeMutation.html +320 -0
- data/docs/rdoc/classes/EvoSynth/Mutations/Functions.html +160 -0
- data/docs/rdoc/classes/EvoSynth/Mutations/GaussMutation.html +311 -0
- data/docs/rdoc/classes/EvoSynth/Mutations/Identity.html +220 -0
- data/docs/rdoc/classes/EvoSynth/Mutations/InversionMutation.html +231 -0
- data/docs/rdoc/classes/EvoSynth/Mutations/MixingMutation.html +233 -0
- data/docs/rdoc/classes/EvoSynth/Mutations/OneGeneFlipping.html +295 -0
- data/docs/rdoc/classes/EvoSynth/Mutations/SelfAdaptiveGaussMutation.html +347 -0
- data/docs/rdoc/classes/EvoSynth/Mutations/ShiftingMutation.html +229 -0
- data/docs/rdoc/classes/EvoSynth/Mutations/UniformRealMutation.html +264 -0
- data/docs/rdoc/classes/EvoSynth/Output.html +212 -0
- data/docs/rdoc/classes/EvoSynth/Output/CSVExporter.html +211 -0
- data/docs/rdoc/classes/EvoSynth/Output/ConsoleWriter.html +194 -0
- data/docs/rdoc/classes/EvoSynth/Output/GnuPlotExporter.html +235 -0
- data/docs/rdoc/classes/EvoSynth/Output/GruffExporter.html +219 -0
- data/docs/rdoc/classes/EvoSynth/Output/Logger.html +345 -0
- data/docs/rdoc/classes/EvoSynth/Population.html +430 -0
- data/docs/rdoc/classes/EvoSynth/Problems.html +159 -0
- data/docs/rdoc/classes/EvoSynth/Problems/BinaryBenchmarkFuntions.html +258 -0
- data/docs/rdoc/classes/EvoSynth/Problems/FloatBenchmarkFuntions.html +406 -0
- data/docs/rdoc/classes/EvoSynth/Problems/GraphColouring.html +265 -0
- data/docs/rdoc/classes/EvoSynth/Problems/TSP.html +327 -0
- data/docs/rdoc/classes/EvoSynth/Profile.html +324 -0
- data/docs/rdoc/classes/EvoSynth/Recombinations.html +251 -0
- data/docs/rdoc/classes/EvoSynth/Recombinations/ArithmeticCrossover.html +286 -0
- data/docs/rdoc/classes/EvoSynth/Recombinations/EdgeRecombination.html +203 -0
- data/docs/rdoc/classes/EvoSynth/Recombinations/Identity.html +192 -0
- data/docs/rdoc/classes/EvoSynth/Recombinations/KPointCrossover.html +286 -0
- data/docs/rdoc/classes/EvoSynth/Recombinations/OnePointCrossover.html +211 -0
- data/docs/rdoc/classes/EvoSynth/Recombinations/OrderedRecombination.html +206 -0
- data/docs/rdoc/classes/EvoSynth/Recombinations/PartiallyMappedCrossover.html +206 -0
- data/docs/rdoc/classes/EvoSynth/Recombinations/UniformCrossover.html +208 -0
- data/docs/rdoc/classes/EvoSynth/Selections.html +174 -0
- data/docs/rdoc/classes/EvoSynth/Selections/FitnessProportionalSelection.html +206 -0
- data/docs/rdoc/classes/EvoSynth/Selections/Identity.html +200 -0
- data/docs/rdoc/classes/EvoSynth/Selections/NStageTournamentSelection.html +273 -0
- data/docs/rdoc/classes/EvoSynth/Selections/RandomSelection.html +192 -0
- data/docs/rdoc/classes/EvoSynth/Selections/RouletteWheelSelection.html +212 -0
- data/docs/rdoc/classes/EvoSynth/Selections/SelectBest.html +206 -0
- data/docs/rdoc/classes/EvoSynth/Selections/TournamentSelection.html +274 -0
- data/docs/rdoc/classes/Examples.html +268 -0
- data/docs/rdoc/classes/Examples/Ants.html +198 -0
- data/docs/rdoc/classes/Examples/Ants/AntMutation.html +381 -0
- data/docs/rdoc/classes/Examples/Ants/Pheromon.html +256 -0
- data/docs/rdoc/classes/Examples/CCGAExample.html +305 -0
- data/docs/rdoc/classes/Examples/CCGAExample/CCGA2BenchmarkEvaluator.html +165 -0
- data/docs/rdoc/classes/Examples/CCGAExample/CCGABenchmarkEvaluator.html +242 -0
- data/docs/rdoc/classes/Examples/CCGAExample/CCGAIndividual.html +181 -0
- data/docs/rdoc/classes/Examples/CMBExample.html +215 -0
- data/docs/rdoc/classes/Examples/CMBExample/CMBEvaluator.html +212 -0
- data/docs/rdoc/classes/Examples/EsExample.html +270 -0
- data/docs/rdoc/classes/Examples/EsExample/BenchmarkEvaluator.html +162 -0
- data/docs/rdoc/classes/Examples/Exporter.html +208 -0
- data/docs/rdoc/classes/Examples/Exporter/ExporterEvaluator.html +196 -0
- data/docs/rdoc/classes/Examples/GraphColouring.html +199 -0
- data/docs/rdoc/classes/Examples/Hacking.html +147 -0
- data/docs/rdoc/classes/Examples/Hacking/HackingEvaluator.html +169 -0
- data/docs/rdoc/classes/Examples/LocalSearch.html +294 -0
- data/docs/rdoc/classes/Examples/LocalSearch/LocalSearchEvaluator.html +198 -0
- data/docs/rdoc/classes/Examples/MaxOnes.html +187 -0
- data/docs/rdoc/classes/Examples/MaxOnes/MaxOnesEvaluator.html +170 -0
- data/docs/rdoc/classes/Examples/Partitionproblem.html +201 -0
- data/docs/rdoc/classes/Examples/Partitionproblem/PartitionEvaluator.html +164 -0
- data/docs/rdoc/classes/Examples/Partitionproblem/PartitionIndividual.html +334 -0
- data/docs/rdoc/classes/Examples/Partitionproblem/PartitionMutation.html +199 -0
- data/docs/rdoc/classes/Examples/Partitionproblem/Testdata.html +294 -0
- data/docs/rdoc/classes/Examples/SPk.html +139 -0
- data/docs/rdoc/classes/Examples/SPk/SPkFitnessEvaluator.html +299 -0
- data/docs/rdoc/classes/Examples/TSP.html +187 -0
- data/docs/rdoc/created.rid +1 -0
- data/docs/rdoc/files/INSTALL.html +253 -0
- data/docs/rdoc/files/LICENSE.html +119 -0
- data/docs/rdoc/files/README.html +235 -0
- data/docs/rdoc/files/docs/FEATURES.html +428 -0
- data/docs/rdoc/files/examples/ants_rb.html +133 -0
- data/docs/rdoc/files/examples/ccga_example_rb.html +129 -0
- data/docs/rdoc/files/examples/cmb_example_rb.html +129 -0
- data/docs/rdoc/files/examples/evolution_strategies_rb.html +129 -0
- data/docs/rdoc/files/examples/exporter_rb.html +129 -0
- data/docs/rdoc/files/examples/graph_colouring_rb.html +129 -0
- data/docs/rdoc/files/examples/hacking_rb.html +129 -0
- data/docs/rdoc/files/examples/local_search_rb.html +129 -0
- data/docs/rdoc/files/examples/max_ones_rb.html +129 -0
- data/docs/rdoc/files/examples/partition_rb.html +131 -0
- data/docs/rdoc/files/examples/spk_rb.html +129 -0
- data/docs/rdoc/files/examples/tsp_rb.html +131 -0
- data/docs/rdoc/files/lib/evosynth/core/array_genome_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/core/binary_genome_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/core/evaluator_rb.html +129 -0
- data/docs/rdoc/files/lib/evosynth/core/individual_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/core/maximizing_individual_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/core/minimizing_individual_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/core/population_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/core/profile_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/core/randomizer_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/core_rb.html +145 -0
- data/docs/rdoc/files/lib/evosynth/decoder/binary_to_real_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/decoder/gray_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/decoder_rb.html +131 -0
- data/docs/rdoc/files/lib/evosynth/evolvers/basic/genetic_algorithm_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/evolvers/basic/hillclimber_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/evolvers/basic/memetic_algorithm_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/evolvers/basic/population_hillclimber_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/evolvers/basic/steady_state_ga_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/evolvers/coevolutionary/balanced_coevolutionary_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/evolvers/coevolutionary/round_robin_coevolutionary_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/evolvers/elitism_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/evolvers/evolution_strategies/adaptive_es_rb.html +129 -0
- data/docs/rdoc/files/lib/evosynth/evolvers/evolution_strategies/derandomized_es_rb.html +129 -0
- data/docs/rdoc/files/lib/evosynth/evolvers/evolution_strategies/selfadaptive_es_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/evolvers/evolver_rb.html +131 -0
- data/docs/rdoc/files/lib/evosynth/evolvers/local_search/acceptance_great_deluge_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/evolvers/local_search/acceptance_hillclimber_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/evolvers/local_search/acceptance_record_to_record_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/evolvers/local_search/acceptance_simulated_annealing_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/evolvers/local_search/acceptance_threshold_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/evolvers/local_search/local_search_rb.html +137 -0
- data/docs/rdoc/files/lib/evosynth/evolvers/profile_using_evolver_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/evolvers/runnable_evolver_rb.html +129 -0
- data/docs/rdoc/files/lib/evosynth/evolvers_rb.html +153 -0
- data/docs/rdoc/files/lib/evosynth/operators/adjustments/adaptive_adjustment_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/operators/adjustments/predefined_adjustment_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/operators/adjustments_rb.html +131 -0
- data/docs/rdoc/files/lib/evosynth/operators/global_recombinations/global_arithmetic_crossover_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/operators/global_recombinations/global_uniform_crossover_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/operators/global_recombinations_rb.html +131 -0
- data/docs/rdoc/files/lib/evosynth/operators/meta_operators/conditional_combined_operator_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/operators/meta_operators/proportional_combined_operator_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/operators/meta_operators/sequential_combined_operator_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/operators/meta_operators_rb.html +133 -0
- data/docs/rdoc/files/lib/evosynth/operators/mutations/binary_mutation_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/operators/mutations/efficient_binary_mutation_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/operators/mutations/exchange_mutation_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/operators/mutations/flip_functions_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/operators/mutations/gauss_mutation_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/operators/mutations/identity_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/operators/mutations/inversion_mutation_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/operators/mutations/mixing_mutation_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/operators/mutations/one_gene_flipping_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/operators/mutations/self_adaptive_gauss_mutation_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/operators/mutations/shifting_mutation_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/operators/mutations/uniform_real_mutation_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/operators/mutations_rb.html +151 -0
- data/docs/rdoc/files/lib/evosynth/operators/recombinations/arithmetic_crossover_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/operators/recombinations/edge_recombination_rb.html +129 -0
- data/docs/rdoc/files/lib/evosynth/operators/recombinations/identity_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/operators/recombinations/k_point_crossover_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/operators/recombinations/one_point_crossover_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/operators/recombinations/ordered_recombination_rb.html +129 -0
- data/docs/rdoc/files/lib/evosynth/operators/recombinations/partially_mapped_crossover_rb.html +129 -0
- data/docs/rdoc/files/lib/evosynth/operators/recombinations/uniform_crossover_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/operators/recombinations_rb.html +143 -0
- data/docs/rdoc/files/lib/evosynth/operators/selections/best_selection_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/operators/selections/fitness_proportional_selection_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/operators/selections/identity_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/operators/selections/n_stage_tournament_selection_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/operators/selections/random_selection_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/operators/selections/roulette_wheel_selection_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/operators/selections/tournament_selection_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/operators/selections_rb.html +141 -0
- data/docs/rdoc/files/lib/evosynth/operators_rb.html +139 -0
- data/docs/rdoc/files/lib/evosynth/output/console_writer_rb.html +129 -0
- data/docs/rdoc/files/lib/evosynth/output/exporter/csv_exporter_rb.html +129 -0
- data/docs/rdoc/files/lib/evosynth/output/exporter/gnuplot_exporter_rb.html +131 -0
- data/docs/rdoc/files/lib/evosynth/output/exporter/gruff_exporter_rb.html +131 -0
- data/docs/rdoc/files/lib/evosynth/output/exporter_rb.html +133 -0
- data/docs/rdoc/files/lib/evosynth/output/factory_rb.html +129 -0
- data/docs/rdoc/files/lib/evosynth/output/logger_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/output_rb.html +135 -0
- data/docs/rdoc/files/lib/evosynth/problems/binary_benchmark_functions_rb.html +119 -0
- data/docs/rdoc/files/lib/evosynth/problems/float_benchmark_functions_rb.html +1630 -0
- data/docs/rdoc/files/lib/evosynth/problems/graph_colouring_rb.html +129 -0
- data/docs/rdoc/files/lib/evosynth/problems/tsp_rb.html +129 -0
- data/docs/rdoc/files/lib/evosynth/problems_rb.html +135 -0
- data/docs/rdoc/files/lib/evosynth_rb.html +139 -0
- data/docs/rdoc/fr_class_index.html +245 -0
- data/docs/rdoc/fr_file_index.html +233 -0
- data/docs/rdoc/fr_method_index.html +661 -0
- data/docs/rdoc/index.html +21 -0
- data/docs/rdoc/rdoc-style.css +299 -0
- data/examples/ants.rb +237 -0
- data/examples/ccga_example.rb +150 -0
- data/examples/cmb_example.rb +117 -0
- data/examples/evolution_strategies.rb +84 -0
- data/examples/exporter.rb +90 -0
- data/examples/graph_colouring.rb +72 -0
- data/examples/hacking.rb +62 -0
- data/examples/local_search.rb +109 -0
- data/examples/max_ones.rb +83 -0
- data/examples/partition.rb +172 -0
- data/examples/spk.rb +106 -0
- data/examples/tsp.rb +83 -0
- data/lib/evosynth.rb +32 -0
- data/lib/evosynth/core.rb +33 -0
- data/lib/evosynth/core/array_genome.rb +77 -0
- data/lib/evosynth/core/binary_genome.rb +156 -0
- data/lib/evosynth/core/evaluator.rb +109 -0
- data/lib/evosynth/core/individual.rb +92 -0
- data/lib/evosynth/core/maximizing_individual.rb +71 -0
- data/lib/evosynth/core/minimizing_individual.rb +71 -0
- data/lib/evosynth/core/population.rb +120 -0
- data/lib/evosynth/core/profile.rb +110 -0
- data/lib/evosynth/core/randomizer.rb +73 -0
- data/lib/evosynth/decoder.rb +33 -0
- data/lib/evosynth/decoder/binary_to_real.rb +57 -0
- data/lib/evosynth/decoder/gray.rb +54 -0
- data/lib/evosynth/evolvers.rb +41 -0
- data/lib/evosynth/evolvers/basic/genetic_algorithm.rb +92 -0
- data/lib/evosynth/evolvers/basic/hillclimber.rb +64 -0
- data/lib/evosynth/evolvers/basic/memetic_algorithm.rb +111 -0
- data/lib/evosynth/evolvers/basic/population_hillclimber.rb +69 -0
- data/lib/evosynth/evolvers/basic/steady_state_ga.rb +85 -0
- data/lib/evosynth/evolvers/coevolutionary/balanced_coevolutionary.rb +125 -0
- data/lib/evosynth/evolvers/coevolutionary/round_robin_coevolutionary.rb +87 -0
- data/lib/evosynth/evolvers/elitism.rb +108 -0
- data/lib/evosynth/evolvers/evolution_strategies/adaptive_es.rb +104 -0
- data/lib/evosynth/evolvers/evolution_strategies/derandomized_es.rb +120 -0
- data/lib/evosynth/evolvers/evolution_strategies/selfadaptive_es.rb +82 -0
- data/lib/evosynth/evolvers/evolver.rb +43 -0
- data/lib/evosynth/evolvers/local_search/acceptance_great_deluge.rb +60 -0
- data/lib/evosynth/evolvers/local_search/acceptance_hillclimber.rb +47 -0
- data/lib/evosynth/evolvers/local_search/acceptance_record_to_record.rb +69 -0
- data/lib/evosynth/evolvers/local_search/acceptance_simulated_annealing.rb +59 -0
- data/lib/evosynth/evolvers/local_search/acceptance_threshold.rb +60 -0
- data/lib/evosynth/evolvers/local_search/local_search.rb +74 -0
- data/lib/evosynth/evolvers/profile_using_evolver.rb +77 -0
- data/lib/evosynth/evolvers/runnable_evolver.rb +89 -0
- data/lib/evosynth/operators.rb +30 -0
- data/lib/evosynth/operators/adjustments.rb +26 -0
- data/lib/evosynth/operators/adjustments/adaptive_adjustment.rb +55 -0
- data/lib/evosynth/operators/adjustments/predefined_adjustment.rb +46 -0
- data/lib/evosynth/operators/global_recombinations.rb +26 -0
- data/lib/evosynth/operators/global_recombinations/global_arithmetic_crossover.rb +50 -0
- data/lib/evosynth/operators/global_recombinations/global_uniform_crossover.rb +49 -0
- data/lib/evosynth/operators/meta_operators.rb +36 -0
- data/lib/evosynth/operators/meta_operators/conditional_combined_operator.rb +65 -0
- data/lib/evosynth/operators/meta_operators/proportional_combined_operator.rb +84 -0
- data/lib/evosynth/operators/meta_operators/sequential_combined_operator.rb +73 -0
- data/lib/evosynth/operators/mutations.rb +47 -0
- data/lib/evosynth/operators/mutations/binary_mutation.rb +100 -0
- data/lib/evosynth/operators/mutations/efficient_binary_mutation.rb +105 -0
- data/lib/evosynth/operators/mutations/exchange_mutation.rb +107 -0
- data/lib/evosynth/operators/mutations/flip_functions.rb +45 -0
- data/lib/evosynth/operators/mutations/gauss_mutation.rb +65 -0
- data/lib/evosynth/operators/mutations/identity.rb +62 -0
- data/lib/evosynth/operators/mutations/inversion_mutation.rb +73 -0
- data/lib/evosynth/operators/mutations/mixing_mutation.rb +75 -0
- data/lib/evosynth/operators/mutations/one_gene_flipping.rb +89 -0
- data/lib/evosynth/operators/mutations/self_adaptive_gauss_mutation.rb +73 -0
- data/lib/evosynth/operators/mutations/shifting_mutation.rb +88 -0
- data/lib/evosynth/operators/mutations/uniform_real_mutation.rb +59 -0
- data/lib/evosynth/operators/recombinations.rb +48 -0
- data/lib/evosynth/operators/recombinations/arithmetic_crossover.rb +67 -0
- data/lib/evosynth/operators/recombinations/edge_recombination.rb +108 -0
- data/lib/evosynth/operators/recombinations/identity.rb +42 -0
- data/lib/evosynth/operators/recombinations/k_point_crossover.rb +81 -0
- data/lib/evosynth/operators/recombinations/one_point_crossover.rb +56 -0
- data/lib/evosynth/operators/recombinations/ordered_recombination.rb +75 -0
- data/lib/evosynth/operators/recombinations/partially_mapped_crossover.rb +102 -0
- data/lib/evosynth/operators/recombinations/uniform_crossover.rb +54 -0
- data/lib/evosynth/operators/selections.rb +31 -0
- data/lib/evosynth/operators/selections/best_selection.rb +54 -0
- data/lib/evosynth/operators/selections/fitness_proportional_selection.rb +83 -0
- data/lib/evosynth/operators/selections/identity.rb +48 -0
- data/lib/evosynth/operators/selections/n_stage_tournament_selection.rb +84 -0
- data/lib/evosynth/operators/selections/random_selection.rb +44 -0
- data/lib/evosynth/operators/selections/roulette_wheel_selection.rb +54 -0
- data/lib/evosynth/operators/selections/tournament_selection.rb +71 -0
- data/lib/evosynth/output.rb +28 -0
- data/lib/evosynth/output/console_writer.rb +45 -0
- data/lib/evosynth/output/exporter.rb +27 -0
- data/lib/evosynth/output/exporter/csv_exporter.rb +62 -0
- data/lib/evosynth/output/exporter/gnuplot_exporter.rb +81 -0
- data/lib/evosynth/output/exporter/gruff_exporter.rb +70 -0
- data/lib/evosynth/output/factory.rb +38 -0
- data/lib/evosynth/output/logger.rb +83 -0
- data/lib/evosynth/problems.rb +37 -0
- data/lib/evosynth/problems/binary_benchmark_functions.rb +74 -0
- data/lib/evosynth/problems/float_benchmark_functions.rb +99 -0
- data/lib/evosynth/problems/graph_colouring.rb +89 -0
- data/lib/evosynth/problems/tsp.rb +88 -0
- data/test/benchmark/decoder_benchmark.rb +75 -0
- data/test/benchmark/mutation_benchmark.rb +88 -0
- data/test/benchmark/recombination_benchmark.rb +58 -0
- data/test/benchmark/selection_benchmark.rb +52 -0
- data/test/core/tc_array_genome.rb +154 -0
- data/test/core/tc_binary_genome.rb +160 -0
- data/test/core/tc_population.rb +154 -0
- data/test/core/tc_profile.rb +75 -0
- data/test/core/tc_randomizer.rb +165 -0
- data/test/coverage.rb +43 -0
- data/test/decoder/tc_binary_to_real.rb +52 -0
- data/test/decoder/tc_gray.rb +107 -0
- data/test/operators/adjustments/tc_adaptive_adjustment.rb +63 -0
- data/test/operators/adjustments/tc_predefined_adjustment.rb +49 -0
- data/test/operators/global_recombinations/tc_global_arithmetic_crossover.rb +78 -0
- data/test/operators/global_recombinations/tc_global_uniform_crossover.rb +90 -0
- data/test/operators/meta_operators/tc_conditional_combined_operator.rb +66 -0
- data/test/operators/meta_operators/tc_proportional_combined_operator.rb +167 -0
- data/test/operators/meta_operators/tc_sequential_combined_operator.rb +98 -0
- data/test/operators/mutations/tc_binary_mutation.rb +73 -0
- data/test/operators/mutations/tc_efficient_binary_mutation.rb +73 -0
- data/test/operators/mutations/tc_exchange_mutation.rb +127 -0
- data/test/operators/mutations/tc_gauss_mutation.rb +130 -0
- data/test/operators/mutations/tc_identity_mutation.rb +64 -0
- data/test/operators/mutations/tc_inversion_mutation.rb +70 -0
- data/test/operators/mutations/tc_mixing_mutation.rb +73 -0
- data/test/operators/mutations/tc_one_gene_flipping.rb +109 -0
- data/test/operators/mutations/tc_self_adaptive_gauss_mutation.rb +72 -0
- data/test/operators/mutations/tc_shifting_muation.rb +73 -0
- data/test/operators/mutations/tc_uniform_real_mutation.rb +65 -0
- data/test/operators/recombinations/tc_arithmetic_crossover.rb +79 -0
- data/test/operators/recombinations/tc_edge_recombination.rb +76 -0
- data/test/operators/recombinations/tc_identity_recombination.rb +81 -0
- data/test/operators/recombinations/tc_k_point_crossover.rb +81 -0
- data/test/operators/recombinations/tc_one_point_crossover.rb +80 -0
- data/test/operators/recombinations/tc_ordered_recombination.rb +76 -0
- data/test/operators/recombinations/tc_partially_mapped_crossover.rb +91 -0
- data/test/operators/recombinations/tc_uniform_crossover.rb +84 -0
- data/test/operators/selections/tc_best_selection.rb +85 -0
- data/test/operators/selections/tc_fitness_proportional_selection.rb +78 -0
- data/test/operators/selections/tc_identity.rb +91 -0
- data/test/operators/selections/tc_n_stage_tournament.rb +78 -0
- data/test/operators/selections/tc_random_selection.rb +70 -0
- data/test/operators/selections/tc_roulette_wheel_selection.rb +78 -0
- data/test/operators/selections/tc_tournament_selection.rb +83 -0
- data/test/problems/tc_binary_benchmark_functions.rb +126 -0
- data/test/problems/tc_float_benchmark_functions.rb +100 -0
- data/test/test_util/test_helper.rb +128 -0
- data/test/ts_adjustments.rb +26 -0
- data/test/ts_core.rb +29 -0
- data/test/ts_decoder.rb +26 -0
- data/test/ts_global_recombinations.rb +26 -0
- data/test/ts_meta_operators.rb +27 -0
- data/test/ts_mutations.rb +35 -0
- data/test/ts_problems.rb +26 -0
- data/test/ts_recombinations.rb +32 -0
- data/test/ts_selections.rb +31 -0
- data/testdata/README +4 -0
- data/testdata/bays29.tsp +68 -0
- data/testdata/myciel4.col +77 -0
- metadata +552 -0
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
4
|
+
<head>
|
|
5
|
+
<title>Module: EvoSynth::Decoder [EvoSynth Documentation]</title>
|
|
6
|
+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
|
7
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
|
8
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
9
|
+
<script type="text/javascript">
|
|
10
|
+
// <![CDATA[
|
|
11
|
+
|
|
12
|
+
function popupCode( url ) {
|
|
13
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function toggleCode( id ) {
|
|
17
|
+
if ( document.getElementById )
|
|
18
|
+
elem = document.getElementById( id );
|
|
19
|
+
else if ( document.all )
|
|
20
|
+
elem = eval( "document.all." + id );
|
|
21
|
+
else
|
|
22
|
+
return false;
|
|
23
|
+
|
|
24
|
+
elemStyle = elem.style;
|
|
25
|
+
|
|
26
|
+
if ( elemStyle.display != "block" ) {
|
|
27
|
+
elemStyle.display = "block"
|
|
28
|
+
} else {
|
|
29
|
+
elemStyle.display = "none"
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Make codeblocks hidden by default
|
|
36
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }<\/style>" )
|
|
37
|
+
|
|
38
|
+
// ]]>
|
|
39
|
+
</script>
|
|
40
|
+
|
|
41
|
+
</head>
|
|
42
|
+
<body>
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
<div id="classHeader">
|
|
46
|
+
<table class="header-table">
|
|
47
|
+
<tr class="top-aligned-row">
|
|
48
|
+
<td><strong>Module</strong></td>
|
|
49
|
+
<td class="class-name-in-header">EvoSynth::Decoder</td>
|
|
50
|
+
</tr>
|
|
51
|
+
<tr class="top-aligned-row">
|
|
52
|
+
<td><strong>In:</strong></td>
|
|
53
|
+
<td>
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
<a href="../../files/lib/evosynth/decoder_rb.html">
|
|
57
|
+
|
|
58
|
+
lib/evosynth/decoder.rb
|
|
59
|
+
|
|
60
|
+
</a>
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
<br />
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
<a href="../../files/lib/evosynth/decoder/binary_to_real_rb.html">
|
|
67
|
+
|
|
68
|
+
lib/evosynth/decoder/binary_to_real.rb
|
|
69
|
+
|
|
70
|
+
</a>
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
<br />
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
<a href="../../files/lib/evosynth/decoder/gray_rb.html">
|
|
77
|
+
|
|
78
|
+
lib/evosynth/decoder/gray.rb
|
|
79
|
+
|
|
80
|
+
</a>
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
<br />
|
|
84
|
+
|
|
85
|
+
</td>
|
|
86
|
+
</tr>
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
</table>
|
|
90
|
+
</div>
|
|
91
|
+
<!-- banner header -->
|
|
92
|
+
|
|
93
|
+
<div id="bodyContent">
|
|
94
|
+
|
|
95
|
+
<div id="contextContent">
|
|
96
|
+
|
|
97
|
+
<div id="description">
|
|
98
|
+
<p>
|
|
99
|
+
This module contains all genome decoders (genotype <-> phenotype
|
|
100
|
+
conversion).
|
|
101
|
+
</p>
|
|
102
|
+
|
|
103
|
+
</div>
|
|
104
|
+
|
|
105
|
+
</div>
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
<div id="method-list">
|
|
109
|
+
<h3 class="section-bar">Methods</h3>
|
|
110
|
+
|
|
111
|
+
<div class="name-list">
|
|
112
|
+
|
|
113
|
+
<a href="#M000123">binary_to_gray</a>
|
|
114
|
+
|
|
115
|
+
<a href="#M000121">binary_to_real</a>
|
|
116
|
+
|
|
117
|
+
<a href="#M000122">gray_to_binary</a>
|
|
118
|
+
|
|
119
|
+
</div>
|
|
120
|
+
</div>
|
|
121
|
+
|
|
122
|
+
</div>
|
|
123
|
+
|
|
124
|
+
<!-- if includes -->
|
|
125
|
+
|
|
126
|
+
<div id="section">
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
<!-- if method_list -->
|
|
132
|
+
|
|
133
|
+
<div id="methods">
|
|
134
|
+
|
|
135
|
+
<h3 class="section-bar">Public Class methods</h3>
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
<div id="method-M000123" class="method-detail">
|
|
139
|
+
<a name="M000123"></a>
|
|
140
|
+
|
|
141
|
+
<div class="method-heading">
|
|
142
|
+
|
|
143
|
+
<a href="#M000123" class="method-signature">
|
|
144
|
+
|
|
145
|
+
<span class="method-name">binary_to_gray</span><span class="method-args">(binary)</span>
|
|
146
|
+
|
|
147
|
+
</a>
|
|
148
|
+
|
|
149
|
+
</div>
|
|
150
|
+
|
|
151
|
+
<div class="method-description">
|
|
152
|
+
|
|
153
|
+
<p>
|
|
154
|
+
Converts a standard binary bitstring (either 1/0 or true/false) into a gray
|
|
155
|
+
code bitstring.
|
|
156
|
+
</p>
|
|
157
|
+
|
|
158
|
+
<p><a class="source-toggle" href="#"
|
|
159
|
+
onclick="toggleCode('M000123-source');return false;">[Source]</a></p>
|
|
160
|
+
<div class="method-source-code" id="M000123-source">
|
|
161
|
+
<pre>
|
|
162
|
+
<span class="ruby-comment cmt"># File lib/evosynth/decoder/gray.rb, line 42</span>
|
|
163
|
+
42: <span class="ruby-keyword kw">def</span> <span class="ruby-constant">Decoder</span>.<span class="ruby-identifier">binary_to_gray</span>(<span class="ruby-identifier">binary</span>)
|
|
164
|
+
43: <span class="ruby-identifier">gray</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">binary</span>)
|
|
165
|
+
44:
|
|
166
|
+
45: <span class="ruby-identifier">popped</span> = <span class="ruby-identifier">gray</span>.<span class="ruby-identifier">pop</span>
|
|
167
|
+
46: <span class="ruby-identifier">gray</span>.<span class="ruby-identifier">unshift</span>(<span class="ruby-identifier">popped</span> <span class="ruby-operator">^</span> <span class="ruby-identifier">popped</span>)
|
|
168
|
+
47: <span class="ruby-identifier">gray</span>.<span class="ruby-identifier">each_index</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">index</span><span class="ruby-operator">|</span> <span class="ruby-identifier">gray</span>[<span class="ruby-identifier">index</span>] = <span class="ruby-identifier">binary</span>[<span class="ruby-identifier">index</span>] <span class="ruby-operator">^</span> <span class="ruby-identifier">gray</span>[<span class="ruby-identifier">index</span>]}
|
|
169
|
+
48:
|
|
170
|
+
49: <span class="ruby-identifier">gray</span>
|
|
171
|
+
50: <span class="ruby-keyword kw">end</span>
|
|
172
|
+
</pre>
|
|
173
|
+
</div>
|
|
174
|
+
|
|
175
|
+
</div>
|
|
176
|
+
</div>
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
<div id="method-M000121" class="method-detail">
|
|
180
|
+
<a name="M000121"></a>
|
|
181
|
+
|
|
182
|
+
<div class="method-heading">
|
|
183
|
+
|
|
184
|
+
<a href="#M000121" class="method-signature">
|
|
185
|
+
|
|
186
|
+
<span class="method-name">Decoder.binary_to_real([1,1,0,1]) → Float (between -1.0 and 1.0)<br />
|
|
187
|
+
Decoder.binary_to_real([1,1,0,1], 0.0) → Float (between 0.0 and 1.0)<br />
|
|
188
|
+
Decoder.binary_to_real([1,1,0,1], -5.12, 5.12) → Float (between -5.12 and 5.12)<br />
|
|
189
|
+
</span>
|
|
190
|
+
|
|
191
|
+
</a>
|
|
192
|
+
|
|
193
|
+
</div>
|
|
194
|
+
|
|
195
|
+
<div class="method-description">
|
|
196
|
+
|
|
197
|
+
<p>
|
|
198
|
+
This converts a given array of binary values (either 1/0 or true/false)
|
|
199
|
+
into a Float in a given range.
|
|
200
|
+
</p>
|
|
201
|
+
|
|
202
|
+
<p><a class="source-toggle" href="#"
|
|
203
|
+
onclick="toggleCode('M000121-source');return false;">[Source]</a></p>
|
|
204
|
+
<div class="method-source-code" id="M000121-source">
|
|
205
|
+
<pre>
|
|
206
|
+
<span class="ruby-comment cmt"># File lib/evosynth/decoder/binary_to_real.rb, line 36</span>
|
|
207
|
+
36: <span class="ruby-keyword kw">def</span> <span class="ruby-constant">Decoder</span>.<span class="ruby-identifier">binary_to_real</span>(<span class="ruby-identifier">binary</span>, <span class="ruby-identifier">min_bound</span> = <span class="ruby-value">-1.0</span>, <span class="ruby-identifier">max_bound</span> = <span class="ruby-value">1.0</span>)
|
|
208
|
+
37: <span class="ruby-identifier">binary</span> = <span class="ruby-identifier">binary</span>.<span class="ruby-identifier">map</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">bin</span><span class="ruby-operator">|</span>
|
|
209
|
+
38: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">bin</span>
|
|
210
|
+
39: <span class="ruby-keyword kw">when</span> <span class="ruby-keyword kw">false</span> <span class="ruby-keyword kw">then</span> <span class="ruby-value">0</span>
|
|
211
|
+
40: <span class="ruby-keyword kw">when</span> <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">then</span> <span class="ruby-value">1</span>
|
|
212
|
+
41: <span class="ruby-keyword kw">else</span> <span class="ruby-identifier">bin</span>
|
|
213
|
+
42: <span class="ruby-keyword kw">end</span>
|
|
214
|
+
43: <span class="ruby-keyword kw">end</span>
|
|
215
|
+
44:
|
|
216
|
+
45: <span class="ruby-identifier">max_bound</span>, <span class="ruby-identifier">min_bound</span> = <span class="ruby-identifier">min_bound</span>, <span class="ruby-identifier">max_bound</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">min_bound</span> <span class="ruby-operator">></span> <span class="ruby-identifier">max_bound</span>
|
|
217
|
+
46:
|
|
218
|
+
47: <span class="ruby-identifier">range_size</span> = <span class="ruby-identifier">max_bound</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">min_bound</span>.<span class="ruby-identifier">to_f</span>
|
|
219
|
+
48: <span class="ruby-identifier">integer</span> = <span class="ruby-constant">Integer</span>(<span class="ruby-node">"0b#{binary.join}"</span>)
|
|
220
|
+
49: <span class="ruby-identifier">max_integer</span> = <span class="ruby-constant">Integer</span>(<span class="ruby-value str">"0b"</span> <span class="ruby-operator">+</span> (<span class="ruby-value str">"1"</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">binary</span>.<span class="ruby-identifier">size</span>))
|
|
221
|
+
50:
|
|
222
|
+
51: <span class="ruby-identifier">float</span> = <span class="ruby-identifier">integer</span> <span class="ruby-operator">*</span> (<span class="ruby-identifier">range_size</span> <span class="ruby-operator">/</span> <span class="ruby-identifier">max_integer</span>) <span class="ruby-operator">+</span> <span class="ruby-identifier">min_bound</span>;
|
|
223
|
+
52: <span class="ruby-identifier">float</span>
|
|
224
|
+
53: <span class="ruby-keyword kw">end</span>
|
|
225
|
+
</pre>
|
|
226
|
+
</div>
|
|
227
|
+
|
|
228
|
+
</div>
|
|
229
|
+
</div>
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
<div id="method-M000122" class="method-detail">
|
|
233
|
+
<a name="M000122"></a>
|
|
234
|
+
|
|
235
|
+
<div class="method-heading">
|
|
236
|
+
|
|
237
|
+
<a href="#M000122" class="method-signature">
|
|
238
|
+
|
|
239
|
+
<span class="method-name">gray_to_binary</span><span class="method-args">(gray)</span>
|
|
240
|
+
|
|
241
|
+
</a>
|
|
242
|
+
|
|
243
|
+
</div>
|
|
244
|
+
|
|
245
|
+
<div class="method-description">
|
|
246
|
+
|
|
247
|
+
<p>
|
|
248
|
+
Converts a binary gray code bitstring (either 1/0 or true/false) into a
|
|
249
|
+
standard binary bitstring.
|
|
250
|
+
</p>
|
|
251
|
+
|
|
252
|
+
<p><a class="source-toggle" href="#"
|
|
253
|
+
onclick="toggleCode('M000122-source');return false;">[Source]</a></p>
|
|
254
|
+
<div class="method-source-code" id="M000122-source">
|
|
255
|
+
<pre>
|
|
256
|
+
<span class="ruby-comment cmt"># File lib/evosynth/decoder/gray.rb, line 30</span>
|
|
257
|
+
30: <span class="ruby-keyword kw">def</span> <span class="ruby-constant">Decoder</span>.<span class="ruby-identifier">gray_to_binary</span>(<span class="ruby-identifier">gray</span>)
|
|
258
|
+
31: <span class="ruby-identifier">rev_stdbin</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">gray</span>.<span class="ruby-identifier">size</span>)
|
|
259
|
+
32: <span class="ruby-identifier">gray</span>.<span class="ruby-identifier">reverse!</span>
|
|
260
|
+
33:
|
|
261
|
+
34: <span class="ruby-identifier">rev_stdbin</span>[<span class="ruby-identifier">gray</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>] = <span class="ruby-identifier">gray</span>[<span class="ruby-identifier">gray</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>]
|
|
262
|
+
35: (<span class="ruby-identifier">gray</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">-</span> <span class="ruby-value">2</span>).<span class="ruby-identifier">downto</span>(<span class="ruby-value">0</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">index</span><span class="ruby-operator">|</span> <span class="ruby-identifier">rev_stdbin</span>[<span class="ruby-identifier">index</span>] = <span class="ruby-identifier">rev_stdbin</span>[<span class="ruby-identifier">index</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>] <span class="ruby-operator">^</span> <span class="ruby-identifier">gray</span>[<span class="ruby-identifier">index</span>] }
|
|
263
|
+
36:
|
|
264
|
+
37: <span class="ruby-identifier">rev_stdbin</span>.<span class="ruby-identifier">reverse</span>
|
|
265
|
+
38: <span class="ruby-keyword kw">end</span>
|
|
266
|
+
</pre>
|
|
267
|
+
</div>
|
|
268
|
+
|
|
269
|
+
</div>
|
|
270
|
+
</div>
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
</div>
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
</div>
|
|
280
|
+
|
|
281
|
+
<div id="validator-badges">
|
|
282
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
283
|
+
</div>
|
|
284
|
+
|
|
285
|
+
</body>
|
|
286
|
+
</html>
|
|
@@ -0,0 +1,466 @@
|
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
4
|
+
<head>
|
|
5
|
+
<title>Class: EvoSynth::Evaluator [EvoSynth Documentation]</title>
|
|
6
|
+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
|
7
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
|
8
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
9
|
+
<script type="text/javascript">
|
|
10
|
+
// <![CDATA[
|
|
11
|
+
|
|
12
|
+
function popupCode( url ) {
|
|
13
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function toggleCode( id ) {
|
|
17
|
+
if ( document.getElementById )
|
|
18
|
+
elem = document.getElementById( id );
|
|
19
|
+
else if ( document.all )
|
|
20
|
+
elem = eval( "document.all." + id );
|
|
21
|
+
else
|
|
22
|
+
return false;
|
|
23
|
+
|
|
24
|
+
elemStyle = elem.style;
|
|
25
|
+
|
|
26
|
+
if ( elemStyle.display != "block" ) {
|
|
27
|
+
elemStyle.display = "block"
|
|
28
|
+
} else {
|
|
29
|
+
elemStyle.display = "none"
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Make codeblocks hidden by default
|
|
36
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }<\/style>" )
|
|
37
|
+
|
|
38
|
+
// ]]>
|
|
39
|
+
</script>
|
|
40
|
+
|
|
41
|
+
</head>
|
|
42
|
+
<body>
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
<div id="classHeader">
|
|
46
|
+
<table class="header-table">
|
|
47
|
+
<tr class="top-aligned-row">
|
|
48
|
+
<td><strong>Class</strong></td>
|
|
49
|
+
<td class="class-name-in-header">EvoSynth::Evaluator</td>
|
|
50
|
+
</tr>
|
|
51
|
+
<tr class="top-aligned-row">
|
|
52
|
+
<td><strong>In:</strong></td>
|
|
53
|
+
<td>
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
<a href="../../files/lib/evosynth/core/evaluator_rb.html">
|
|
57
|
+
|
|
58
|
+
lib/evosynth/core/evaluator.rb
|
|
59
|
+
|
|
60
|
+
</a>
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
<br />
|
|
64
|
+
|
|
65
|
+
</td>
|
|
66
|
+
</tr>
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
<tr class="top-aligned-row">
|
|
70
|
+
<td><strong>Parent:</strong></td>
|
|
71
|
+
<td>
|
|
72
|
+
|
|
73
|
+
Object
|
|
74
|
+
|
|
75
|
+
</td>
|
|
76
|
+
</tr>
|
|
77
|
+
|
|
78
|
+
</table>
|
|
79
|
+
</div>
|
|
80
|
+
<!-- banner header -->
|
|
81
|
+
|
|
82
|
+
<div id="bodyContent">
|
|
83
|
+
|
|
84
|
+
<div id="contextContent">
|
|
85
|
+
|
|
86
|
+
<div id="description">
|
|
87
|
+
<p>
|
|
88
|
+
Baseclass for all fitness evaluators. It also counts how often it was used
|
|
89
|
+
to calculate the fitness of a given individual and how often it actually
|
|
90
|
+
calculated the fitness.
|
|
91
|
+
</p>
|
|
92
|
+
<p>
|
|
93
|
+
For simple problems you just need to overwrite <a
|
|
94
|
+
href="Evaluator.html#M000226">calculate_fitness</a>(individual)
|
|
95
|
+
</p>
|
|
96
|
+
<p>
|
|
97
|
+
Obervers get notified each time <a
|
|
98
|
+
href="Evaluator.html#M000224">calculate_and_set_fitness</a>(individual)
|
|
99
|
+
gets called, not on actual calculations
|
|
100
|
+
</p>
|
|
101
|
+
|
|
102
|
+
</div>
|
|
103
|
+
|
|
104
|
+
</div>
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
<div id="method-list">
|
|
108
|
+
<h3 class="section-bar">Methods</h3>
|
|
109
|
+
|
|
110
|
+
<div class="name-list">
|
|
111
|
+
|
|
112
|
+
<a href="#M000224">calculate_and_set_fitness</a>
|
|
113
|
+
|
|
114
|
+
<a href="#M000225">calculate_and_set_initial_fitness</a>
|
|
115
|
+
|
|
116
|
+
<a href="#M000226">calculate_fitness</a>
|
|
117
|
+
|
|
118
|
+
<a href="#M000227">calculate_initial_fitness</a>
|
|
119
|
+
|
|
120
|
+
<a href="#M000223">new</a>
|
|
121
|
+
|
|
122
|
+
<a href="#M000228">reset_counters</a>
|
|
123
|
+
|
|
124
|
+
<a href="#M000229">to_s</a>
|
|
125
|
+
|
|
126
|
+
</div>
|
|
127
|
+
</div>
|
|
128
|
+
|
|
129
|
+
</div>
|
|
130
|
+
|
|
131
|
+
<!-- if includes -->
|
|
132
|
+
|
|
133
|
+
<div id="includes">
|
|
134
|
+
<h3 class="section-bar">Included Modules</h3>
|
|
135
|
+
|
|
136
|
+
<div id="includes-list">
|
|
137
|
+
|
|
138
|
+
<span class="include-name">Observable</span>
|
|
139
|
+
|
|
140
|
+
</div>
|
|
141
|
+
</div>
|
|
142
|
+
|
|
143
|
+
<div id="section">
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
<div id="attribute-list">
|
|
148
|
+
<h3 class="section-bar">Attributes</h3>
|
|
149
|
+
|
|
150
|
+
<div class="name-list">
|
|
151
|
+
<table>
|
|
152
|
+
|
|
153
|
+
<tr class="top-aligned-row context-row">
|
|
154
|
+
<td class="context-item-name">calculated</td>
|
|
155
|
+
|
|
156
|
+
<td class="context-item-value"> [R] </td>
|
|
157
|
+
|
|
158
|
+
<td class="context-item-desc">
|
|
159
|
+
How often did the <a href="Evaluator.html">Evaluator</a> actually calculate
|
|
160
|
+
a fitness value
|
|
161
|
+
|
|
162
|
+
</td>
|
|
163
|
+
</tr>
|
|
164
|
+
|
|
165
|
+
<tr class="top-aligned-row context-row">
|
|
166
|
+
<td class="context-item-name">called</td>
|
|
167
|
+
|
|
168
|
+
<td class="context-item-value"> [R] </td>
|
|
169
|
+
|
|
170
|
+
<td class="context-item-desc">
|
|
171
|
+
How often did the <a href="Evaluator.html">Evaluator</a> return a fitness
|
|
172
|
+
value
|
|
173
|
+
|
|
174
|
+
</td>
|
|
175
|
+
</tr>
|
|
176
|
+
|
|
177
|
+
</table>
|
|
178
|
+
</div>
|
|
179
|
+
</div>
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
<!-- if method_list -->
|
|
183
|
+
|
|
184
|
+
<div id="methods">
|
|
185
|
+
|
|
186
|
+
<h3 class="section-bar">Public Class methods</h3>
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
<div id="method-M000223" class="method-detail">
|
|
190
|
+
<a name="M000223"></a>
|
|
191
|
+
|
|
192
|
+
<div class="method-heading">
|
|
193
|
+
|
|
194
|
+
<a href="#M000223" class="method-signature">
|
|
195
|
+
|
|
196
|
+
<span class="method-name">new</span><span class="method-args">()</span>
|
|
197
|
+
|
|
198
|
+
</a>
|
|
199
|
+
|
|
200
|
+
</div>
|
|
201
|
+
|
|
202
|
+
<div class="method-description">
|
|
203
|
+
|
|
204
|
+
<p>
|
|
205
|
+
Returns a new <a href="Evaluator.html">Evaluator</a> object
|
|
206
|
+
</p>
|
|
207
|
+
|
|
208
|
+
<p><a class="source-toggle" href="#"
|
|
209
|
+
onclick="toggleCode('M000223-source');return false;">[Source]</a></p>
|
|
210
|
+
<div class="method-source-code" id="M000223-source">
|
|
211
|
+
<pre>
|
|
212
|
+
<span class="ruby-comment cmt"># File lib/evosynth/core/evaluator.rb, line 50</span>
|
|
213
|
+
50: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>
|
|
214
|
+
51: <span class="ruby-identifier">reset_counters</span>
|
|
215
|
+
52: <span class="ruby-keyword kw">end</span>
|
|
216
|
+
</pre>
|
|
217
|
+
</div>
|
|
218
|
+
|
|
219
|
+
</div>
|
|
220
|
+
</div>
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
<div id="method-M000224" class="method-detail">
|
|
227
|
+
<a name="M000224"></a>
|
|
228
|
+
|
|
229
|
+
<div class="method-heading">
|
|
230
|
+
|
|
231
|
+
<a href="#M000224" class="method-signature">
|
|
232
|
+
|
|
233
|
+
<span class="method-name">calculate_and_set_fitness</span><span class="method-args">(individual)</span>
|
|
234
|
+
|
|
235
|
+
</a>
|
|
236
|
+
|
|
237
|
+
</div>
|
|
238
|
+
|
|
239
|
+
<div class="method-description">
|
|
240
|
+
|
|
241
|
+
<p>
|
|
242
|
+
Calculates and sets the fitness of the given individual if the individual
|
|
243
|
+
has changed, otherwise it just returns the cached fitness of the individual
|
|
244
|
+
</p>
|
|
245
|
+
|
|
246
|
+
<p><a class="source-toggle" href="#"
|
|
247
|
+
onclick="toggleCode('M000224-source');return false;">[Source]</a></p>
|
|
248
|
+
<div class="method-source-code" id="M000224-source">
|
|
249
|
+
<pre>
|
|
250
|
+
<span class="ruby-comment cmt"># File lib/evosynth/core/evaluator.rb, line 57</span>
|
|
251
|
+
57: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">calculate_and_set_fitness</span>(<span class="ruby-identifier">individual</span>)
|
|
252
|
+
58: <span class="ruby-ivar">@called</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
|
253
|
+
59:
|
|
254
|
+
60: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">individual</span>.<span class="ruby-identifier">changed?</span>
|
|
255
|
+
61: <span class="ruby-ivar">@calculated</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
|
256
|
+
62: <span class="ruby-identifier">individual</span>.<span class="ruby-identifier">fitness</span> = <span class="ruby-identifier">calculate_fitness</span>(<span class="ruby-identifier">individual</span>)
|
|
257
|
+
63: <span class="ruby-keyword kw">end</span>
|
|
258
|
+
64:
|
|
259
|
+
65: <span class="ruby-identifier">changed</span>
|
|
260
|
+
66: <span class="ruby-identifier">notify_observers</span> <span class="ruby-keyword kw">self</span>, <span class="ruby-ivar">@called</span>
|
|
261
|
+
67: <span class="ruby-identifier">individual</span>.<span class="ruby-identifier">fitness</span>
|
|
262
|
+
68: <span class="ruby-keyword kw">end</span>
|
|
263
|
+
</pre>
|
|
264
|
+
</div>
|
|
265
|
+
|
|
266
|
+
</div>
|
|
267
|
+
</div>
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
<div id="method-M000225" class="method-detail">
|
|
271
|
+
<a name="M000225"></a>
|
|
272
|
+
|
|
273
|
+
<div class="method-heading">
|
|
274
|
+
|
|
275
|
+
<a href="#M000225" class="method-signature">
|
|
276
|
+
|
|
277
|
+
<span class="method-name">calculate_and_set_initial_fitness</span><span class="method-args">(individual)</span>
|
|
278
|
+
|
|
279
|
+
</a>
|
|
280
|
+
|
|
281
|
+
</div>
|
|
282
|
+
|
|
283
|
+
<div class="method-description">
|
|
284
|
+
|
|
285
|
+
<p>
|
|
286
|
+
Calculates and sets the initial fitness of the given individual.
|
|
287
|
+
</p>
|
|
288
|
+
|
|
289
|
+
<p><a class="source-toggle" href="#"
|
|
290
|
+
onclick="toggleCode('M000225-source');return false;">[Source]</a></p>
|
|
291
|
+
<div class="method-source-code" id="M000225-source">
|
|
292
|
+
<pre>
|
|
293
|
+
<span class="ruby-comment cmt"># File lib/evosynth/core/evaluator.rb, line 72</span>
|
|
294
|
+
72: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">calculate_and_set_initial_fitness</span>(<span class="ruby-identifier">individual</span>)
|
|
295
|
+
73: <span class="ruby-ivar">@called</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
|
296
|
+
74: <span class="ruby-ivar">@calculated</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
|
297
|
+
75:
|
|
298
|
+
76: <span class="ruby-identifier">individual</span>.<span class="ruby-identifier">fitness</span> = <span class="ruby-identifier">calculate_initial_fitness</span>(<span class="ruby-identifier">individual</span>)
|
|
299
|
+
77:
|
|
300
|
+
78: <span class="ruby-identifier">changed</span>
|
|
301
|
+
79: <span class="ruby-identifier">notify_observers</span> <span class="ruby-keyword kw">self</span>, <span class="ruby-ivar">@called</span>
|
|
302
|
+
80: <span class="ruby-identifier">individual</span>.<span class="ruby-identifier">fitness</span>
|
|
303
|
+
81: <span class="ruby-keyword kw">end</span>
|
|
304
|
+
</pre>
|
|
305
|
+
</div>
|
|
306
|
+
|
|
307
|
+
</div>
|
|
308
|
+
</div>
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
<div id="method-M000226" class="method-detail">
|
|
312
|
+
<a name="M000226"></a>
|
|
313
|
+
|
|
314
|
+
<div class="method-heading">
|
|
315
|
+
|
|
316
|
+
<a href="#M000226" class="method-signature">
|
|
317
|
+
|
|
318
|
+
<span class="method-name">calculate_fitness</span><span class="method-args">(individual)</span>
|
|
319
|
+
|
|
320
|
+
</a>
|
|
321
|
+
|
|
322
|
+
</div>
|
|
323
|
+
|
|
324
|
+
<div class="method-description">
|
|
325
|
+
|
|
326
|
+
<p>
|
|
327
|
+
This function is actually used to calculate the fitness of a individual.
|
|
328
|
+
It’s the “fitness function”.
|
|
329
|
+
</p>
|
|
330
|
+
|
|
331
|
+
<p><a class="source-toggle" href="#"
|
|
332
|
+
onclick="toggleCode('M000226-source');return false;">[Source]</a></p>
|
|
333
|
+
<div class="method-source-code" id="M000226-source">
|
|
334
|
+
<pre>
|
|
335
|
+
<span class="ruby-comment cmt"># File lib/evosynth/core/evaluator.rb, line 85</span>
|
|
336
|
+
85: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">calculate_fitness</span>(<span class="ruby-identifier">individual</span>)
|
|
337
|
+
86: <span class="ruby-identifier">raise</span> <span class="ruby-constant">NotImplementedError</span>, <span class="ruby-value str">"please implement calculate_fitness!"</span>
|
|
338
|
+
87: <span class="ruby-keyword kw">end</span>
|
|
339
|
+
</pre>
|
|
340
|
+
</div>
|
|
341
|
+
|
|
342
|
+
</div>
|
|
343
|
+
</div>
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
<div id="method-M000227" class="method-detail">
|
|
347
|
+
<a name="M000227"></a>
|
|
348
|
+
|
|
349
|
+
<div class="method-heading">
|
|
350
|
+
|
|
351
|
+
<a href="#M000227" class="method-signature">
|
|
352
|
+
|
|
353
|
+
<span class="method-name">calculate_initial_fitness</span><span class="method-args">(individual)</span>
|
|
354
|
+
|
|
355
|
+
</a>
|
|
356
|
+
|
|
357
|
+
</div>
|
|
358
|
+
|
|
359
|
+
<div class="method-description">
|
|
360
|
+
|
|
361
|
+
<p>
|
|
362
|
+
This function is used to calculate an intitial fitness value for a
|
|
363
|
+
individual. Calls <a href="Evaluator.html#M000226">calculate_fitness</a> by
|
|
364
|
+
default.
|
|
365
|
+
</p>
|
|
366
|
+
|
|
367
|
+
<p><a class="source-toggle" href="#"
|
|
368
|
+
onclick="toggleCode('M000227-source');return false;">[Source]</a></p>
|
|
369
|
+
<div class="method-source-code" id="M000227-source">
|
|
370
|
+
<pre>
|
|
371
|
+
<span class="ruby-comment cmt"># File lib/evosynth/core/evaluator.rb, line 91</span>
|
|
372
|
+
91: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">calculate_initial_fitness</span>(<span class="ruby-identifier">individual</span>)
|
|
373
|
+
92: <span class="ruby-identifier">calculate_fitness</span>(<span class="ruby-identifier">individual</span>)
|
|
374
|
+
93: <span class="ruby-keyword kw">end</span>
|
|
375
|
+
</pre>
|
|
376
|
+
</div>
|
|
377
|
+
|
|
378
|
+
</div>
|
|
379
|
+
</div>
|
|
380
|
+
|
|
381
|
+
|
|
382
|
+
<div id="method-M000228" class="method-detail">
|
|
383
|
+
<a name="M000228"></a>
|
|
384
|
+
|
|
385
|
+
<div class="method-heading">
|
|
386
|
+
|
|
387
|
+
<a href="#M000228" class="method-signature">
|
|
388
|
+
|
|
389
|
+
<span class="method-name">reset_counters</span><span class="method-args">()</span>
|
|
390
|
+
|
|
391
|
+
</a>
|
|
392
|
+
|
|
393
|
+
</div>
|
|
394
|
+
|
|
395
|
+
<div class="method-description">
|
|
396
|
+
|
|
397
|
+
<p>
|
|
398
|
+
Reset the called/calculated counters of the <a
|
|
399
|
+
href="Evaluator.html">Evaluator</a>
|
|
400
|
+
</p>
|
|
401
|
+
|
|
402
|
+
<p><a class="source-toggle" href="#"
|
|
403
|
+
onclick="toggleCode('M000228-source');return false;">[Source]</a></p>
|
|
404
|
+
<div class="method-source-code" id="M000228-source">
|
|
405
|
+
<pre>
|
|
406
|
+
<span class="ruby-comment cmt"># File lib/evosynth/core/evaluator.rb, line 97</span>
|
|
407
|
+
97: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reset_counters</span>
|
|
408
|
+
98: <span class="ruby-ivar">@called</span> = <span class="ruby-value">0</span>
|
|
409
|
+
99: <span class="ruby-ivar">@calculated</span> = <span class="ruby-value">0</span>
|
|
410
|
+
100: <span class="ruby-keyword kw">end</span>
|
|
411
|
+
</pre>
|
|
412
|
+
</div>
|
|
413
|
+
|
|
414
|
+
</div>
|
|
415
|
+
</div>
|
|
416
|
+
|
|
417
|
+
|
|
418
|
+
<div id="method-M000229" class="method-detail">
|
|
419
|
+
<a name="M000229"></a>
|
|
420
|
+
|
|
421
|
+
<div class="method-heading">
|
|
422
|
+
|
|
423
|
+
<a href="#M000229" class="method-signature">
|
|
424
|
+
|
|
425
|
+
<span class="method-name">to_s</span><span class="method-args">()</span>
|
|
426
|
+
|
|
427
|
+
</a>
|
|
428
|
+
|
|
429
|
+
</div>
|
|
430
|
+
|
|
431
|
+
<div class="method-description">
|
|
432
|
+
|
|
433
|
+
<p>
|
|
434
|
+
Returns a human readable reprasentation of the <a
|
|
435
|
+
href="Evaluator.html">Evaluator</a>
|
|
436
|
+
</p>
|
|
437
|
+
|
|
438
|
+
<p><a class="source-toggle" href="#"
|
|
439
|
+
onclick="toggleCode('M000229-source');return false;">[Source]</a></p>
|
|
440
|
+
<div class="method-source-code" id="M000229-source">
|
|
441
|
+
<pre>
|
|
442
|
+
<span class="ruby-comment cmt"># File lib/evosynth/core/evaluator.rb, line 104</span>
|
|
443
|
+
104: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
|
|
444
|
+
105: <span class="ruby-node">"Evaluator <called: #{@called}, calculated: #{@calculated}>"</span>
|
|
445
|
+
106: <span class="ruby-keyword kw">end</span>
|
|
446
|
+
</pre>
|
|
447
|
+
</div>
|
|
448
|
+
|
|
449
|
+
</div>
|
|
450
|
+
</div>
|
|
451
|
+
|
|
452
|
+
|
|
453
|
+
|
|
454
|
+
</div>
|
|
455
|
+
|
|
456
|
+
|
|
457
|
+
|
|
458
|
+
|
|
459
|
+
</div>
|
|
460
|
+
|
|
461
|
+
<div id="validator-badges">
|
|
462
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
463
|
+
</div>
|
|
464
|
+
|
|
465
|
+
</body>
|
|
466
|
+
</html>
|