Skip to content

Commit 01b7032

Browse files
committed
more simulations peformed
1 parent 89fa059 commit 01b7032

File tree

80 files changed

+10
-37
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+10
-37
lines changed

experiments/analysis.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def getUniques(list1):
7373
return result1
7474

7575
path_list = []
76-
outFolderBases = ["varyEvolSeeds", "varyEvolSeeds1"]
76+
outFolderBases = ["varyEvolSeeds", "varyEvolSeeds1", "varyEvolSeeds2", "varyEvolSeeds3"]
7777
current = os.path.dirname(os.path.realpath(__file__)) # location of this file!
7878
for outFolderBase in outFolderBases:
7979
path = current + "/" + outFolderBase
@@ -102,6 +102,8 @@ def getUniques(list1):
102102
worm_vals_list = []
103103
for dir in path_list:
104104
json_file = dir + "/worm_data.json"
105+
if not os.path.isfile(json_file): break
106+
if not os.path.isfile(dir + '/fitness.dat'): break
105107
with open(json_file, "r") as file:
106108
worm_data = json.load(file)
107109
cell_names = getCellNames(worm_data)
@@ -154,7 +156,7 @@ def getUniques(list1):
154156

155157
if not make_directory("results", overwrite=True):
156158
sys.exit(1)
157-
fit_level = 0.9
159+
fit_level = 0.95
158160

159161
results_titles = ['ChemWei', 'ElectWei', 'Bias', 'Worm']
160162
data_results_list = [weights_list, elec_weights_list, biases_list, worm_vals_list]

experiments/results/Bias_DA.png

-646 Bytes

experiments/results/Bias_DB.png

-2.25 KB

experiments/results/Bias_DD.png

-1.08 KB

experiments/results/Bias_VA.png

-646 Bytes

experiments/results/Bias_VB.png

-2.25 KB

experiments/results/Bias_VD.png

-1.08 KB

experiments/results/ChemWei_DADA.png

1.59 KB

experiments/results/ChemWei_DAVD.png

691 Bytes

experiments/results/ChemWei_DBDB.png

-585 Bytes

experiments/results/ChemWei_DBVD.png

1.22 KB

experiments/results/ChemWei_DDDA.png

1.15 KB

experiments/results/ChemWei_DDDB.png

-607 Bytes

experiments/results/ChemWei_DDDD.png

-3.37 KB

experiments/results/ChemWei_VADD.png

691 Bytes

experiments/results/ChemWei_VAVA.png

1.59 KB

experiments/results/ChemWei_VBDD.png

1.22 KB

experiments/results/ChemWei_VBVB.png

-585 Bytes

experiments/results/ChemWei_VDVA.png

1.15 KB

experiments/results/ChemWei_VDVB.png

-607 Bytes

experiments/results/ChemWei_VDVD.png

-3.37 KB

experiments/results/ElectWei_DBDB.png

1.2 KB

experiments/results/ElectWei_DDDD.png

1.24 KB

experiments/results/ElectWei_VBVB.png

1.2 KB

experiments/results/ElectWei_VDVD.png

1.24 KB

experiments/results/Worm_AVA_act.png

1.53 KB
1.53 KB
1.53 KB

experiments/results/Worm_AVB_act.png

1.53 KB
1.53 KB
1.53 KB

experiments/results/Worm_NMJ_DA.png

767 Bytes

experiments/results/Worm_NMJ_DB.png

410 Bytes

experiments/results/Worm_NMJ_DD.png

768 Bytes

experiments/results/Worm_NMJ_VA.png

767 Bytes

experiments/results/Worm_NMJ_VB.png

410 Bytes

experiments/results/Worm_NMJ_VD.png

768 Bytes
1.53 KB
1.59 KB
2.88 KB
391 Bytes
1.95 KB
2.88 KB
391 Bytes
1.95 KB
1.65 KB
319 Bytes
778 Bytes
358 Bytes
2.62 KB
-407 Bytes
-838 Bytes
319 Bytes
1.65 KB
358 Bytes
778 Bytes
2.62 KB
-407 Bytes
-838 Bytes
1.86 KB
1.79 KB
1.86 KB
1.79 KB
-36 Bytes
-36 Bytes
-36 Bytes
-36 Bytes
-36 Bytes
-36 Bytes
565 Bytes
1.6 KB
1.69 KB
565 Bytes
1.6 KB
1.69 KB
-36 Bytes
1.14 KB

experiments/vary_evol_pars.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55
from run_main import run
66
from run_main import make_directory
77

8-
outFolderBase = "varyEvolSeeds"
8+
outFolderBase = "varyEvolSeeds3"
99
popSize = 10
10-
make_directory(outFolderBase)
10+
if not make_directory(outFolderBase):
11+
sys.exit(1)
1112

1213
for ind in range(500):
1314
outputFolderName = outFolderBase + "/run_" + str(ind)

load_data.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def reload_single_run(show_plot=True, verbose=False):
119119

120120
if show_plot:
121121
plt.show()
122-
122+
plt.close()
123123

124124
if __name__ == "__main__":
125125
import sys

main.cpp

+2-32
Original file line numberDiff line numberDiff line change
@@ -207,14 +207,7 @@ double save_traces(TVector<double> &v, RandomState &rs){
207207
w.AVA_output = w.AVA_inact;
208208
w.AVB_output = w.AVB_act;
209209

210-
211-
/* if (checkNervousSystemForJson()){
212-
cout << "making json" << endl;
213-
writeParsToJson(w, "worm_data.json");
214-
testNervousSystemJson("worm_data.json", static_cast<NervousSystem &>(*w.n_ptr));
215-
} */
216-
217-
//#endif
210+
218211

219212
for (double t = 0.0; t <= Transient + Duration; t += StepSize){
220213
w.Step(StepSize, 1);
@@ -458,24 +451,6 @@ int main (int argc, const char* argv[])
458451
Best >> best;
459452

460453

461-
/* TVector<double> phenotype(1, VectSize);
462-
GenPhenMapping(best, phenotype);
463-
double sra = phenotype(SR_A);
464-
double srb = phenotype(SR_B);
465-
466-
467-
Worm w(phenotype, 1);
468-
w.InitializeState(rs);
469-
w.sr.SR_A_gain = 0.0;
470-
w.sr.SR_B_gain = srb;
471-
w.AVA_output = w.AVA_inact;
472-
w.AVB_output = w.AVB_act; */
473-
474-
475-
476-
/* if (strcmp(sim_output_dir_name.c_str(), "")!=0){
477-
output_dir_name = sim_output_dir_name;
478-
} */
479454

480455
if (do_nml){
481456
nervousSystemName = nervousSystemNameForSim;
@@ -486,12 +461,7 @@ int main (int argc, const char* argv[])
486461
}
487462
save_traces(best, rs);
488463

489-
/* if (strcmp(nml_output_dir_name.c_str(), "")!=0){
490-
nervousSystemName = nervousSystemNameForSim;
491-
output_dir_name = nml_output_dir_name;
492-
cout << "Performing nml run and saving data\n" << endl;
493-
save_traces(best, rs);
494-
} */
464+
495465

496466

497467

0 commit comments

Comments
 (0)