Changeset 480 for experiments/frams


Ignore:
Timestamp:
03/25/16 17:44:20 (9 years ago)
Author:
sz
Message:

experiment scripts updated to match the upcoming Framsticks version (ExpParams? ==> ExpProperties?, Fields ==> NeuroProperties?, prop: ==> property)

Location:
experiments/frams
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • experiments/frams/capture-the-flag/data/scripts/Flag.neuro

    r232 r480  
    1010function init(){
    1111//      Neuro.signals.add("Flag");
    12 //      Neuro.signals[0].flavor = Fields.team;
     12//      Neuro.signals[0].flavor = NeuroProperties.team;
    1313//      Neuro.signals[0].power = 0;
    1414}
     
    1616function go()
    1717{
    18         var output = Neuro.signals.receiveFilter("Flag", 2000, Fields.team, 0.5);
     18        var output = Neuro.signals.receiveFilter("Flag", 2000, NeuroProperties.team, 0.5);
    1919        Neuro.state = output;
    2020       
     
    2222~
    2323
    24 prop:
     24property:
    2525id:team
    2626name:Team number
  • experiments/frams/capture-the-flag/data/scripts/FlagDef.neuro

    r232 r480  
    1010function init(){
    1111//      Neuro.signals.add("Flag");
    12 //      Neuro.signals[0].flavor = Fields.team;
     12//      Neuro.signals[0].flavor = NeuroProperties.team;
    1313//      Neuro.signals[0].power = 0;
    1414}
     
    1717{
    1818        //Check own flag
    19         if (Neuro.signals.receiveFilter("Flag", 2000, Fields.my + 100, 0.5) > 0)
    20                 Neuro.state = Neuro.signals.receiveFilter("Flag", 2000, Fields.my + 100, 0.5);
     19        if (Neuro.signals.receiveFilter("Flag", 2000, NeuroProperties.my + 100, 0.5) > 0)
     20                Neuro.state = Neuro.signals.receiveFilter("Flag", 2000, NeuroProperties.my + 100, 0.5);
    2121        //Check opponent flag
    2222        //If flag is taken -> go to own flag
    23         else if (Neuro.signals.receiveFilter("Flag", 2000, Fields.opp + 100, 0.5) > 0) 
    24                 Neuro.state = Neuro.signals.receiveFilter("Flag", 2000, Fields.my, 0.5);
     23        else if (Neuro.signals.receiveFilter("Flag", 2000, NeuroProperties.opp + 100, 0.5) > 0)
     24                Neuro.state = Neuro.signals.receiveFilter("Flag", 2000, NeuroProperties.my, 0.5);
    2525        //else -> go to opponent flag
    2626        else
    27                 Neuro.state = Neuro.signals.receiveFilter("Flag", 2000, Fields.opp, 0.5);
     27                Neuro.state = Neuro.signals.receiveFilter("Flag", 2000, NeuroProperties.opp, 0.5);
    2828}
    2929~
    3030
    31 prop:
     31property:
    3232id:opp
    3333name:Opponent team number
    3434type:d
    3535
    36 prop:
     36property:
    3737id:my
    3838name:My team number
  • experiments/frams/capture-the-flag/data/scripts/capture-the-flag.expdef

    r233 r480  
    2828        World.wrldbnd = 2; //Teleport
    2929       
    30         ExpParams.memberssno = 4;
    31         ExpParams.teamsno = 2;
    32         ExpParams.mindistance = 60;
     30        ExpProperties.memberssno = 4;
     31        ExpProperties.teamsno = 2;
     32        ExpProperties.mindistance = 60;
    3333       
    34         ExpParams.pointsCapture = 10;
    35         ExpParams.pointsRetrieve = 5;
    36         ExpParams.pointsScoring = 50;
     34        ExpProperties.pointsCapture = 10;
     35        ExpProperties.pointsRetrieve = 5;
     36        ExpProperties.pointsScoring = 50;
    3737
    3838        //Styles of flags
     
    5050function onExpInit()
    5151{
    52         ExpParams_create_call();
     52        ExpProperties_create_call();
    5353
    5454}
     
    8484}
    8585
    86 function ExpParams_create_call(){
     86function ExpProperties_create_call(){
    8787        //Create GenePool and Population for each team
    8888        GenePools.clear();
     
    106106       
    107107        var i = 2;
    108         for (i = 2; i <= ExpParams.teamsno; i++){
     108        for (i = 2; i <= ExpProperties.teamsno; i++){
    109109                pop=Populations.addGroup("Team"+i);
    110110                pop.selfmask = 0x50001;
     
    124124}
    125125
    126 function ExpParams_fill_call(){
     126function ExpProperties_fill_call(){
    127127        var team = 0;
    128128        var player = 0;
     
    141141        var ok = 0;
    142142       
    143         for (i = 0; i < ExpParams.teamsno; i++){
     143        for (i = 0; i < ExpProperties.teamsno; i++){
    144144                points.add(0);
    145145                scored.add(0);
     
    149149       
    150150        //Clear Populations
    151         for (team = 0; team < ExpParams.teamsno; team++){
     151        for (team = 0; team < ExpProperties.teamsno; team++){
    152152                while (Populations[team].size > 0)
    153153                        Populations[team].delete(0);
     
    162162
    163163                ok = 1;         
    164                 while (flagsX.size < ExpParams.teamsno && ok == 1){
     164                while (flagsX.size < ExpProperties.teamsno && ok == 1){
    165165                        ok = 0;
    166166                        flagTries = 0;
     
    171171                                ok = 1;
    172172                                for (i = 0; i < flagsX.size; i++){
    173                                         if (Math.sqrt(Math.pow(flagsX[i] - x, 2)+Math.pow(flagsY[i] - y,2)) < ExpParams.mindistance){
     173                                        if (Math.sqrt(Math.pow(flagsX[i] - x, 2)+Math.pow(flagsY[i] - y,2)) < ExpProperties.mindistance){
    174174                                                ok = 0;
    175175                                                break;
     
    185185                }
    186186               
    187                 if (flagsX.size == ExpParams.teamsno)
     187                if (flagsX.size == ExpProperties.teamsno)
    188188                        done = 1;
    189189                else
     
    199199       
    200200        //Fill each team's Population with players and a flag and place players close to their flag
    201         for (team = 0; team < ExpParams.teamsno; team++){
     201        for (team = 0; team < ExpProperties.teamsno; team++){
    202202                while (Populations[team].size > 0)
    203203                        Populations[team].delete(0);
    204204               
    205                 var cr = Populations[team].add(GenePools[ExpParams.teamsno][team]);
     205                var cr = Populations[team].add(GenePools[ExpProperties.teamsno][team]);
    206206                placeFlag(cr);
    207207                cr.signals.add("Flag");
     
    214214                var crX, crY;
    215215               
    216                 for (player = 0; player < ExpParams.memberssno; player++){
     216                for (player = 0; player < ExpProperties.memberssno; player++){
    217217                        var pool=GenePools[team];
    218218                        cr = Populations[team].add(pool[player % pool.size]);
     
    235235}
    236236
    237 function ExpParams_default_call(){
     237function ExpProperties_default_call(){
    238238        //Insert default player genotype in team's GenePools
    239239        var team = 0;
    240         for (team = 0; team < ExpParams.teamsno; team++){
     240        for (team = 0; team < ExpProperties.teamsno; team++){
    241241                while (GenePools[team].size > 0)
    242242                        GenePools[team].delete(0);
     
    272272//              line=line+Simulator.time+";";
    273273//             
    274 //              for (i = 0; i < ExpParams.teamsno; i++){
     274//              for (i = 0; i < ExpProperties.teamsno; i++){
    275275//                      line=line+points[i]+";"+scored[i]+";"+taken[i]+";"+retrieved[i]+";";
    276276//              }
     
    299299       
    300300        //Score points for taking a flag
    301         creature.user3 += ExpParams.pointsCapture;
     301        creature.user3 += ExpProperties.pointsCapture;
    302302       
    303303//      Simulator.print("Flag "+(flag.group.index+1)+" taken by team "+(creature.group.index+1));
    304304       
    305305        //Update team points and events
    306         points[creature.population.index] = points[creature.population.index] + ExpParams.pointsCapture;
     306        points[creature.population.index] = points[creature.population.index] + ExpProperties.pointsCapture;
    307307        taken[creature.population.index] = taken[creature.population.index] + 1;
    308308
     
    325325
    326326        //Score points for retrieving a flag
    327         creature.user3 += ExpParams.pointsRetrieve;
     327        creature.user3 += ExpProperties.pointsRetrieve;
    328328       
    329329//      Simulator.print("Flag "+ (flag.group.index+1) +" retrieved");
    330330       
    331331        //Update team scores
    332         points[creature.population.index] = points[creature.population.index] + ExpParams.pointsRetrieve;
     332        points[creature.population.index] = points[creature.population.index] + ExpProperties.pointsRetrieve;
    333333        retrieved[creature.population.index] = retrieved[creature.population.index] + 1;
    334334}
     
    346346       
    347347        //Score points for scoring a flag
    348         creature.user3 += ExpParams.pointsScoring;
     348        creature.user3 += ExpProperties.pointsScoring;
    349349       
    350350//      Simulator.print("Team "+ (creature.group.index + 1) +" scored");
    351351       
    352352        //Update team points
    353         points[creature.population.index] = points[creature.population.index] + ExpParams.pointsScoring;
     353        points[creature.population.index] = points[creature.population.index] + ExpProperties.pointsScoring;
    354354        scored[creature.population.index] = scored[creature.population.index] + 1;
    355355}
     
    419419~
    420420
    421 prop:
     421property:
    422422id:teamsno
    423423name:Number of teams
    424424type:d 2 5
    425425
    426 prop:
     426property:
    427427id:memberssno
    428428name:Number of members in team
    429429type:d 1 8
    430430
    431 prop:
     431property:
    432432id:mindistance
    433433name:Minimal distance between flags
    434434type:d 1 100
    435435
    436 prop:
     436property:
    437437id:create
    438438name:Create teams
    439439type:p
    440440
    441 prop:
     441property:
    442442id:default
    443443name:Insert default player
    444444type:p
    445445
    446 prop:
     446property:
    447447id:fill
    448448name:Fill teams
    449449type:p
    450450
    451 prop:
     451property:
    452452id:pointsCapture
    453453name:Points for flag capture
    454454type:d 0 100
    455455
    456 prop:
     456property:
    457457id:pointsRetrieve
    458458name:Points for flag retrieve
    459459type:d 0 100
    460460
    461 prop:
     461property:
    462462id:pointsScoring
    463463name:Points for scoring a flag
  • experiments/frams/capture-the-flag/data/scripts/threshold2.neuro

    r232 r480  
    2020function go()
    2121{
    22   if (Neuro.weightedInputSum >= Fields.t)
    23     Neuro.state = Fields.hi;
    24   else if (Neuro.weightedInputSum <= -Fields.t)
    25     Neuro.state = Fields.lo;
     22  if (Neuro.weightedInputSum >= NeuroProperties.t)
     23    Neuro.state = NeuroProperties.hi;
     24  else if (Neuro.weightedInputSum <= -NeuroProperties.t)
     25    Neuro.state = NeuroProperties.lo;
    2626  else
    2727    Neuro.state = Neuro.weightedInputSum;
     
    2929~
    3030
    31 prop:
     31property:
    3232id:t
    3333name:threshold
    3434type:f
    3535
    36 prop:
     36property:
    3737id:lo
    3838name:low output value
    3939type:f
    4040
    41 prop:
     41property:
    4242id:hi
    4343name:high output value
  • experiments/frams/deathmatch/data/scripts/deathmatch-levels.inc

    r231 r480  
    22// 1. global variable levels
    33// 2. function initLevels() that initializes levels structure
    4 // 3. function nextLevel() that puts into ExpParams.level variable the value of next level's index (or -1 if random)
     4// 3. function nextLevel() that puts into ExpProperties.level variable the value of next level's index (or -1 if random)
    55
    66// descriptions of game levels
  • experiments/frams/deathmatch/data/scripts/deathmatch-smellPopulation.neuro

    r231 r480  
    1515function go()
    1616{
    17   if (Populations.size>Fields.pop)
    18         Neuro.state = Populations[Fields.pop].senseCreaturesProperty(
     17  if (Populations.size>NeuroProperties.pop)
     18        Neuro.state = Populations[NeuroProperties.pop].senseCreaturesProperty(
    1919                Neuro.position_x, Neuro.position_y, Neuro.position_z,
    2020                "energy", Neuro.creature);
     
    2424~
    2525
    26 prop:
     26property:
    2727id:pop
    2828name:population
  • experiments/frams/deathmatch/data/scripts/deathmatch.expdef

    r233 r480  
    9797  //add Teams populations (group above 2)
    9898  var i = 0;
    99   teams = ExpParams.teamCount;
     99  teams = ExpProperties.teamCount;
    100100  if (teams == 1)
    101101        teams = GenePools[0].size;
     
    128128  for (var i = 0; i < Populations.size - 2; i++)
    129129  {
    130         for (var j = 0; j < ExpParams.teamSize; j++)
     130        for (var j = 0; j < ExpProperties.teamSize; j++)
    131131        {
    132132          var g; //Genotype object
    133           if (ExpParams.teamCount != 1)
     133          if (ExpProperties.teamCount != 1)
    134134            g = GenePools[0].random();
    135135          else
     
    179179{
    180180  var levelNumber;
    181   if (ExpParams.level == -1)
     181  if (ExpProperties.level == -1)
    182182    levelNumber = Math.random(levels.size);
    183183  else
    184     levelNumber = ExpParams.level;
     184    levelNumber = ExpProperties.level;
    185185
    186186  var level = levels.get(levelNumber);
     
    198198function tryCreateHPBox()
    199199{
    200   if (Populations[0].size >= ExpParams.hpBoxTotalCount) return;
    201  
    202   if (Math.rnd01 > ExpParams.hpBoxProbability) return;
     200  if (Populations[0].size >= ExpProperties.hpBoxTotalCount) return;
     201 
     202  if (Math.rnd01 > ExpProperties.hpBoxProbability) return;
    203203 
    204204  var food = Populations[0].add("//0\nm:Vstyle=hpbox\np:");
    205205  food.name = "HP Box";
    206   food.idleen = ExpParams.hpBoxIdleEnergy;
    207   food.energ0 = ExpParams.hpBoxStartingEnergy;
     206  food.idleen = ExpProperties.hpBoxIdleEnergy;
     207  food.energ0 = ExpProperties.hpBoxStartingEnergy;
    208208  food.energy = food.energ0;
    209209  food.nnenabled = 0;
     
    212212function tryCreateUpgradeBox()
    213213{
    214   if (Populations[1].size >= ExpParams.upgradeBoxTotalCount) return;
    215  
    216   if (Math.rnd01 > ExpParams.upgradeBoxProbability) return;
     214  if (Populations[1].size >= ExpProperties.upgradeBoxTotalCount) return;
     215 
     216  if (Math.rnd01 > ExpProperties.upgradeBoxProbability) return;
    217217 
    218218  var weapon = Populations[1].add("//0\nm:Vstyle=weaponbox\np:");
    219219  weapon.name = "Weapon Box";
    220   weapon.idleen = ExpParams.upgradeBoxIdleEnergy;
    221   weapon.energ0 = ExpParams.upgradeBoxStartingEnergy;
     220  weapon.idleen = ExpProperties.upgradeBoxIdleEnergy;
     221  weapon.energ0 = ExpProperties.upgradeBoxStartingEnergy;
    222222  weapon.energy = weapon.energ0;
    223223  weapon.nnenabled = 0;
     
    244244          cr.user2 = [0,0,0,0,0,0]; //kills (0), assists (1), total damage dealt (2), total damage received (3), HP boxes collected (4), Upgrade boxes collected (5)
    245245          cr.user3 = []; //who dealt damage to this creature
    246           cr.energ0 = ExpParams.creatureStartingEnergy;
     246          cr.energ0 = ExpProperties.creatureStartingEnergy;
    247247          cr.energy = cr.energ0;
    248248      place_inTeamSpot(cr);
     
    284284
    285285  var x, y, z;
    286   x = (ExpParams.teamSpawningAreaSize) * Math.rnd01 - cr.size_x / 2 - ExpParams.teamSpawningAreaSize/2;
    287   y = (ExpParams.teamSpawningAreaSize) * Math.rnd01 - cr.size_y / 2 - ExpParams.teamSpawningAreaSize/2;
     286  x = (ExpProperties.teamSpawningAreaSize) * Math.rnd01 - cr.size_x / 2 - ExpProperties.teamSpawningAreaSize/2;
     287  y = (ExpProperties.teamSpawningAreaSize) * Math.rnd01 - cr.size_y / 2 - ExpProperties.teamSpawningAreaSize/2;
    288288 
    289289  //vector of length half the world size minus spawning area size
    290   var vect = [0.0 + World.wrldsiz/2 - ExpParams.teamSpawningAreaSize/2 - 1.0, 0.0];
     290  var vect = [0.0 + World.wrldsiz/2 - ExpProperties.teamSpawningAreaSize/2 - 1.0, 0.0];
    291291  vect = rotateVector(vect, radius);
    292292 
     
    366366function applySuddenDeathModifier()
    367367{
    368   if (idleSimulationSteps < ExpParams.stagnationInterval) return;
     368  if (idleSimulationSteps < ExpProperties.stagnationInterval) return;
    369369
    370370  for (var i = 2; i < Populations.size; i++)
    371371    for (var cr in Populations[i])
    372       cr.energy -= ExpParams.stagnationHealthReduce;
     372      cr.energy -= ExpProperties.stagnationHealthReduce;
    373373}
    374374
     
    384384            if (cr.user1[0] > 0) cr.user1[0]=cr.user1[0] - 1;
    385385            if (cr.user1[0] < 0) cr.user1[0]=0.0;
    386             if (cr.user1[1] > 0) cr.user1[1]=cr.user1[1] - ExpParams.upgradeBoxDecay;
     386            if (cr.user1[1] > 0) cr.user1[1]=cr.user1[1] - ExpProperties.upgradeBoxDecay;
    387387            if (cr.user1[1] < 0) cr.user1[1]=0.0;
    388388          }
     
    432432function print(msg)
    433433{
    434   if (ExpParams.debug)
     434  if (ExpProperties.debug)
    435435    Simulator.print(msg);
    436436}
     
    483483  var dice2 = 0;
    484484  var changed = 0;
    485   for (var i = 0; i < ExpParams.diceCount; i++)
    486   {
    487     dice1 = dice1 + Math.random(ExpParams.diceSides) + 1;
    488         dice2 = dice2 + Math.random(ExpParams.diceSides) + 1;
    489   }
    490   var energy1 = 0.0 + ExpParams.creatureDamage * dice1;
    491   var energy2 = 0.0 + ExpParams.creatureDamage * dice2;
    492   energy1 += ExpParams.upgradeMultiplier * c1.user1.get(1);
    493   energy2 += ExpParams.upgradeMultiplier * c2.user1.get(1);
     485  for (var i = 0; i < ExpProperties.diceCount; i++)
     486  {
     487    dice1 = dice1 + Math.random(ExpProperties.diceSides) + 1;
     488        dice2 = dice2 + Math.random(ExpProperties.diceSides) + 1;
     489  }
     490  var energy1 = 0.0 + ExpProperties.creatureDamage * dice1;
     491  var energy2 = 0.0 + ExpProperties.creatureDamage * dice2;
     492  energy1 += ExpProperties.upgradeMultiplier * c1.user1.get(1);
     493  energy2 += ExpProperties.upgradeMultiplier * c2.user1.get(1);
    494494  if (c1.population == c2.population)
    495495  {
    496     energy1 = ExpParams.friendlyFireDamageMultiplier * energy1;
    497         energy2 = ExpParams.friendlyFireDamageMultiplier * energy2;
     496    energy1 = ExpProperties.friendlyFireDamageMultiplier * energy1;
     497        energy2 = ExpProperties.friendlyFireDamageMultiplier * energy2;
    498498  }
    499499 
     
    511511    c1.energy = c1.energy - energy2;
    512512        if (c1.energy < 0) c1.energy = 0;
    513     print(c2.name + " [" + c2.population.name + "] rolled " + dice2 + " and dealt " + energy2 + " [+" + (ExpParams.upgradeMultiplier * c2.user1[1]) +" bonus] damage to " + c1.name + " [" + c1.population.name + "]");
    514         c2.user1.set(0, ExpParams.attackCooldown);
     513    print(c2.name + " [" + c2.population.name + "] rolled " + dice2 + " and dealt " + energy2 + " [+" + (ExpProperties.upgradeMultiplier * c2.user1[1]) +" bonus] damage to " + c1.name + " [" + c1.population.name + "]");
     514        c2.user1.set(0, ExpProperties.attackCooldown);
    515515        c2.user2.set(2, c2.user2[2] + energy1);
    516516        c1.user2.set(3, c1.user2[3] + energy1);
     
    543543    c2.energy = c2.energy - energy1;
    544544        if (c2.energy < 0) c2.energy = 0;
    545     print(c1.name + " [" + c1.population.name + "] rolled " + dice1 + " and dealt " + energy1 + " [+" + (ExpParams.upgradeMultiplier * c1.user1[1]) +" bonus] damage to " + c2.name + " [" + c2.population.name + "]");
    546     c1.user1[0] = ExpParams.attackCooldown;
     545    print(c1.name + " [" + c1.population.name + "] rolled " + dice1 + " and dealt " + energy1 + " [+" + (ExpProperties.upgradeMultiplier * c1.user1[1]) +" bonus] damage to " + c2.name + " [" + c2.population.name + "]");
     546    c1.user1[0] = ExpProperties.attackCooldown;
    547547        c1.user2[2] = c1.user2[2] + energy1;
    548548        c2.user2[3] = c2.user2[3] + energy1;
     
    588588function onFoodCollision()
    589589{
    590   if (ExpParams.pickupNotStagnation == 1) idleSimulationSteps = 0;
     590  if (ExpProperties.pickupNotStagnation == 1) idleSimulationSteps = 0;
    591591
    592592  //collect HP Box (by eating it :D)
     
    605605function onUpgradesCollision()
    606606{
    607   if (ExpParams.pickupNotStagnation == 1) idleSimulationSteps = 0;
     607  if (ExpProperties.pickupNotStagnation == 1) idleSimulationSteps = 0;
    608608
    609609  //collect Upgrade Box (by eating it :D)
     
    643643
    644644//reinit populations on change
    645 function ExpParams_teamCount_set()
     645function ExpProperties_teamCount_set()
    646646{
    647647  initPopulations();
    648648}
    649649
    650 function ExpParams_level_set()
     650function ExpProperties_level_set()
    651651{
    652652  initLevel();
     
    657657# Team
    658658
    659 prop:
     659property:
    660660id:teamCount
    661661name:Number of teams in Deathmatch
     
    664664help:If set to 1, the number of teams will be equal to the number of genotypes in gene pool.
    665665
    666 prop:
     666property:
    667667id:teamSize
    668668name:Number of creatures per team
     
    670670group:Team
    671671
    672 prop:
     672property:
    673673id:teamSpawningAreaSize
    674674name:Spawning area size for team
     
    676676group:Team
    677677
    678 prop:
     678property:
    679679id:creatureStartingEnergy
    680680name:Starting energy of creature
     
    686686# Attack parameters
    687687
    688 prop:
     688property:
    689689id:diceSides
    690690name:Number of sides of dices
     
    692692group:Attack rules
    693693
    694 prop:
     694property:
    695695id:diceCount
    696696name:Number of dices to roll per attack
     
    698698group:Attack rules
    699699
    700 prop:
     700property:
    701701id:creatureDamage
    702702name:Basic damage multiplied by result of dice roll
     
    704704group:Attack rules
    705705
    706 prop:
     706property:
    707707id:friendlyFireDamageMultiplier
    708708name:Multiplier of energy taken when Creatures of the same team collide
     
    711711help:Set to 0 for no friendly fire, set to 1 if full damage should be dealt when interacting with team member
    712712
    713 prop:
     713property:
    714714id:attackCooldown
    715715name:Number of simulation steps between two consecutive attacks of a creature
     
    721721# Collectibles - HP Boxes & Upgrades
    722722
    723 prop:
     723property:
    724724id:pickupNotStagnation
    725725name:Collectible pick-up resets stagnation counter?
     
    727727help:If set to true picking up an item will restart counting towards stagnation, effects in longer battles.
    728728
    729 prop:
     729property:
    730730id:hpBoxStartingEnergy
    731731name:Starting energy of HP Box
     
    734734help:Base starting energy level for HP Box
    735735
    736 prop:
     736property:
    737737id:hpBoxIdleEnergy
    738738name:Amount of energy lost by HP Box
     
    741741help:How much energy HP Box looses each step (0 - it will not disappear)
    742742
    743 prop:
     743property:
    744744id:hpBoxProbability
    745745name:Probablity that new HP Box will spawn
     
    748748help:Probability of HP Box appearing each step of simulation
    749749
    750 prop:
     750property:
    751751id:hpBoxTotalCount
    752752name:Maximum number of HP Boxes on the field
     
    755755help:The total number of HP Boxes on the field will never exceed this number
    756756
    757 prop:
     757property:
    758758id:upgradeBoxStartingEnergy
    759759name:Starting energy of Upgrade Box
     
    762762help:Base starting energy level for Upgrade Box
    763763
    764 prop:
     764property:
    765765id:upgradeBoxIdleEnergy
    766766name:Amount of energy lost by Upgrade Box
     
    769769help:How much energy Upgrade Box looses each step (0 - it will not disappear)
    770770
    771 prop:
     771property:
    772772id:upgradeBoxProbability
    773773name:Probablity that new Upgrade Box will spawn
     
    776776help:Probability of Upgrade Box appearing each step of simulation
    777777
    778 prop:
     778property:
    779779id:upgradeBoxTotalCount
    780780name:Maximum number of Upgrade Boxes on the field
     
    783783help:The total number of Upgrade Boxes on the field will never exceed this number
    784784
    785 prop:
     785property:
    786786id:upgradeBoxDecay
    787787name:How fast upgrade boost fades from creature
     
    790790help:Each step creature damage bonus will be decreased by given amount until it reaches 0
    791791
    792 prop:
     792property:
    793793id:upgradeMultiplier
    794794name:Multiplier of bonus damage
     
    800800# Other
    801801
    802 prop:
     802property:
    803803id:level
    804804name:Level
     
    806806help:Number of a level to battle (-1 is random)
    807807
    808 prop:
     808property:
    809809id:stagnationInterval
    810810name:Number of idle simulation steps before Sudden Death
     
    812812help:If no combat occurs during given number of steps, the Sudden Death mode is turned on (0 = Sudden Death all the time)
    813813
    814 prop:
     814property:
    815815id:stagnationHealthReduce
    816816name:Sudden Death health reduce
     
    818818help:If Suddent Death is turned on, creatures will lose given amount of HP each simulation step
    819819
    820 prop:
     820property:
    821821id:debug
    822822name:Show additional debug messages
  • experiments/frams/evolve-speed-vs-gravity/data/scripts/evolve-speed-vs-gravity.script

    r461 r480  
    88        World.wrldg=gravity;
    99        Populations[0].perfperiod=100000; //fitness: velocity serves as distance (because sampling period is longer than lifespan)
    10         ExpParams.initialgen="XX[|,1:1][N,1:1,2:1][T][G]";
     10        ExpProperties.initialgen="XX[|,1:1][N,1:1,2:1][T][G]";
    1111       
    1212        //custom fitness function: velocity minus small penalty for complexity (high number of parts, joints, neurons, connections)
  • experiments/frams/logic/data/scripts/logic_abduction.expdef

    r169 r480  
    4343{
    4444        //Initialization of the experiment parameters loaded from file
    45         g_params = String.split(ExpParams.params, ";");
     45        g_params = String.split(ExpProperties.params, ";");
    4646        if(g_params.size == 3)
    4747        {
     
    252252~
    253253
    254 prop:
     254property:
    255255id:params
    256256name:Logical experiment parameters
  • experiments/frams/multi-threading/data/scripts/test-mt.script

    r462 r480  
    55function main_args(complexify_geno,timeinterval,intervals)
    66{
    7         // ExpParams.mix_period (percentage of the gene pool capacity) is kept at the default value (1000%)
     7        // ExpProperties.mix_period (percentage of the gene pool capacity) is kept at the default value (1000%)
    88
    99        Math.randomize();
    1010        //Simulator.expdef="standard-mt"; //set multithreaded experiment; this is done by the shell script
    1111       
    12         ExpParams.initialgen="XX[|,1:1][N,1:1,2:1][T][G]";
     12        ExpProperties.initialgen="XX[|,1:1][N,1:1,2:1][T][G]";
    1313        for(var i=0;i<complexify_geno;i++) //make a big genotype by doubling the simple one above. Note: exponential!
    14                 ExpParams.initialgen=ExpParams.initialgen+ExpParams.initialgen;
     14                ExpProperties.initialgen=ExpProperties.initialgen+ExpProperties.initialgen;
    1515       
    1616        Simulator.init();
     
    2626                if (iter==(intervals-1))
    2727                    Simulator.stop();
    28                 Simulator.print("iter=%d, simsteps=%d, evals=%d, migrations=%d, gen_count=%d, avg_numparts=%g, fit_avg=%g, fit_max=%g, time=%f, migration_time=%f, T=%d, C=%d" % iter % Simulator.stepNumber % ExpState.totaltests % ExpState.migrations % stats.gen_count % stats.st_avg_numparts % stats.st_avg_fit % stats.st_max_fit % (Math.time-t0) % ExpState.migration_time % ExpParams.threads % ExpParams.capacity);
     28                Simulator.print("iter=%d, simsteps=%d, evals=%d, migrations=%d, gen_count=%d, avg_numparts=%g, fit_avg=%g, fit_max=%g, time=%f, migration_time=%f, T=%d, C=%d" % iter % Simulator.stepNumber % ExpState.totaltests % ExpState.migrations % stats.gen_count % stats.st_avg_numparts % stats.st_avg_fit % stats.st_max_fit % (Math.time-t0) % ExpState.migration_time % ExpProperties.threads % ExpProperties.capacity);
    2929                Simulator.print(GenePools[0].best().genotype);
    3030        }
Note: See TracChangeset for help on using the changeset viewer.