Author Topic: 2.42.6 Changes  (Read 4445 times)

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
2.42.6 Changes
« on: May 28, 2006, 11:32:29 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.5 to 2.42.6.  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 you have feature requests or bug reports for this version, please report those as separate topics.

1) Fixed a bug in the new energy/species graphs.  Wouldn't you know it, I broke this right before I released 2.42.5 when I modifed the graph update routine feedgraph() to only update graphs that were visable so as to improve performance when using graphs.  When copying and pasting, I inadvertedly included the lines which average the energy by the number of members in the species.  Thus, the values displayed in the graph in 2.42.5 are an average energy per invidiual of that species as opposed to the total energy for the species as was intended and as is now the case in 2.42.6.
2) Poff shots are now ignored for the purposes of shot/bot collision detection.  I use a shot type of -100 to indicate poff shots and updateshots() now doesn't bother to call the collision detection routine for shots of this type.  This should help performance some and also makes it impossible for poff shots to be absorbed.  Prior to this release, poff shots were of type -2 and each contained 240 nrg which could be absorbed.  This will also help any future functionality which replies upon conservation of sim energy as this was one of the places nrg could sneak into the sim.
3) The Shots array was not being reset when a new sim was started.  Any shots which existed in a previous sim would live out their lives in the new one, giving the impression of mystery shots appearing out of nowhere for the first few cycles of a new simulation.  Shots is now reset in StartSimul().  Kudos to Elite for this find.
4) Addressed an overflow issue in SphereCd().  When simulating fliudity (using the "transitory fluid" option) bots with very low velocity can result in a very low Reynolds number which is used as the denominator for the drag force on a bot.  This can overflow the retrun value.  This is the bug illustrated by the sims posted by both Testlund and Shvarz in this thread.
5) Fixed an issue with the robot and veg counters being displayed incorrectly.  Depending upon when the timer went off, it was possible to display partially calculated values for these counters in the tray.  This was exhasberated by the addition of new DoEvents() calls in 2.42.5 which made the UI more responsive, but also opened the door for updating the tray display before the robots loop had completed.  Now, new counter display variables are atomicaly updated from the intermeitent counters at the top of UpdateBots() and the tray displays these valuse, which are now valid anytime.
6) The hashes in saved bot files weren't matching what was being calculated when saved bot DNA files were loaded.  This was causing errors when loading saved bots.  The issue was that TokenizeDNA was adding gene separation lines, messing up the hash calculation, as well as some CrLf issues having to do with bots without End statements.  I now ignore CrLfs for the purposes of calculating hashes and also pass a flag to TokenizedDNA indicating whether to add the gene separation lines that you see when displaying DNA in the bot's properties dialog.
7) Autosave... from the file menu was going to the wrong dialog tab.
8) Shots now bouce off the edges of the field if non-toridal.
9) Added an option to prevent shot decay.  Here's the thinking on this one.  Energy can leave the sim in a number of ways, through costs as bots do things, through death in the form of energy converted to body, venom, shell, etc., directly through death due to shock or altzemiers or through shots.  Let's say you wanted a sim where the only way energy could really leave the sim was, slowly, predictably, through costs where total energy loss was comenserate with actions.  Using corpse mode would no decay handles death issuses but there would still be a ton of energy being thrown away in energy shots.  For sims with shot bots, this is probably the primary way energy is lost in a sim.  So, now we have the option to make shots - shots of all kinds except Poffs - last forever or at least until they impact a bot.
10) The total sim energy now includes energy wrapped up in -2 shots.
11) Fixed a bug in calculating the sim energy for the last 10 cycles which impacted the nrg ratio calculation.  Depending upon when the timer fired to update the tray, the calculation could include the current cycle's energy which may or may not have been calculated yet.  Now the calculatiuon used is the difference between the sim energy in the (n-1)th cycle and the average sim energy of the n-1 through n-10 cycles.
12) Postive values of Shotval are now mod 1000 before being used.  Negative values are ((.shottype + 1) Mod 7) - 1.  This should not have any impact on hand coded bots but should help evolved bots acheive functional behaviour sooner then they might otherwise since before the vast majority of possible evolved shot types didn't do anything.  Now they all do something (except shotval 0).
13) Small tweaks to improve graph readability.  Fixed issue with data sometimes being off the top.  Changed color of graph background and label text to match Windows defaults.
14) Added the Energy Management button and dialog to the General tab on the Options dialog.  Had to do this as a new dialog as we have reached the max number of controls allowed by VB on the otpions dialog.  Moved the day/night cycles settings controls to this dialog.  Added two new sets of controls which force the sun up or down, overriding the day/night cycles setting if it is set, for greater control over the energy coming into the simulation via autotrofs.
15) Added conditions in ZoomOut() to prevent overflows when zooming out on an unlocked field excessivly far.
16) Cleaned up behaviour of Fluid and Friction settings on physics tab.  Now when selecting one of the preset radio button options, either fluid or solid, the other is zeroed and the appropriate underlying values are set.   People who want physics with aspects of both fluid and sufrace resistnace can use the custom dialog.
17) Added a check in SphereDragFroces() to prevent the resistance vector from excedding the bot's velocity.  Also changed the routine so that the resistance is applied to the bot's velocity directly to avoid strange hardmonic oscillation issues with bots under power down the road.
18) Fixed an overflow issue having to do with saved sims with wacky mutation probability values.  Described here.
19) Added the Auto Costs feature on the costs dialog along with the new Auto Cost Stats chart.  This feature allows for the simulation costs to be dynamicaly modifed over time so as to try and maintain the sim bot population near a specified target.  Look for a complete feature description in a separate topic.
20) Set robfocus = 0 at the bottom of KillRobot to get rid of the eye viewer thingy when bots are right-click killed.
21) Added new autosave options for stripping mutation details and deleting old files.  The strip mutation details option is pretty self explanitory, the mutation details are removed from auot-saved sim files, the same as with a manual save using the File menu item.  The deleting old files option removes from the hard drive the file with the same root name whose counter number is 10 less than the file just saved.  This has the effect of keeping only the last 10 autsaved files when enabled.  The option will not retroactivly delete files when enabled so if it is enabled and there are files of the same root name on the drive with counter numbers less than 10 below the current counter, they will not be deleted.
22) Scary....  Fixed Genepos(), Genenum(), NextStop() and DeleteSpecificGene() to work correctly.  Looks like they were never tested in the 2.4 fork as they were looking for the wrong sysvar values.  .delgene shoudl work now as well as some mutation types such as deletions that probably weren't working before.
23) Right click menu invocation of the bot properties dialog not populates the dialog immediatly without having to wait a cycle.  Also the gene number is populated immediatly on either a right click or double click invocation of the properties dialog.
24) Made touch senses work again.  The call to touch() was never ported with the new collision detection stuff.
25) Fixed a .shootval bug where postitive shots were being charged the energy value in .shootval.  Now they are only charged the shot cost.
26) Modified shot collision routine to use quadratic algorthym for perf.
27) Modified FirstSlot() routine so that finding a slot for a new shot now uses the index shotpointer.  The Shots array is no longer assumed to be packed, maxshotarray is used for shot routine looping now instead of maxshots and shotpointer is just the place to start looking in the aray for an empty shot.  We set this to the location were shots are deleted so hopefully a lot of the time, FirstSlot() retruns really fast since the first place it looks is an empty slot.  Not as good as a hash table or using linked lists, but faster than it was.
28) Added the "Fix Bot Radii" option which disables dynamic bot radii.
« Last Edit: June 14, 2006, 03:34:15 PM by EricL »
Many beers....

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
2.42.6 Changes
« Reply #1 on: June 15, 2006, 07:55:24 AM »
Could you explain what dynamic bot radii is?
The internet is corrupt and controlled by criminally minded people.

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
2.42.6 Changes
« Reply #2 on: June 15, 2006, 10:45:20 AM »
Quote from: Testlund
Could you explain what dynamic bot radii is?
Radii is the plural of radius.
Dynamic means 'characterized by continious change or activity'.

