Changeset 1305 for framspy


Ignore:
Timestamp:
05/11/24 16:51:08 (6 months ago)
Author:
Maciej Komosinski
Message:

Cosmetic

File:
1 edited

Legend:

Unmodified
Added
Removed
  • framspy/recording-body-coords.sim

    r1221 r1305  
    55# If STORE_ALL_PART_COORDS=0 below, only COG is stored and the format is
    66# [ [cog1x,cog1y,cog1z], [cog2x,cog2y,cog2z], [cog3x,cog3y,cog3z], ...]
    7 # where numbers are simulation steps.
     7# where index numbers in the names are simulation steps.
    88# So you get a vector of COG x,y,z coordinates repeated for every simulation step.
    99#
    1010# If STORE_ALL_PART_COORDS=1 below, the format is more verbose with one more level of nesting, because after the COG,
    11 # the list of coordinates of all Parts follows (the first number below is the simulation step, the second is Part number)
     11# the list of coordinates of all Parts follows (the first index in the names below is the simulation step, the second one is Part number)
    1212# [ [[cog1x,cog1y,cog1z], [p1_1x,p1_1y,p1_1z], [p1_2x,p1_2y,p1_2z], ...], ...]
    1313#
     
    2525{
    2626        super_onBorn(cr);
    27         cr.data->bodyrecording=[]; //create key and initialize its value in the "data" dictionary
     27        cr.data->bodyrecording=[]; //in the creature's "data" dictionary, create the key "bodyrecording" and initialize its value to empty vector. Equivalent to cr.data["bodyrecording"]=[]
    2828}
    2929
     
    4949        super_addGenotypePerformanceFromCreature(g, cr);
    5050
    51         g.data->bodyrecording = cr.data->bodyrecording; //no averaging or any other form of aggregation - here assuming we only evaluate a genotype once; if not, then we ignore (overwrite) recordings from previous evaluations
     51        g.data->bodyrecording = cr.data->bodyrecording; //no averaging or any other form of aggregation - here assuming we only evaluate a given Genotype object once; if not, then we ignore (overwrite) recordings from previous evaluations of this genotype
    5252       
    5353        //Simulator.print("Recorded time steps: %d" % g.data->bodyrecording.size); //just for debugging
Note: See TracChangeset for help on using the changeset viewer.