Author Topic: 2.42.7 Changes  (Read 2759 times)

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
2.42.7 Changes
« on: June 15, 2006, 09:33:10 PM »
This topic is just a place for me to keep track of the changes I make from one version to another, in this case from 2.42.6 to 2.42.7. It is not the complete list of stuff in the next drop (yet) just the stuff I have completed to date. I will edit this post as I complete changes and start a new topic for each new release.

If there is a zipped exe attached to this topic, it is a stable buddy drop which you are more than welcome to try.  Such 'between release' exes will have letters following the release version e.g. 2.42.6a.

If you have feature requests or bug reports for this version, please report those as separate topics.

1) Added divide by zero protection to releasenrg().  Not quite sure how it happens, but very rarely in a logn run evo sim, I will catch a case where the shot range of a shot -1 shot causing the release of a -2 shot is zero.  A range of zero results in a divide by zero error in this routine when the power of the return shot is calculated.  I now catch when the range is 0 and set the power to 0, but it remains to be investigated how a 0 range shot is being created in the first place.  Shot ranges are the number of cycles the shot should last.  I know of no code which can create a shot with 0 range, though I have yet to look very hard...
2) Exact same thing as 1) above, but for releasebod()
3) New shot collision algorithm that weeds out a lot of bots for consideration using a super fast distance check involving no vector math as well as further refining the quadratic factor approach.  Much speed improvement here.
4) Changed no shot decay mode to apply only to nrg shots.  Will likely expand upon this shortly.
5) Changed the dynamic costs feature such that the target population includes only extant hetertrophs.  This excludes corpses, walls and veggies.
5) Shot impacts now display a small circle of radius 20 at the point of impact.  Note that due to the quantum nature of cycles, this may not display on the edge of a bot since the impact may have happened mid cycle and the bot and shot are displayed end-cycle.  The circle's color is dictated by the type of shot that impacted.
6) Fixed an issue where default mutation values were getting set when saved robots were loaded either as part of a sim or individually.  The issue was that the mutation values were being defaulted after some of the mutation settings were read in from the saved bot section of the file.
7) The dynamic cost multipler was being zeroed, overriding whatever was loaded in from the sim file when a sim was loaded becuase the bot population is zero until after the first cycle executes.  Now the bot population is artifically set to the target population for the first cycle.  The net effect is that the cost multipler is correctly applied when loaded from a saved sim file and not set to 0 as before.
8) Doubled the strength of the field wall repulsion force in preperation for trying to do something with walls.
9) Energy decay corpses were giving off energy shots all in a single direction.  Moved the calls to randomize the aim above the calls to NewShot() in the Decay routine.  Now the direction of decay energy shots is random.
10) Shot/bot collision detection was using the positions of the shot/bot from the end of the last cycle, but the velocities as updated in the current cycle.  This resulted in a delay of 1 cycle in detected collisions, the display of shots one cycle after they have already impacted (generally inside the impacted bot) and pontential missed collisions due to brownian motion, bot-bot collisions or bot initiated motion which changes the bot velocity after impact.
11) Fixed a bug in which now that shots can be prevented from decaying, the Shots array was not being re-dimensioned in large enough chunks which resulted in potential "locked array" bugs.  It's now re-dimensioned in units of 500.
12) In sims with fluid density=0, the sphere drag routine could cause bot velocities to get progressivly smaller and smaller but never reach 0, eventually resulting in an overflow of the Single valued velocity varibles. I now avoid the drag routine all together when density is 0 (without fluid desity there is no drag - friction yes, but not drag) and added some protection code which now sets very very small velocities to zero in such cases.
13) Changed the restriction on veggy repopulation to use the veggy population toggle value from the previous cycle.  Veggies which have the ability to self-reproduce (which could be written in from the beginning or aquired via mutation or a virus) are artificially restricted from reproducing if the veggy population is above the max level set in the General tab.  Before, if the number of veggies was N below this threshold, the first N attempting to reproduce in a cycle would suceed, the rest would fail.  This seems unfair.  So now if the number of veggies is below the threshold at the beginning of the cycle, each veggy gets a chance to reproduce that cycle even if it takes the veggy population over the threshold.
14) Long valued temp variables were being used in FeedVegs() to calulcate the nrg to add each cycle.  VB was rounding them to 0 for very small body bots using per kilobody feeding.  Changed them to singles.  Now small bots get fed.
15) A attempt to make a virus using a very long gene (>16k) was overflowing .Vtimer when multiplied by 2 in MakeVirus.  Changed .Vtimer to a long and prevented it from exceeding 32000 (it gets put into the mem array).  Also added checks for DNALen >32000 in various routines.  Genomes should now be prevented from exceeding 32000 and if such a bot does occur, the information past 32000 is ignored for the purposes of counting genes, determining .vloc locations, etc.
16) Small tweak to ManageDeath so that neg has to actually fall to 0 instead of be below 1 in order to die.
17) Shapes subsystem added and enabled.
18) The day/night cycle counter and the daytime state are now saved and loaded from sim files (but not settings files - I think it inappropriate to save sim-specific state such as this in settings files).  This should allow saved sims using day/night cycles to not get reset to dawn when reloaded.  Additionally, the maximum allowable day/night cycle interval was increased to 32000 cycles, making an entire "day" up to 64000 cycles long.  This value is already stored in sim files as an integer.  I could change this to a long and added some backward compatability logic if people really wanted longer day/night cycles than this, but I think this should probably meet the needs.
19) The veggy repopulate algorithm was using a random number generator which truncated a Long to an Int.  This had the effect of chopping off the high bits of the positions for re-populations and clumping repopulated veggies together, generaly in the upper left corner of the field.  Now a true Long-valued random number is used and repopulations are random across the area defined as the starting area for the veggy species.  By default, this is the entire field.
20) The veggy nrg/body distribution slider control code was hooked to the click event instead of the change event.  This casued random behaviour when trying to use the control.  Now it works as expected.
21) The Upper and Lower target ranges as a percent from the target value are now individually configurable for dynamic costs.
22) The Upper and Lower ranges for the target population are now displayed in the Auto Cost Stats graph.
23) FIxed a bunch of potentially crashing overflow bugs where longs where being converted to singles in the take shot routines.
24) Added a line in ListCells() which zeros out the last element in the array if the array of cells is 50 or more.  Autosave was casuing an overflow when the best bot was a connected series of greater than 50 bots.  This can occur when a fast replication mutation happens and a whoel series of "cotten candy" bots are all strung together by their birth ties.  Now, only the first 50 cells are auto-saved.
25) makeoccurrlist() was not being called when bots where manually inserted using the insert bot drop down menu and the mouse.  This casued all sorts of problems liek .myeye never being set.  Now the right thing happens.
« Last Edit: July 02, 2006, 03:14:19 PM by EricL »
Many beers....