Thus, Dynamic Bot Radii is the ability for a the bots' radius to change.   The feature (a check box on the General tab) is to disable this (it was requested).  
Many beers....

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
2.42.6 Changes
« Reply #3 on: June 15, 2006, 10:56:09 AM »
Sorry, but I feel a little slow minded here. What does this cause the bot to do?  
The internet is corrupt and controlled by criminally minded people.

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
2.42.6 Changes
« Reply #4 on: June 15, 2006, 10:57:44 AM »
Cool idea with the dynamic costs.  Too bad that if you click on F1 defaults it disables the option and there is no way to turn it back on
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline Elite

  • Bot Overlord
  • ****
  • Posts: 532
    • View Profile
2.42.6 Changes
« Reply #5 on: June 15, 2006, 10:59:08 AM »
That new disable dynamic radii feature is great  
With disable dynamic radii disabled it looks almost completely visually indistinguishable to 2.36.7

Testlund, run a sim with dynamic radii disabled, and then with with dynamic radii enabled
« Last Edit: June 15, 2006, 11:06:34 AM by Elite »

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
2.42.6 Changes
« Reply #6 on: June 15, 2006, 11:36:43 AM »
Ok, it causes bots and veggies to have a fixed size. Forget my stupid question.  
The internet is corrupt and controlled by criminally minded people.

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
2.42.6 Changes
« Reply #7 on: June 15, 2006, 11:37:59 AM »
Quote from: shvarz
Cool idea with the dynamic costs.  Too bad that if you click on F1 defaults it disables the option and there is no way to turn it back on
Well, of course.  I have to leave a few bugs to fix for the next version or I'd run out of stuff to do!  (Not!)  
Many beers....

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
2.42.6 Changes
« Reply #8 on: June 15, 2006, 03:19:37 PM »
By the way, the bug with graphs not displaying properly is still not fixed either.  In case you forgot, that's the one where you have to stretch the graph vertically above certain limits for any graphs to appear.  If you shrink it - they disapear again.  Happens with graphs that have very high values or two very different values (not sure yet).
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
2.42.6 Changes
« Reply #9 on: June 15, 2006, 03:37:09 PM »
Yea, I fixed one bug where low valued graphs were still dissappearing off the top in some cases.  That was a simple issue with control spacing.  The one with high values is more complicated as it is related to how the Y axis is divided up and is core to the graphing routine.  I elected not to dive into that one for this release as resizing the window lets you see the top.  This was not the case for the one I fixed.

I'll get this next release.  It will take a few hours of diving into the guts of the graphing routine which I think Carlo wrote, uses Italian varable names and has no comments at all.  Sigh...
Many beers....

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
2.42.6 Changes
« Reply #10 on: June 15, 2006, 06:31:02 PM »
Quote
I have to leave a few bugs to fix for the next version or I'd run out of stuff to do!

Meanwhile I figured out a temprorary wor-around this problem: click on F1 settings, say OKay, come back to custom simulation costs panel and the "dynamic costs" option would be available.

I am running a sim right now:  so far works great!
"Never underestimate the power of stupid things in big numbers" - Serious Sam