I wish to do the following: 1) Try a variety of input combinations to search for a best result 2) Reset all arrays as they were before each loop of the code
Every variable I am working with is in an array such as f[0,1,2,3,...]
The issue is likely in the resetting variables after each pass part, as the first pass works fine, but the residuals of the first pass cause the following iterations to break early..
Here is the pseudo for my method. So very simple, likely an issue with how Python handles data (object oriented)..
index_save = index
for input1 in [0.1,0.2,0.3,...]
for input2 in [10,20,30,...]
for input3 in [-0.1,-0.2,-0.3,...]
index = index_save #To reset the index and thus all arrays
while True:
index = index + 1
f[index] = *Function of inputs*
result = *Function of f and inputs*
if condition_met = true
break
if result > result_best
result_best = result
inputs_best = [input1,input2,input3]
It turns out the answer to my question is as follows.