From 5bc1b2ff9882f2109ead1c6fe7852d7e8308e754 Mon Sep 17 00:00:00 2001 From: raspipy <100288938+raspipy@users.noreply.github.com> Date: Tue, 26 Apr 2022 19:40:34 +0200 Subject: [PATCH] E --- GUI.py | 14 ------ config.txt | 79 ++++++++++++++++++++++++++++++++ prototyping/GUI.py | 0 main2.py => prototyping/main2.py | 0 webserver.py | 28 +++++++++++ 5 files changed, 107 insertions(+), 14 deletions(-) delete mode 100644 GUI.py create mode 100644 config.txt create mode 100644 prototyping/GUI.py rename main2.py => prototyping/main2.py (100%) create mode 100644 webserver.py diff --git a/GUI.py b/GUI.py deleted file mode 100644 index 85cf832..0000000 --- a/GUI.py +++ /dev/null @@ -1,14 +0,0 @@ -import neat - - -net = neat.nn.FeedForwardNetwork.create(config) - - -inputs= [0.7,08.9,0.5,0.6] -output = [0.1,0.2,0.3,0.4] -# Train a neat AI using the inputs data without supervision -model = neat.nn.FeedForwardNetwork.create(net, config) -model.train(inputs, output) - - - \ No newline at end of file diff --git a/config.txt b/config.txt new file mode 100644 index 0000000..68732c2 --- /dev/null +++ b/config.txt @@ -0,0 +1,79 @@ +[NEAT] +fitness_criterion = max +fitness_threshold = 90000 +pop_size = 100 +reset_on_extinction = False + +[DefaultGenome] +# node activation options +activation_default = tanh +activation_mutate_rate = 0.0 +activation_options = tanh + +# node aggregation options +aggregation_default = sum +aggregation_mutate_rate = 0.0 +aggregation_options = sum + +# node bias options +bias_init_mean = 0.0 +bias_init_stdev = 1.0 +bias_max_value = 30.0 +bias_min_value = -30.0 +bias_mutate_power = 0.5 +bias_mutate_rate = 0.7 +bias_replace_rate = 0.1 + +# genome compatibility options +compatibility_disjoint_coefficient = 1.0 +compatibility_weight_coefficient = 0.5 + +# connection add/remove rates +conn_add_prob = 0.5 +conn_delete_prob = 0.5 + +# connection enable options +enabled_default = True +enabled_mutate_rate = 0.01 + +feed_forward = True +initial_connection = full + +# node add/remove rates +node_add_prob = 0.2 +node_delete_prob = 0.2 + +# network parameters +num_hidden = 2 +num_inputs = 4 +num_outputs = 2 + +# node response options +response_init_mean = 1.0 +response_init_stdev = 0.0 +response_max_value = 30.0 +response_min_value = -30.0 +response_mutate_power = 0.0 +response_mutate_rate = 0.0 +response_replace_rate = 0.0 + +# connection weight options +weight_init_mean = 0.0 +weight_init_stdev = 1.0 +weight_max_value = 30 +weight_min_value = -30 +weight_mutate_power = 0.5 +weight_mutate_rate = 0.8 +weight_replace_rate = 0.1 + +[DefaultSpeciesSet] +compatibility_threshold = 3.0 + +[DefaultStagnation] +species_fitness_func = max +max_stagnation = 20 +species_elitism = 2 + +[DefaultReproduction] +elitism = 2 +survival_threshold = 0.2 \ No newline at end of file diff --git a/prototyping/GUI.py b/prototyping/GUI.py new file mode 100644 index 0000000..e69de29 diff --git a/main2.py b/prototyping/main2.py similarity index 100% rename from main2.py rename to prototyping/main2.py diff --git a/webserver.py b/webserver.py new file mode 100644 index 0000000..2b486fa --- /dev/null +++ b/webserver.py @@ -0,0 +1,28 @@ +from flask import * +import time +ids = ["ATGDUZ5C7DS86CD8SVJ","HIUHYUITYR4456C47690"] +app = Flask(__name__) + +@app.route('/error') +def error(): + return "
This is the home page of the website
+You can access the controll page
""" + +@app.route('/controll/