dino_game_v2.rb
# Output high scores to a file

Output high scores to a file
Output high scores to a file
def output_high_scores_by_gen_number(high_scores, generations)
	file = File.open("output_mutate_genes_" + MUTATE_GENES.to_s + "_prediction_threshold_" + PREDICTION_THRESHOLD.to_s + ".txt", "w")
	for i in (0..high_scores.length - 1)
		file.puts(high_scores[i].to_s + " " + generations[i].to_s)
	end
	file.close
end
def output_high_scores_by_gen_number ( high_scores , generations ) file = File . open ( "output_mutate_genes_" + MUTATE_GENES . to_s + "_prediction_threshold_" + PREDICTION_THRESHOLD . to_s + ".txt" , "w" ) for i in ( 0 .. high_scores . length - 1 ) file . puts ( high_scores [ i ] . to_s + " " + generations [ i ] . to_s ) end file . close end
Output high scores to a file
Output high scores to a file
high_scores
<not_specific>
generations
<not_specific>