Changeset 1170


Ignore:
Timestamp:
01/05/22 00:29:41 (3 years ago)
Author:
Maciej Komosinski
Message:

Added comments

Location:
framspy
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • framspy/FramsticksLib.py

    r1149 r1170  
    107107                for g in frams.GenePools[0]:
    108108                        serialized_dict = frams.String.serialize(g.data[frams.ExpProperties.evalsavedata._value()])
    109                         evaluations = json.loads(serialized_dict._string())
     109                        evaluations = json.loads(serialized_dict._string()) # Framsticks native ExtValue's get converted to native python types such as int, float, list, str.
    110110                        # now, for consistency with FramsticksCLI.py, add "num" and "name" keys that are missing because we got data directly from Genotype, not from the file produced by standard-eval.expdef's function printStats(). What we do below is what printStats() does.
    111111                        result = {"num": g.num._value(), "name": g.name._value(), "evaluations": evaluations}
  • framspy/recording-body-coords.sim

    r1169 r1170  
    5555}
    5656
     57
     58// If needed, you can modify the function below to record the bounding box of the agent (to know the extreme values of Part coordinates
     59// without recording the coordinates of all Parts), to record MechJoint propertes, Neuro signals etc. See available fields in
     60// http://www.framsticks.com/files/classdoc/c_creature.html
    5761function record(cr)
    5862{
Note: See TracChangeset for help on using the changeset viewer.