Changeset 1186
- Timestamp:
- 11/20/22 20:32:43 (2 years ago)
- Location:
- cpp/frams
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/_demos/loader_test_param.cpp
r994 r1186 37 37 { "Data", 1, 16, "data", }, 38 38 { "text", 0, 0, "Text", "s 0 10", FIELD(text), }, // 10 = length limit 39 { "longtext", 0, 0, "Long text", "s 1", FIELD(longtext), }, // 1 = multiline, 0= unlimited40 { "deftext", 0, 0, "Text with default value", "s 0 0some text", FIELD(deftext), },39 { "longtext", 0, 0, "Long text", "s 1", FIELD(longtext), }, // 1 = multiline, -1 = unlimited 40 { "deftext", 0, 0, "Text with default value", "s 0 -1 some text", FIELD(deftext), }, 41 41 { "i1", 0, 0, "Integer 1", "d", FIELD(i1), }, // unrestricted integer 42 42 { "i2", 0, 0, "Integer 2", "d -5 5 1", FIELD(i2), }, // [-5..5] integer, default=1 -
cpp/frams/config/f0-SDK.def
r1183 r1186 3 3 GROUP(Visual) 4 4 PROP(se,0,1024,startenergy,f,,,,startenergy) 5 PROP(Vstyle,1,0,Visual style,s,0, 0,,vis_style,,``See the \"Visual style definition\" context for more information'')5 PROP(Vstyle,1,0,Visual style,s,0,-1,,vis_style,,``See the \"Visual style definition\" context for more information'') 6 6 ENDCLASS 7 7 … … 27 27 PROP(rz,0,1024,rot.z,f,,,,rot.z) 28 28 PROP(i,1,0,`info',s,,,,info) 29 PROP(Vstyle,2,0,Visual style,s,0, 0,part,vis_style,,``See the \"Visual style definition\" context for more information'')29 PROP(Vstyle,2,0,Visual style,s,0,-1,part,vis_style,,``See the \"Visual style definition\" context for more information'') 30 30 XPROP(vr,2,0,red component,f,0.0,1.0,0.5,vcolor.x) 31 31 XPROP(vg,2,1024,green component,f,0.0,1.0,0.5,vcolor.y) … … 66 66 PROP(stam,2,0,stamina,f,0.0,1.0,0.25,stamina) 67 67 PROP(i,2,0,`info',s,,,,info) 68 PROP(Vstyle,3,0,Visual style,s,0, 0,joint,vis_style,,``See the \"Visual style definition\" context for more information'')68 PROP(Vstyle,3,0,Visual style,s,0,-1,joint,vis_style,,``See the \"Visual style definition\" context for more information'') 69 69 XPROP(vr,3,0,red component,f,0.0,1.0,0.5,vcolor.x) 70 70 XPROP(vg,3,1024,green component,f,0.0,1.0,0.5,vcolor.y) … … 94 94 PROP(stam,2,0,stamina,f,0.0,1.0,0.25,stamina) 95 95 PROP(i,2,0,`info',s,,,,info) 96 PROP(Vstyle,3,0,Visual style,s,0, 0,joint,vis_style,,``See the \"Visual style definition\" context for more information'')96 PROP(Vstyle,3,0,Visual style,s,0,-1,joint,vis_style,,``See the \"Visual style definition\" context for more information'') 97 97 XPROP(vr,3,0,red component,f,0.0,1.0,0.5,vcolor.x) 98 98 XPROP(vg,3,1024,green component,f,0.0,1.0,0.5,vcolor.y) … … 108 108 PROP(d,1,0,details,s,,,N,details,GETSET) 109 109 PROP(i,1,0,`info',s,,,,info) 110 PROP(Vstyle,2,0,Visual style,s,0, 0,neuro,vis_style,,``See the \"Visual style definition\" context for more information'')110 PROP(Vstyle,2,0,Visual style,s,0,-1,neuro,vis_style,,``See the \"Visual style definition\" context for more information'') 111 111 PROP(getInputCount,0,1+2,`input count',d,,,,inputCount,GETONLY) 112 112 PROP(getInputNeuroDef,0,0,`get input neuron',p oNeuroDef(d),,,,p_getInputNeuroDef,PROCEDURE) -
cpp/frams/config/f0.def
r1183 r1186 3 3 GROUP(Visual) 4 4 PROP(se,0,1024,startenergy,f,,,,startenergy) 5 PROP(Vstyle,1,0,Visual style,s,0, 0,,vis_style,,``See the \"Visual style definition\" context for more information'')5 PROP(Vstyle,1,0,Visual style,s,0,-1,,vis_style,,``See the \"Visual style definition\" context for more information'') 6 6 ENDCLASS 7 7 … … 27 27 PROP(rz,0,1024,rot.z,f,,,,rot.z) 28 28 PROP(i,1,0,`info',s,,,,info) 29 PROP(Vstyle,2,0,Visual style,s,0, 0,part,vis_style,,``See the \"Visual style definition\" context for more information'')29 PROP(Vstyle,2,0,Visual style,s,0,-1,part,vis_style,,``See the \"Visual style definition\" context for more information'') 30 30 XPROP(vr,2,0,red component,f,0.0,1.0,0.5,vcolor.x) 31 31 XPROP(vg,2,1024,green component,f,0.0,1.0,0.5,vcolor.y) … … 66 66 PROP(stam,2,0,stamina,f,0.0,1.0,0.25,stamina) 67 67 PROP(i,2,0,`info',s,,,,info) 68 PROP(Vstyle,3,0,Visual style,s,0, 0,joint,vis_style,,``See the \"Visual style definition\" context for more information'')68 PROP(Vstyle,3,0,Visual style,s,0,-1,joint,vis_style,,``See the \"Visual style definition\" context for more information'') 69 69 XPROP(vr,3,0,red component,f,0.0,1.0,0.5,vcolor.x) 70 70 XPROP(vg,3,1024,green component,f,0.0,1.0,0.5,vcolor.y) … … 94 94 PROP(stam,2,0,stamina,f,0.0,1.0,0.25,stamina) 95 95 PROP(i,2,0,`info',s,,,,info) 96 PROP(Vstyle,3,0,Visual style,s,0, 0,joint,vis_style,,``See the \"Visual style definition\" context for more information'')96 PROP(Vstyle,3,0,Visual style,s,0,-1,joint,vis_style,,``See the \"Visual style definition\" context for more information'') 97 97 XPROP(vr,3,0,red component,f,0.0,1.0,0.5,vcolor.x) 98 98 XPROP(vg,3,1024,green component,f,0.0,1.0,0.5,vcolor.y) … … 108 108 PROP(d,1,0,details,s,,,N,details,GETSET) 109 109 PROP(i,1,0,`info',s,,,,info) 110 PROP(Vstyle,2,0,Visual style,s,0, 0,neuro,vis_style,,``See the \"Visual style definition\" context for more information'')110 PROP(Vstyle,2,0,Visual style,s,0,-1,neuro,vis_style,,``See the \"Visual style definition\" context for more information'') 111 111 PROP(getInputCount,0,1+2,`input count',d,,,,inputCount,GETONLY) 112 112 PROP(getInputNeuroDef,0,0,`get input neuron',p oNeuroDef(d),,,,p_getInputNeuroDef,PROCEDURE) -
cpp/frams/genetics/fn/fn_oper.cpp
r974 r1186 27 27 { "fn_xover", 0, 0, "Fraction inherited in linear mix crossover", "f 0.5 1.0 0.9", FIELD(xover_proportion), "0.5 => children are averaged parents.\n0.8 => children are only 20% different from parents.\n1.0 => each child is identical to one parent (no crossover).", }, 28 28 { "fn_xover_random", 0, 0, "Random fraction inherited in crossover", "d 0 1 1", FIELD(xover_proportion_random), "If active, the amount of linear mix is random in each crossover operation, so the \"Fraction inherited in linear mix crossover\" parameter is ignored.", }, 29 { "fn_mut_bound_low", 1, 0, "Lower bounds for mutation", "s 0 0[-10.0, -10.0]", FIELD(mut_bound_low), "A vector of lower bounds (one real value for each variable)", },30 { "fn_mut_bound_high", 1, 0, "Higher bounds for mutation", "s 0 0[10.0, 10.0]", FIELD(mut_bound_high), "A vector of higher bounds (one real value for each variable)", },31 { "fn_mut_stddev", 1, 0, "Standard deviations for mutation", "s 0 0[0.1, 0.1]", FIELD(mut_stddev), "A vector of standard deviations (one real value for each variable)", },29 { "fn_mut_bound_low", 1, 0, "Lower bounds for mutation", "s 0 -1 [-10.0, -10.0]", FIELD(mut_bound_low), "A vector of lower bounds (one real value for each variable)", }, 30 { "fn_mut_bound_high", 1, 0, "Higher bounds for mutation", "s 0 -1 [10.0, 10.0]", FIELD(mut_bound_high), "A vector of higher bounds (one real value for each variable)", }, 31 { "fn_mut_stddev", 1, 0, "Standard deviations for mutation", "s 0 -1 [0.1, 0.1]", FIELD(mut_stddev), "A vector of standard deviations (one real value for each variable)", }, 32 32 { "fn_mut_single_var", 0, 0, "Mutate only a single variable", "d 0 1 0", FIELD(mut_single_var), "If active, only a single randomly selected variable will be mutated in each mutation operation. Otherwise all variables will be mutated.", }, 33 33 { 0, }, -
cpp/frams/model/f0-SDK-classes.h
r1183 r1186 10 10 {"Visual",}, 11 11 {"se",0,1024,"startenergy","f",FIELD(startenergy),}, 12 {"Vstyle",1,0,"Visual style","s 0 0",FIELD(vis_style),"See the \"Visual style definition\" context for more information",},12 {"Vstyle",1,0,"Visual style","s 0 -1 ",FIELD(vis_style),"See the \"Visual style definition\" context for more information",}, 13 13 {0,0,0,} 14 14 }; … … 44 44 {"rz",0,1024,"rot.z","f",FIELD(rot.z),}, 45 45 {"i",1,0,"info","s",FIELD(info),}, 46 {"Vstyle",2,0,"Visual style","s 0 0part",FIELD(vis_style),"See the \"Visual style definition\" context for more information",},46 {"Vstyle",2,0,"Visual style","s 0 -1 part",FIELD(vis_style),"See the \"Visual style definition\" context for more information",}, 47 47 {"vr",2,0,"red component","f 0.0 1.0 0.5",FIELD(vcolor.x),}, 48 48 {"vg",2,1024,"green component","f 0.0 1.0 0.5",FIELD(vcolor.y),}, … … 111 111 {"stam",2,0,"stamina","f 0.0 1.0 0.25",FIELD(stamina),}, 112 112 {"i",2,0,"info","s",FIELD(info),}, 113 {"Vstyle",3,0,"Visual style","s 0 0joint",FIELD(vis_style),"See the \"Visual style definition\" context for more information",},113 {"Vstyle",3,0,"Visual style","s 0 -1 joint",FIELD(vis_style),"See the \"Visual style definition\" context for more information",}, 114 114 {"vr",3,0,"red component","f 0.0 1.0 0.5",FIELD(vcolor.x),}, 115 115 {"vg",3,1024,"green component","f 0.0 1.0 0.5",FIELD(vcolor.y),}, … … 154 154 {"stam",2,0,"stamina","f 0.0 1.0 0.25",FIELD(stamina),}, 155 155 {"i",2,0,"info","s",FIELD(info),}, 156 {"Vstyle",3,0,"Visual style","s 0 0joint",FIELD(vis_style),"See the \"Visual style definition\" context for more information",},156 {"Vstyle",3,0,"Visual style","s 0 -1 joint",FIELD(vis_style),"See the \"Visual style definition\" context for more information",}, 157 157 {"vr",3,0,"red component","f 0.0 1.0 0.5",FIELD(vcolor.x),}, 158 158 {"vg",3,1024,"green component","f 0.0 1.0 0.5",FIELD(vcolor.y),}, … … 183 183 {"d",1,0,"details","s",GETSET(details),}, 184 184 {"i",1,0,"info","s",FIELD(info),}, 185 {"Vstyle",2,0,"Visual style","s 0 0neuro",FIELD(vis_style),"See the \"Visual style definition\" context for more information",},185 {"Vstyle",2,0,"Visual style","s 0 -1 neuro",FIELD(vis_style),"See the \"Visual style definition\" context for more information",}, 186 186 {"getInputCount",0,1+2,"input count","d",GETONLY(inputCount),}, 187 187 {"getInputNeuroDef",0,0,"get input neuron","p oNeuroDef(d)",PROCEDURE(p_getInputNeuroDef),}, -
cpp/frams/param/param.cpp
r1184 r1186 909 909 //if (have == 1) return false; //not sure? 910 910 if ((have >= 1) && (!((a == 0) || (a == 1)))) return false; // 'min' for string (single/multi) can be only 0 or 1 911 if ((have >= 2) && (b < 0)) return false; // max=0 means unlimited, max<0is not allowed911 if ((have >= 2) && (b < -1)) return false; // max=-1 means unlimited, >=0 is max len, max<-1 is not allowed 912 912 } 913 913 break; … … 1162 1162 if (sscanf(t, "%d %d", &mn, &mx) == 2) //using getMinMax would also get default value, which is not needed here 1163 1163 { 1164 if ((x.length() > mx) && (mx > 0))1164 if ((x.length() > mx) && (mx >= 0)) 1165 1165 { 1166 1166 vs = x.substr(0, mx);
Note: See TracChangeset
for help on using the changeset viewer.