Changeset 975 for cpp/frams


Ignore:
Timestamp:
07/06/20 23:32:03 (4 years ago)
Author:
Maciej Komosinski
Message:

Added NeuroClass::getSupportedJointTypes() and NeuroClass::isJointTypeSupported() for use in genetic operators

Location:
cpp/frams
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/_demos/genoconv_test.cpp

    r972 r975  
    107107}
    108108
     109/// Sample Geno converter producing "f0s" genotype from the textual list of shapes, eg. "/*shapes*/ball,cube,cube"
     110class GenoConv_Test4 : public GenoConverter
     111{
     112public:
     113        GenoConv_Test4()
     114        {
     115                name = "Test Converter #4";
     116                in_format = "shapes";
     117                out_format = "0s";
     118                mapsupport = 1;
     119        }
     120        SString convert(SString &in, MultiMap *map, bool using_checkpoints);
     121        ~GenoConv_Test4() {}
     122};
     123
     124SString GenoConv_Test4::convert(SString &in, MultiMap *map, bool using_checkpoints)
     125{
     126        SString result;
     127        int numparts=0;
     128        int input_pos=0, prev_input_pos=0; SString word;
     129        while(in.getNextToken(input_pos,word,','))
     130                {
     131                Part::Shape sh;
     132                if (word=="cube")
     133                        sh = Part::SHAPE_CUBOID;
     134                else if (word=="ball")
     135                        sh = Part::SHAPE_ELLIPSOID;
     136                else if (word=="cylinder")
     137                        sh = Part::SHAPE_CYLINDER;
     138                else
     139                        return "";
     140                SString add;
     141                add+=SString::sprintf("p:x=%g,sh=%d\n",numparts*2.0f,sh);
     142                if (numparts>0)
     143                        add+=SString::sprintf("j:p1=%d,p2=%d,sh=1\n",numparts-1,numparts);
     144                if (map) // fill in the map only if requested
     145                        map->add(prev_input_pos, prev_input_pos+word.length()-1, result.length(),result.length()+add.length()-1);
     146                result+=add;
     147                numparts++;
     148                prev_input_pos = input_pos;
     149                }
     150        return result;
     151}
     152
    109153
    110154///////////////////////////////////////////////
     
    118162static int goodWidthForFormat(const SString& genotype_format)
    119163{
    120         return genotype_format == "0" ? 45 : 15; // more space for long f0 lines
     164        return Geno::formatIsOneOf(genotype_format, Geno::F0_FORMAT_LIST) ? 45 : 15; // more space for long f0 lines
    121165}
    122166
     
    134178        gcm.addConverter(new GenoConv_Test2());
    135179        gcm.addConverter(new GenoConv_Test3());
     180        gcm.addConverter(new GenoConv_Test4());
    136181        Geno::useConverters(&gcm);
    137182
     
    154199        else
    155200                src = "X";
    156         SString dst = (argc > 2) ? *argv[2] : '0';
     201        SString dst = (argc > 2) ? argv[2] : Geno::F0_FORMAT_LIST;
    157202        bool using_checkpoints = (argc > 3) ? (strcmp(argv[3], "checkpoints") == 0) : false;
    158203
     
    162207        MultiMap m;
    163208        Geno g2 = g1.getConverted(dst, &m, using_checkpoints);
    164         printf("*** Converted to f%s:\n", dst.c_str());
     209        printf("*** Converted:\n");
    165210        printGen(g2);
    166211
  • cpp/frams/config/f0-SDK.def

    r952 r975  
    202202NEUROCLASS(SolidMuscle,M,Muscle for solids,,1,0,2)
    203203SHAPETYPE(SolidsShapeType)
     204JOINTTYPE(SUPPORTED_JOINT_HINGE_X+SUPPORTED_JOINT_HINGE_XY)
    204205VISUALHINTS(EffectorClass+AtFirstPart+SolidMuscleFlag)
    205206SYMBOL(`6,5,25,40,35,40,45,50,35,60,25,60,25,40,4,65,85,65,50,75,50,75,85,65,85,3,65,56,49,29,57,24,72,50,4,68,53,70,53,70,55,68,55,68,53,5,50,21,60,15,70,14,79,15,87,20,81,10,1,86,20,77,21')
  • cpp/frams/config/f0.def

    r952 r975  
    202202NEUROCLASS(SolidMuscle,M,Muscle for solids,,1,0,2)
    203203SHAPETYPE(SolidsShapeType)
     204JOINTTYPE(SUPPORTED_JOINT_HINGE_X+SUPPORTED_JOINT_HINGE_XY)
    204205VISUALHINTS(EffectorClass+AtFirstPart+SolidMuscleFlag)
    205206SYMBOL(`6,5,25,40,35,40,45,50,35,60,25,60,25,40,4,65,85,65,50,75,50,75,85,65,85,3,65,56,49,29,57,24,72,50,4,68,53,70,53,70,55,68,55,68,53,5,50,21,60,15,70,14,79,15,87,20,81,10,1,86,20,77,21')
  • cpp/frams/model/model.cpp

    r972 r975  
    415415        {
    416416                *f0map = *map;
    417                 if (geno.getFormat() != '0')
     417                if (!Geno::formatIsOneOf(geno.getFormat(), Geno::F0_FORMAT_LIST))
    418418                {
    419419                        MultiMap tmp;
  • cpp/frams/model/modelparts.cpp

    r973 r975  
    9999NeuroClass::NeuroClass(ParamEntry *_props, SString _description,
    100100        int _prefinputs, int _prefoutput, int _preflocation,
    101         int *_vectordata, bool own_vd, int vhints, int sup_shapes)
     101        int *_vectordata, bool own_vd, int vhints, int sup_shapes, int sup_joints)
    102102        :ownedvectordata(own_vd),
    103103        name(_props->name), longname(_props->id), description(_description),
  • cpp/frams/model/modelparts.h

    r972 r975  
    227227        static constexpr int SUPPORTED_SHAPE_ALL = SUPPORTED_SHAPE_BALL_AND_STICK | SUPPORTED_SHAPE_SOLIDS;
    228228        paInt supported_shape_types; //< bitfield of 'Model::shape' values: NeuroClass::SUPPORTED_SHAPE_xxx = 1 << Model::SHAPE_xxx
     229
     230        static constexpr int SUPPORTED_JOINT_BALL_AND_STICK = 1;
     231        static constexpr int SUPPORTED_JOINT_FIXED = 2;
     232        static constexpr int SUPPORTED_JOINT_HINGE_X = 4;
     233        static constexpr int SUPPORTED_JOINT_HINGE_XY = 8;
     234        static constexpr int SUPPORTED_JOINT_ALL = SUPPORTED_JOINT_BALL_AND_STICK + SUPPORTED_JOINT_FIXED + SUPPORTED_JOINT_HINGE_X + SUPPORTED_JOINT_HINGE_XY;
     235        paInt supported_joint_types; //< bitfield of 'Joint::shape' values: NeuroClass::SUPPORTED_JOINT_xxx = 1 << JOINT::SHAPE_xxx
     236
    229237        int *vectordata;
    230238        paInt visualhints;
     
    240248        NeuroClass();
    241249        NeuroClass(ParamEntry *_props, SString _description,
    242                 int _prefinputs, int _prefoutput, int _preflocation, int *_vectordata, bool own_vd = 1, int vhints = 0, int sup_shapes = NeuroClass::SUPPORTED_SHAPE_ALL);
     250                   int _prefinputs, int _prefoutput, int _preflocation, int *_vectordata, bool own_vd = 1, int vhints = 0, int sup_shapes = NeuroClass::SUPPORTED_SHAPE_ALL, int sup_joints = NeuroClass::SUPPORTED_JOINT_ALL);
    243251        /** class name for use in Neuro::setClassName(), Neuro::setDetails() (former 'moredata' field),
    244252                eg. "N","-",G" */
     
    278286        int getSupportedShapeTypes() { return (int)supported_shape_types; }
    279287        bool isShapeTypeSupported(ModelEnum::ShapeType t) { return (1 << (int)t) & supported_shape_types; }
     288        int getSupportedJointTypes() { return (int)supported_joint_types; }
     289        bool isJointTypeSupported(Joint::Shape t) { return (1 << (int)t) & supported_joint_types; }
    280290        int *getSymbolGlyph()
    281291        {
  • cpp/frams/neuro/neurocls-f0-SDK-library.h

    r952 r975  
    1313
    1414
    15      
     15       
    1616static ParamEntry NI_StdNeuron_tab[]={
    1717{"Neuron",1, 4 ,"N",},
     
    2323 
    2424{0,0,0,},};
    25 addClass(new NeuroClass(NI_StdNeuron_tab,"Standard neuron",-1,1,0, NULL,false, 2, 3));
    26 
    27      
     25addClass(new NeuroClass(NI_StdNeuron_tab,"Standard neuron",-1,1,0, NULL,false, 2, 3, 15));
     26
     27       
    2828static ParamEntry NI_StdUNeuron_tab[]={
    2929{"Unipolar neuron [EXPERIMENTAL!]",1, 4 ,"Nu",},
     
    3434 
    3535{0,0,0,},};
    36 addClass(new NeuroClass(NI_StdUNeuron_tab,"Works like standard neuron (N) but the output value is scaled to 0...+1 instead of -1...+1.\nHaving 0 as one of the saturation states should help in \"gate circuits\", where input signal is passed through or blocked depending on the other singal.",-1,1,0, NULL,false, 0, 3));
    37 
    38       static int Gyro_xy[]={83,8,7,100,50,90,50,90,40,70,40,80,50,70,60,90,60,90,50,12,43,24,48,24,48,19,38,19,38,24,43,24,43,54,48,54,48,64,43,69,38,64,38,54,43,54,5,63,69,58,74,48,79,38,79,28,74,23,69,1,43,79,43,74,1,23,69,26,66,1,63,69,60,66,1,55,76,53,73,1,31,75,33,72};   
     36addClass(new NeuroClass(NI_StdUNeuron_tab,"Works like standard neuron (N) but the output value is scaled to 0...+1 instead of -1...+1.\nHaving 0 as one of the saturation states should help in \"gate circuits\", where input signal is passed through or blocked depending on the other singal.",-1,1,0, NULL,false, 0, 3, 15));
     37
     38       static int Gyro_xy[]={83,8,7,100,50,90,50,90,40,70,40,80,50,70,60,90,60,90,50,12,43,24,48,24,48,19,38,19,38,24,43,24,43,54,48,54,48,64,43,69,38,64,38,54,43,54,5,63,69,58,74,48,79,38,79,28,74,23,69,1,43,79,43,74,1,23,69,26,66,1,63,69,60,66,1,55,76,53,73,1,31,75,33,72};   
    3939static ParamEntry NI_Gyro_tab[]={
    4040{"Gyroscope",1, 0 ,"G",},
     
    4444 
    4545{0,0,0,},};
    46 addClass(new NeuroClass(NI_Gyro_tab,"Tilt sensor.\nSignal is proportional to sin(angle) = most sensitive in horizontal orientation.\n0=the stick is horizontal\n+1/-1=the stick is vertical",0,1,2, Gyro_xy,false, 32, 1));
    47 
    48       static int GyroP_xy[]={83,8,7,100,50,90,50,90,40,70,40,80,50,70,60,90,60,90,50,12,43,24,48,24,48,19,38,19,38,24,43,24,43,54,48,54,48,64,43,69,38,64,38,54,43,54,5,63,69,58,74,48,79,38,79,28,74,23,69,1,43,79,43,74,1,23,69,26,66,1,63,69,60,66,1,55,76,53,73,1,31,75,33,72};   
     46addClass(new NeuroClass(NI_Gyro_tab,"Tilt sensor.\nSignal is proportional to sin(angle) = most sensitive in horizontal orientation.\n0=the stick is horizontal\n+1/-1=the stick is vertical",0,1,2, Gyro_xy,false, 32, 1, 15));
     47
     48       static int GyroP_xy[]={83,8,7,100,50,90,50,90,40,70,40,80,50,70,60,90,60,90,50,12,43,24,48,24,48,19,38,19,38,24,43,24,43,54,48,54,48,64,43,69,38,64,38,54,43,54,5,63,69,58,74,48,79,38,79,28,74,23,69,1,43,79,43,74,1,23,69,26,66,1,63,69,60,66,1,55,76,53,73,1,31,75,33,72};   
    4949static ParamEntry NI_GyroP_tab[]={
    5050{"Part Gyroscope",1, 2 ,"Gp",},
     
    5555 
    5656{0,0,0,},};
    57 addClass(new NeuroClass(NI_GyroP_tab,"Tilt sensor. Signal is directly proportional to the tilt angle.\n0=the part X axis is horizontal\n+1/-1=the axis is vertical",0,1,1, GyroP_xy,false, 32, 3));
    58 
    59       static int Touch_xy[]={43,2,7,100,50,90,50,90,40,70,40,80,50,70,60,90,60,90,50,11,75,50,65,50,60,55,55,45,50,55,45,45,40,50,35,50,30,45,25,50,30,55,35,50};   
     57addClass(new NeuroClass(NI_GyroP_tab,"Tilt sensor. Signal is directly proportional to the tilt angle.\n0=the part X axis is horizontal\n+1/-1=the axis is vertical",0,1,1, GyroP_xy,false, 32, 3, 15));
     58
     59       static int Touch_xy[]={43,2,7,100,50,90,50,90,40,70,40,80,50,70,60,90,60,90,50,11,75,50,65,50,60,55,55,45,50,55,45,45,40,50,35,50,30,45,25,50,30,55,35,50};   
    6060static ParamEntry NI_Touch_tab[]={
    6161{"Touch",1, 3 ,"T",},
     
    6767 
    6868{0,0,0,},};
    69 addClass(new NeuroClass(NI_Touch_tab,"Touch and proximity sensor (Tc+Tp combined)\n-1=no contact\n0=just touching\n>0=pressing, value depends on the force applied (not implemented in ODE mode)",0,1,1, Touch_xy,false, 32, 3));
    70 
    71       static int TouchC_xy[]={43,2,7,100,50,90,50,90,40,70,40,80,50,70,60,90,60,90,50,11,75,50,65,50,60,55,55,45,50,55,45,45,40,50,35,50,30,45,25,50,30,55,35,50};   
     69addClass(new NeuroClass(NI_Touch_tab,"Touch and proximity sensor (Tc+Tp combined)\n-1=no contact\n0=just touching\n>0=pressing, value depends on the force applied (not implemented in ODE mode)",0,1,1, Touch_xy,false, 32, 3, 15));
     70
     71       static int TouchC_xy[]={43,2,7,100,50,90,50,90,40,70,40,80,50,70,60,90,60,90,50,11,75,50,65,50,60,55,55,45,50,55,45,45,40,50,35,50,30,45,25,50,30,55,35,50};   
    7272static ParamEntry NI_TouchC_tab[]={
    7373{"Touch contact",1, 0 ,"Tc",},
     
    7676 
    7777{0,0,0,},};
    78 addClass(new NeuroClass(NI_TouchC_tab,"Touch sensor.\n-1=no contact\n0=the Part is touching the obstacle\n>0=pressing, value depends on the force applied (not implemented in ODE mode)",0,1,1, TouchC_xy,false, 32, 3));
    79 
    80       static int TouchP_xy[]={43,2,7,100,50,90,50,90,40,70,40,80,50,70,60,90,60,90,50,11,75,50,65,50,60,55,55,45,50,55,45,45,40,50,35,50,30,45,25,50,30,55,35,50};   
     78addClass(new NeuroClass(NI_TouchC_tab,"Touch sensor.\n-1=no contact\n0=the Part is touching the obstacle\n>0=pressing, value depends on the force applied (not implemented in ODE mode)",0,1,1, TouchC_xy,false, 32, 3, 15));
     79
     80       static int TouchP_xy[]={43,2,7,100,50,90,50,90,40,70,40,80,50,70,60,90,60,90,50,11,75,50,65,50,60,55,55,45,50,55,45,45,40,50,35,50,30,45,25,50,30,55,35,50};   
    8181static ParamEntry NI_TouchP_tab[]={
    8282{"Touch proximity",1, 3 ,"Tp",},
     
    8888 
    8989{0,0,0,},};
    90 addClass(new NeuroClass(NI_TouchP_tab,"Proximity sensor detecting obstacles along the X axis.\n-1=distance is \r\' or more\n0=zero distance'",0,1,1, TouchP_xy,false, 32, 3));
    91 
    92       static int Smell_xy[]={64,5,7,100,50,90,50,90,40,70,40,80,50,70,60,90,60,90,50,3,10,40,15,45,15,55,10,60,5,20,30,25,35,30,45,30,55,25,65,20,70,4,15,35,20,40,22,50,20,60,15,65,5,75,50,50,50,45,45,40,50,45,55,50,50};   
     90addClass(new NeuroClass(NI_TouchP_tab,"Proximity sensor detecting obstacles along the X axis.\n-1=distance is \r\' or more\n0=zero distance'",0,1,1, TouchP_xy,false, 32, 3, 15));
     91
     92       static int Smell_xy[]={64,5,7,100,50,90,50,90,40,70,40,80,50,70,60,90,60,90,50,3,10,40,15,45,15,55,10,60,5,20,30,25,35,30,45,30,55,25,65,20,70,4,15,35,20,40,22,50,20,60,15,65,5,75,50,50,50,45,45,40,50,45,55,50,50};   
    9393static ParamEntry NI_Smell_tab[]={
    9494{"Smell",1, 0 ,"S",},
     
    9797 
    9898{0,0,0,},};
    99 addClass(new NeuroClass(NI_Smell_tab,"Smell sensor. Aggregated \"smell of energy\" experienced from all energy objects (creatures and food pieces).\nClose objects have bigger influence than the distant ones: for each energy source, its partial feeling is proportional to its energy/(distance^2)",0,1,1, Smell_xy,false, 32, 3));
    100 
    101       static int Const_xy[]={29,4,4,26,27,26,73,73,73,73,27,26,27,1,73,50,100,50,1,56,68,46,68,2,41,47,51,32,51,68};   
     99addClass(new NeuroClass(NI_Smell_tab,"Smell sensor. Aggregated \"smell of energy\" experienced from all energy objects (creatures and food pieces).\nClose objects have bigger influence than the distant ones: for each energy source, its partial feeling is proportional to its energy/(distance^2)",0,1,1, Smell_xy,false, 32, 3, 15));
     100
     101       static int Const_xy[]={29,4,4,26,27,26,73,73,73,73,27,26,27,1,73,50,100,50,1,56,68,46,68,2,41,47,51,32,51,68};   
    102102static ParamEntry NI_Const_tab[]={
    103103{"Constant",1, 0 ,"*",},
     
    106106 
    107107{0,0,0,},};
    108 addClass(new NeuroClass(NI_Const_tab,"Constant value",0,1,0, Const_xy,false, 1, 3));
    109 
    110       static int BendMuscle_xy[]={63,6,5,25,40,35,40,45,50,35,60,25,60,25,40,4,65,85,65,50,75,50,75,85,65,85,3,65,56,49,29,57,24,72,50,4,68,53,70,53,70,55,68,55,68,53,5,50,21,60,15,70,14,79,15,87,20,81,10,1,86,20,77,21};   
     108addClass(new NeuroClass(NI_Const_tab,"Constant value",0,1,0, Const_xy,false, 1, 3, 15));
     109
     110       static int BendMuscle_xy[]={63,6,5,25,40,35,40,45,50,35,60,25,60,25,40,4,65,85,65,50,75,50,75,85,65,85,3,65,56,49,29,57,24,72,50,4,68,53,70,53,70,55,68,55,68,53,5,50,21,60,15,70,14,79,15,87,20,81,10,1,86,20,77,21};   
    111111static ParamEntry NI_BendMuscle_tab[]={
    112112{"Bend muscle",1, 2 ,"|",},
     
    118118 
    119119{0,0,0,},};
    120 addClass(new NeuroClass(NI_BendMuscle_tab,"",1,0,2, BendMuscle_xy,false, 2+16+64+4, 1));
    121 
    122       static int RotMuscle_xy[]={62,5,5,25,40,35,40,45,50,35,60,25,60,25,40,4,65,85,65,50,75,50,75,85,65,85,1,69,10,77,17,10,59,15,57,17,57,22,60,26,69,27,78,26,82,21,82,16,79,12,69,10,80,6,3,65,50,65,20,75,20,75,50};   
     120addClass(new NeuroClass(NI_BendMuscle_tab,"",1,0,2, BendMuscle_xy,false, 2+16+64+4, 1, 15));
     121
     122       static int RotMuscle_xy[]={62,5,5,25,40,35,40,45,50,35,60,25,60,25,40,4,65,85,65,50,75,50,75,85,65,85,1,69,10,77,17,10,59,15,57,17,57,22,60,26,69,27,78,26,82,21,82,16,79,12,69,10,80,6,3,65,50,65,20,75,20,75,50};   
    123123static ParamEntry NI_RotMuscle_tab[]={
    124124{"Rotation muscle",1, 1 ,"@",},
     
    129129 
    130130{0,0,0,},};
    131 addClass(new NeuroClass(NI_RotMuscle_tab,"",1,0,2, RotMuscle_xy,false, 2+16+128+4, 1));
    132 
    133       static int SolidMuscle_xy[]={63,6,5,25,40,35,40,45,50,35,60,25,60,25,40,4,65,85,65,50,75,50,75,85,65,85,3,65,56,49,29,57,24,72,50,4,68,53,70,53,70,55,68,55,68,53,5,50,21,60,15,70,14,79,15,87,20,81,10,1,86,20,77,21};   
     131addClass(new NeuroClass(NI_RotMuscle_tab,"",1,0,2, RotMuscle_xy,false, 2+16+128+4, 1, 15));
     132
     133       static int SolidMuscle_xy[]={63,6,5,25,40,35,40,45,50,35,60,25,60,25,40,4,65,85,65,50,75,50,75,85,65,85,3,65,56,49,29,57,24,72,50,4,68,53,70,53,70,55,68,55,68,53,5,50,21,60,15,70,14,79,15,87,20,81,10,1,86,20,77,21};   
    134134static ParamEntry NI_SolidMuscle_tab[]={
    135135{"Muscle for solids",1, 2 ,"M",},
     
    137137
    138138
     139
    139140{"p",0,0,"power","f 0.01 1.0 1.0",},
    140141{"a",0,0,"axis","d 0 1 0",},
    141142 
    142143{0,0,0,},};
    143 addClass(new NeuroClass(NI_SolidMuscle_tab,"",1,0,2, SolidMuscle_xy,false, 16+4+512, 2));
    144 
    145       static int Diff_xy[]={24,3,3,25,0,25,100,75,50,25,0,1,75,50,100,50,3,44,42,51,57,36,57,44,42};   
     144addClass(new NeuroClass(NI_SolidMuscle_tab,"",1,0,2, SolidMuscle_xy,false, 16+4+512, 2, 4+8));
     145
     146       static int Diff_xy[]={24,3,3,25,0,25,100,75,50,25,0,1,75,50,100,50,3,44,42,51,57,36,57,44,42};   
    146147static ParamEntry NI_Diff_tab[]={
    147148{"Differentiate",1, 0 ,"D",},
     
    149150 
    150151{0,0,0,},};
    151 addClass(new NeuroClass(NI_Diff_tab,"Calculate the difference between the current and previous input value. Multiple inputs are aggregated with respect to their weights",-1,1,0, Diff_xy,false, 0, 3));
    152 
    153       static int FuzzyNeuro_xy[]={44,5,2,30,65,37,37,44,65,3,37,65,44,37,51,37,58,65,2,51,65,58,37,65,65,6,100,50,70,50,70,25,25,10,25,90,70,75,70,50,1,70,65,25,65};   
     152addClass(new NeuroClass(NI_Diff_tab,"Calculate the difference between the current and previous input value. Multiple inputs are aggregated with respect to their weights",-1,1,0, Diff_xy,false, 0, 3, 15));
     153
     154       static int FuzzyNeuro_xy[]={44,5,2,30,65,37,37,44,65,3,37,65,44,37,51,37,58,65,2,51,65,58,37,65,65,6,100,50,70,50,70,25,25,10,25,90,70,75,70,50,1,70,65,25,65};   
    154155static ParamEntry NI_FuzzyNeuro_tab[]={
    155156{"Fuzzy system [EXPERIMENTAL!]",1, 4 ,"Fuzzy",},
     
    161162 
    162163{0,0,0,},};
    163 addClass(new NeuroClass(NI_FuzzyNeuro_tab,"Refer to publications to learn more about this neuron.",-1,1,0, FuzzyNeuro_xy,false, 0, 3));
    164 
    165      
     164addClass(new NeuroClass(NI_FuzzyNeuro_tab,"Refer to publications to learn more about this neuron.",-1,1,0, FuzzyNeuro_xy,false, 0, 3, 15));
     165
     166       
    166167static ParamEntry NI_Sticky_tab[]={
    167168{"Sticky [EXPERIMENTAL!]",1, 0 ,"Sti",},
     
    170171 
    171172{0,0,0,},};
    172 addClass(new NeuroClass(NI_Sticky_tab,"",1,0,1, NULL,false, 16, 1));
    173 
    174      
     173addClass(new NeuroClass(NI_Sticky_tab,"",1,0,1, NULL,false, 16, 1, 15));
     174
     175       
    175176static ParamEntry NI_LinearMuscle_tab[]={
    176177{"Linear muscle [EXPERIMENTAL!]",1, 1 ,"LMu",},
     
    180181 
    181182{0,0,0,},};
    182 addClass(new NeuroClass(NI_LinearMuscle_tab,"",1,0,2, NULL,false, 16+256, 1));
    183 
    184      
     183addClass(new NeuroClass(NI_LinearMuscle_tab,"",1,0,2, NULL,false, 16+256, 1, 15));
     184
     185       
    185186static ParamEntry NI_WaterDetect_tab[]={
    186187{"Water detector",1, 0 ,"Water",},
     
    188189 
    189190{0,0,0,},};
    190 addClass(new NeuroClass(NI_WaterDetect_tab,"Output signal:\n0=on or above water surface\n1=under water (deeper than 1)\n0..1=in the transient area just below water surface",0,1,1, NULL,false, 32, 3));
    191 
    192      
     191addClass(new NeuroClass(NI_WaterDetect_tab,"Output signal:\n0=on or above water surface\n1=under water (deeper than 1)\n0..1=in the transient area just below water surface",0,1,1, NULL,false, 32, 3, 15));
     192
     193       
    193194static ParamEntry NI_Energy_tab[]={
    194195{"Energy level",1, 0 ,"Energy",},
     
    196197 
    197198{0,0,0,},};
    198 addClass(new NeuroClass(NI_Energy_tab,"The current energy level divided by the initial energy level.\nUsually falls from initial 1.0 down to 0.0 and then the creature dies. It can rise above 1.0 if enough food is ingested",0,1,0, NULL,false, 32, 3));
    199 
    200       static int Channelize_xy[]={57,10,4,25,0,25,100,75,70,75,30,25,0,1,75,50,100,50,1,70,50,55,50,1,30,80,55,50,1,30,20,55,50,1,30,35,55,50,1,30,45,55,50,1,30,55,55,50,1,61,53,65,47,1,30,65,55,50};   
     199addClass(new NeuroClass(NI_Energy_tab,"The current energy level divided by the initial energy level.\nUsually falls from initial 1.0 down to 0.0 and then the creature dies. It can rise above 1.0 if enough food is ingested",0,1,0, NULL,false, 32, 3, 15));
     200
     201       static int Channelize_xy[]={57,10,4,25,0,25,100,75,70,75,30,25,0,1,75,50,100,50,1,70,50,55,50,1,30,80,55,50,1,30,20,55,50,1,30,35,55,50,1,30,45,55,50,1,30,55,55,50,1,61,53,65,47,1,30,65,55,50};   
    201202static ParamEntry NI_Channelize_tab[]={
    202203{"Channelize",1, 0 ,"Ch",},
     
    204205 
    205206{0,0,0,},};
    206 addClass(new NeuroClass(NI_Channelize_tab,"Combines all input signals into a single multichannel output; Note: ChSel and ChMux are the only neurons which support multiple channels. Other neurons discard everything except the first channel.",-1,1,0, Channelize_xy,false, 0, 3));
    207 
    208       static int ChMux_xy[]={52,7,4,25,0,25,100,75,70,75,30,25,0,1,75,50,100,50,1,70,50,55,50,3,50,55,55,50,50,45,50,55,3,30,67,45,67,45,50,50,50,1,35,70,39,64,2,30,33,53,33,53,48};   
     207addClass(new NeuroClass(NI_Channelize_tab,"Combines all input signals into a single multichannel output; Note: ChSel and ChMux are the only neurons which support multiple channels. Other neurons discard everything except the first channel.",-1,1,0, Channelize_xy,false, 0, 3, 15));
     208
     209       static int ChMux_xy[]={52,7,4,25,0,25,100,75,70,75,30,25,0,1,75,50,100,50,1,70,50,55,50,3,50,55,55,50,50,45,50,55,3,30,67,45,67,45,50,50,50,1,35,70,39,64,2,30,33,53,33,53,48};   
    209210static ParamEntry NI_ChMux_tab[]={
    210211{"Channel multiplexer",1, 0 ,"ChMux",},
     
    212213 
    213214{0,0,0,},};
    214 addClass(new NeuroClass(NI_ChMux_tab,"Outputs the selected channel from the second (multichannel) input. The first input is used as the selector value (-1=select first channel, .., 1=last channel)",2,1,0, ChMux_xy,false, 0, 3));
    215 
    216       static int ChSel_xy[]={41,6,4,25,0,25,100,75,70,75,30,25,0,1,75,50,100,50,1,70,50,55,50,3,50,55,55,50,50,45,50,55,1,30,50,50,50,1,35,53,39,47};   
     215addClass(new NeuroClass(NI_ChMux_tab,"Outputs the selected channel from the second (multichannel) input. The first input is used as the selector value (-1=select first channel, .., 1=last channel)",2,1,0, ChMux_xy,false, 0, 3, 15));
     216
     217       static int ChSel_xy[]={41,6,4,25,0,25,100,75,70,75,30,25,0,1,75,50,100,50,1,70,50,55,50,3,50,55,55,50,50,45,50,55,1,30,50,50,50,1,35,53,39,47};   
    217218static ParamEntry NI_ChSel_tab[]={
    218219{"Channel selector",1, 1 ,"ChSel",},
     
    221222 
    222223{0,0,0,},};
    223 addClass(new NeuroClass(NI_ChSel_tab,"Outputs a single channel (selected by the \"ch\" parameter) from multichannel input",1,1,0, ChSel_xy,false, 0, 3));
    224 
    225      
     224addClass(new NeuroClass(NI_ChSel_tab,"Outputs a single channel (selected by the \"ch\" parameter) from multichannel input",1,1,0, ChSel_xy,false, 0, 3, 15));
     225
     226       
    226227static ParamEntry NI_Random_tab[]={
    227228{"Random noise",1, 0 ,"Rnd",},
    228229 
    229230{0,0,0,},};
    230 addClass(new NeuroClass(NI_Random_tab,"Generates random noise (subsequent random values in the range of -1..+1)",0,1,0, NULL,false, 0, 3));
    231 
    232       static int Sinus_xy[]={46,3,12,75,50,71,37,62,28,50,25,37,28,28,37,25,50,28,62,37,71,50,75,62,71,71,62,75,50,1,75,50,100,50,5,35,50,40,35,45,35,55,65,60,65,65,50};   
     231addClass(new NeuroClass(NI_Random_tab,"Generates random noise (subsequent random values in the range of -1..+1)",0,1,0, NULL,false, 0, 3, 15));
     232
     233       static int Sinus_xy[]={46,3,12,75,50,71,37,62,28,50,25,37,28,28,37,25,50,28,62,37,71,50,75,62,71,71,62,75,50,1,75,50,100,50,5,35,50,40,35,45,35,55,65,60,65,65,50};   
    233234static ParamEntry NI_Sinus_tab[]={
    234235{"Sinus generator",1, 2 ,"Sin",},
     
    238239 
    239240{0,0,0,},};
    240 addClass(new NeuroClass(NI_Sinus_tab,"Output frequency = f0+input",1,1,0, Sinus_xy,false, 0, 3));
     241addClass(new NeuroClass(NI_Sinus_tab,"Output frequency = f0+input",1,1,0, Sinus_xy,false, 0, 3, 15));
Note: See TracChangeset for help on using the changeset viewer.