Darwinbots Forum

Code center => Bugs and fixes => Topic started by: EricL on October 16, 2006, 02:16:11 PM

Title: 2.42.9 Changes
Post by: EricL on October 16, 2006, 02:16:11 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.8 to 2.42.9. 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.8a.

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

1) When a sim file is loaded, it's path is now displayed in the main MDI window title bar.
2) The name of a sim file (no path, just the file name - the file is assumed to be in the \saves directory) can now be passed on the command line when the DB exe is invoked.  If such is passed, the info screen is bypassed and the program loads and starts the sim.
3) PERF.  PROFILE.  Netforces() is no longer called for fixed bots.  There is no reason to calculate all the forces for fixed bots.  To allow this, the mass calculation routines are now invoked directly from UpdateBots() before Netforces() is called.
4) PERF. PROFILE.  Tweak to the random angle calculation in BrownianForces() to avoid some unecessary calculation.
5) Tweaked the default Orange to 220, 150, 60 RGB
6) PERF. PROFILE.  DoObostacleCollisions was being called unnecessarily in the case where the sim contained no obstacles.
7) PERF. PROFILE.  GateForces() was being called unnecessarily in the case where internet connections were not being used.
8) PERF. PROFILE.  UpdatePosition was unecessarily calculating a bot's mass.  Mass calculation is handled by CalcMass() in UpdateBots().
9) Virus insertion bug.  AddGene had an off-by-one error in determining where to insert a gene from a virus.  Now 1 is added to the return value from NextStop().
10) PERF.  PROFILE.  UpdateShots() was calling DoShotObstacleCollisions() unnecessarily in the case where the sim contained no obstacles.
11) PERF. PROFILE.  Quick exit from VoluntaryForces() in the case where the movement sysvars are all 0.  Should help significantly for sims with lots of veggies which tend not to move on their own.
12) PERF.  PROFILE.  BorderCols() now short circuits when the bot being considered isn't withn the bot's radius of the field border.
13) PERF.  PROFILE.  CheckTeleporters() was calling TeleportCollision() unnecessarily for inbound teleporters.
14) PERF.  PROFILE.  AddedMass calculation was moved to its own loop which only executes if density is non zero.

2.42.8a Buddy Drop Download (http://www.darwinbots.com/FTP/Darwin2.42.8a.zip)

15) Shapes are now saved in sim files.
16) Bug with shape collision detection introduced by 6 above was fixed.  Shape collision detection must happen before NetForces() or the vector doesn't get added.  The call to DoObstacleCollisions() was moved up one line to happen before NetForces().
17) Tweak to field border collision so that collisions with the edge of the field don't add velocity.  Can you say Flubber?
18) Missed the case in #9 above where the virus was being inserted at the end of the genome.  Should work now.

2.42.8b Buddy Drop Download (http://www.darwinbots.com/FTP/Darwin2.42.8b.zip)

19) The TotBorn and TotRunTime counters were getting overwritten when TmpOpts was copied back into SimOpts when the Change button was pressed on the options dialog.  Now I copy them into TmpOpts when the dialog is opened so the right values get put back.
20) Removed the With Shots(t) statement in UpdateShots() in an attempt to squash the array locked bug.  Time will tell if this makes a difference.
21) Added a new Cost Reinstatement threshold.  Basically, when the population falls below the zero cost threshold, the cost multipler gets set to 0 and the old one gets saved.  If you are you are using dynamic costs, this will be the CostX number.  If not, this will be 1.  When the population comes back up and crosses the new reinstatement threshold, the old cost multiplier will be re-instated.  This can help stem population explosions following bottlenecks when using dynamic costs.
22) Fixed a serious bug in shape blocking which could cause bots in certain positions in the sim to be blind in a sim that is using shapes.  Bascially I had a pos.X where I should have had a pos.Y in the up front perf check that looks to see whether both bots are below the bottom of the shape.
23) Changed the Age cost log(age) option so that it is now log (age - cost start).  In this way, the cost will start ramping up at the age at which it compences.  Seems more intuitive.
24) Added linear increase option to the age cost.

2.42.8c Buddy Drop Download (http://www.darwinbots.com/FTP/Darwin2.42.8c.zip)

25) Incremented the costs control array loop in the load routine for the costs dialog so that the new linear age cost fraction control gets initialized correctly.
26) PERF.  I'm pretty sure #20 has addressed the locked array bug.  So, where before the shots array was grown in huge jumps to avoid the redimension bug, now the shots array is increased by only 10% when it fills up.  This keeps the UpdateShots() loop from having to deal with a super sparse array.  Similarly, I now reduce the size of the array when the number of shots drops below 70% of the array size.  The array is reduced to 10% above the actual number of shots or 100, whichever is higher.
27) The display of shot impacts can now be turned on and off via a menu item on the Robots menu.
28) Fixed a small bug with 26 above where when the number of shots was below 100, the compact routine would erroniously get called and vaporise a lot of shots that should not have been destroyed.
29) The acceleration vector in VoluntaryForces() was being clipped to 40 for overflow protection.  Now it's clipped at SimOpts.MaxVelocity.
30) Implemented Movement Vectors, a display artifact which can help show how bots are using the movement sysvars.
31) Changed the local variable 'value' in RobShoot() to a Single from a Long.  VB was rounding certain calculations when assigned to the Long variable, resulting in 0 valued nrg shots when .nrg was below 50 as well as several other realted bugs when venom and waste were very low.
32) Implemented Resource Guages, a display artifact which graphically displays the nrg and body for every bot.
33) Added the Teleport Hetertrophs option to the teleporters dialog.
34) Had to tweak #3 above.  Apparently, we still need to call bordercols for fixed bots since fixed veggies can be pushed outside the world by the birth tie (I think).
35) Another issue with 26 above.  Forgot to deal with stored shots when compacting the shots array.  Now if the shot is stored, I update .virusshot on the parent bot accordingly.
36) Added Inbound Teleporter options for number of cycles between polls and number of bots per poll.  Reworked Teleporter properties dialog accordingly.

2.42.8d Buddy Drop Download (http://www.darwinbots.com/FTP/Darwin2.42.8d.zip)

37) Messed up the inbound teleporter poll loop.  Was setting it to the number of bots per poll.  Fixed now.
38) Added an option to only preserve the last 10 autosaved best bots in the Recording portion of the options dialog.
39) The line to calculate the new random location for intrasim teleporters in CheckTeleporters()was inside the display off check.  Thus if the display was off, intrasim teleporters would send any bots they encounterred to location 0,0.  Moved the line outside the check.
40) A few profrolactic conversions to Longs in CheckTeleporters() and Respawn() to try and address a position calculation overflow problem with (I think) intrasim teleporters.
41) Removed reliance on sysvars.txt.  All the sysvars are now loaded within the exe in LoadSysvars().  This is one step towards makign the first time experience simple.
42) More issues related to the 26 above.  Stored virus shots were not getting deleted when the parent bot died nor was .virusshot or .vtimer getting zeroed when new bots came into being.  If the parent bot dies and the shots array gets shrunk while the bot does not exist then a new bot resuses that slot in the rob array, the shot referenced by the bot could reference an invalid location in the shots array causing a subscript out of range crash when the vtimer goes off.  Now stored shots are deleted when bots die.  .vtimer and .virusshot are also zeroed when new bots are created.  Additionally, .virusshot is now zeroed when the virus shot is actually fired.  Also fixed a bug in CompactShots() where the shot was being destroyed in the case where the new slot and the old slot for the shot were the same.  Also in cases where MakeVirus() fails in BotDNAManipulation() because the gene can't be copied into the shot (can happen often in mutated bots), I now zero out the bot's .Vtimer and .virusshot.

2.42.8e Buddy Drop Download (http://www.darwinbots.com/FTP/Darwin2.42.8e.zip)

43) Fixed a couple of typos/capitialization errors in 41.
44) SysvarTok() is now case insensitive w.r.t. sysvars in bot txt files.  The sysvar string is LCase'd before comparing to the internal sysvar table.
45) PERF.  Corpses were releasing 0 power nrg shots in respose to nrg feeding shots even though their nrg was 0.  Changed a check in ReleaseNrg() from <0 to <=0 so that this no longer happens.  Should reduce the number of shots and speed things up a tad in sims that have stupid bots whioch try to nrg feed on corpses.
46) Misc tweaks and clean up to allow the exe to stand alone for first time installs.  If the settings directory is not found, the program will now prompt to create it.  If lastexit.sim can't be found, the program now uses reasonable internal defalts.  The goal here is for things to work well for the first time user who has nothing but the naked exe adn to avoid the need to have performed a prvious setup with an older version.
47) Per #2 above, if there is a command line argument, it is assumed to be a sim and the sim is loaded.  If the command line argument contains a quoted string, as it will when the path to a sim file is passed by windows when the sim file extension is manually assoicated with the darwinbots exe, the quotes are stripped so that the file can be opened by the Open statement (which for some reason won't accept quoted paths).  So now, if you manually assoicate the sim file extension with DB and double click the sim file, DB will load the sim no matter where it resides.  If the command line string contains no "\" character, the command lien argument is assumed to be the filename (no path) of a sim residing in the \Saves directory off the DB maindir.  If it does contain a "\", it is assumed to be a fully qualified path.
48) Added overflow protection into createshot and fixed a bug in releasenrg where very powerful shots could end up with .nrg/0.9, causing an overflow when the power was assinged to the integer shot value.  It shoud have been .nrg * 0.9.

2.42.8f Buddy Drop Download (http://www.darwinbots.com/FTP/Darwin2.42.8f.zip)

49) TieHooke is now called directly from UpdatesBots and not from NetForces since it must still be called for fixed bots as this is where the code is for tie hardening and for tie length checking.  Moving shapes can casue fixed bots to move and thus we need to check tie lengths even for fixed bots.

2.42.8g Buddy Drop Download (http://www.darwinbots.com/FTP/Darwin2.42.8g.zip)

50) Changed SphereDragForces() so that it exits in the case that the if the magnitude of the drag vector is non-zero but really tiny as it can caused VectorInvMagnitude() to underflow.
51) Fixed a major bug with angular momentum and ties.  Bascially, the changes to .aim made by TieTorque() were being overwritten by SetAimFunc() later in the cycle with the result that no angular momentum was being transferred to tied bots through ties or from tie operations such as .fixang!  This fix has a pronounced impact on the visual physics and behavior of ties, hopefully much improved.

2.42.8h Buddy Drop Download (http://www.darwinbots.com/FTP/Darwin2.42.8h.zip)

52) Now that angular momentum is working, there were cases where the call to the Circle method to draw the bot focus circle could cause an invalid precedure call crash as the hi and low arguments coudl exceed 2 * PI.  Now the arguments are reduced by 2PI until they are 0 < x < 2PI before the method is called.
53) TmpOpts.Daytime was not being set in the energy dialog when day/night cycles were disabled.  Thus if the user disabled day/night cycles while it was night, the sun would never come up.
54) Added code to SphereDragForces to slow down angular momentum due to fluid friction.
55) Added code to FrictionForces to slow down angular momentum due to surface friction.
Title: 2.42.9 Changes
Post by: Numsgil on October 16, 2006, 11:36:10 PM
Does #2 mean we can now double click on a saved sim and have the sim be loaded into DB?
Title: 2.42.9 Changes
Post by: EricL on October 17, 2006, 12:07:19 AM
Quote from: Numsgil
Does #2 mean we can now double click on a saved sim and have the sim be loaded into DB?
No, though if that is a feature request I could work on it.  But to do that right will probably require a change to the setup utility to register the .sim file type though I might be able to find a sneaky way to do it (once) in the exe load routine.

The reason I did #2 is that it is a step towards making DB into a screen saver....  
Title: 2.42.9 Changes
Post by: EricL on October 19, 2006, 07:18:31 PM
Bump.  2.42.8a buddy drop released.  Perf stuff and a fix to virus insertion.
Title: 2.42.9 Changes
Post by: Anonomous Guest Person on October 20, 2006, 03:48:18 PM
Quote from: EricL
Bump.  2.42.8a buddy drop released.  Perf stuff and a fix to virus insertion.

Woot, keep up the good work!

If you need any help, just ask...though I doubt I'm a much better programmer then you.
Title: 2.42.9 Changes
Post by: EricL on October 20, 2006, 04:10:34 PM
Quote from: Anonomous Guest Person
If you need any help, just ask...
You can regress the virus insertion bug for me.  I.e. confirm that my fix actually fixes it.
Title: 2.42.9 Changes
Post by: Numsgil on October 20, 2006, 06:43:02 PM
AGP, by all means try and crack open the code and fiddle with things.  Either I or Eric can help you if you get stuck or have problems.  Would be really great to have someone else familiar with the code.
Title: 2.42.9 Changes
Post by: Anonomous Guest Person on October 20, 2006, 08:27:37 PM
Quote from: EricL
You can regress the virus insertion bug for me.  I.e. confirm that my fix actually fixes it.

Gh... actually as of testing it I don't think it does.

But you can test yourself via this sim if you'd like. It's all poised up for a bunch of simple virus-shootin' bots to infect a bunch of veggies! (here's a hint; victims of the virus spin around rapidly!)

[Edit to fix my grammar ]
Title: 2.42.9 Changes
Post by: EricL on October 20, 2006, 08:51:13 PM
Quote from: Anonomous Guest Person
Gh... actually as of testing it I don't think it does.

Sorry about that.   Try 2.42.8b above.  I missed the case where the virus was being inserted at the very end of the genome.  Man, I'm rusty....
Title: 2.42.9 Changes
Post by: Anonomous Guest Person on October 20, 2006, 09:14:15 PM
Ah, now it works!

However I do notice that viruses don't seem to want to be placed before first gene... I'm not sure if that's a bug or not though!

[Edit]
I'll probably look at the source code (again) tomorrow. Or monday. Or whenever I feel like it and have enough system resources left.
I'm planning on making a mod of DarwinBots showing an approximate of how I wanted muscles and such to work. I say approximate since it's been over a year since I though the idea up.
But then again I might get lazy and not do that.
oh well!
Title: 2.42.9 Changes
Post by: Testlund on October 22, 2006, 07:56:08 AM
Do you think you could add a function to limit the amount of bots the same as veggies? It whould help keep the program running. Now when I don't have any costs for DNA commands I often get a lot of bots that freezes up the program.
Title: 2.42.9 Changes
Post by: EricL on October 22, 2006, 12:47:54 PM
I don't understand.  Limit bots how?  

If your bot population is getting too large for a given sim, I suggest using dynamic costs with an age cost for  controlling population.  You want to cull the least fit.  Since nrg levels are key to fitness, raising costs is the way to reduce populations.
Title: 2.42.9 Changes
Post by: Testlund on October 22, 2006, 01:19:43 PM
I don't know how the dynamic cost setting works exactly and sometimes the population gets large very fast before the ageing cost get a chance to affect the bots. For instance I set the ageing cost to 5 starting at 1000 cycles, and also that there should be no costs if population drops below 10. What happens then is that the population has trouble reaching over 10 for awhile, then suddenly it seems to overcome it and I end up with 2000 bots on the screen freezing the program.

Maybe the dynamic cost is used for changing costs if it reaches over or below a certain population level. I wonder if it will work if the bots start to multiply extremely fast. I can have over 2000 bots and hardly no veggies in a sim. I don't know where the bots get there energy. Ok, I'll experiment with the dynamic cost function tonight and see how it works.
Title: 2.42.9 Changes
Post by: Anonomous Guest Person on October 22, 2006, 02:49:01 PM
Quote from: EricL
I don't understand.  Limit bots how?


I think in the same flat manner veggies can be limited in, which I believe disables reproduction if there're more then x bots, x of course being the limit set for the number of bots possible in the simulation.
Title: 2.42.9 Changes
Post by: EricL on October 22, 2006, 04:13:16 PM
Quote from: Testlund
I don't know how the dynamic cost setting works exactly and sometimes the population gets large very fast before the ageing cost get a chance to affect the bots. For instance I set the ageing cost to 5 starting at 1000 cycles, and also that there should be no costs if population drops below 10. What happens then is that the population has trouble reaching over 10 for awhile, then suddenly it seems to overcome it and I end up with 2000 bots on the screen freezing the program.

By delaying the age cost 1000 cycles, you are by definition selecting for fast reproduction.  CostX will rise to huge values as population rises, but will have no effect since the age costs aren't applied until a bot reaches 1000 cycles.  You will have selected for bots that reproduce quickly and you will end up with a sim crammed packed full of tiny, young bots.

If age cost is your only significant cost, don't delay it long.
Title: 2.42.9 Changes
Post by: EricL on October 22, 2006, 04:28:36 PM
Quote from: Anonomous Guest Person
I think in the same flat manner veggies can be limited in, which I believe disables reproduction if there're more then x bots, x of course being the limit set for the number of bots possible in the simulation.
There are all sorts of problems with this, even with the current veggy population control.  You don't want to favor bots that just happen to have early slots in the rob array, so you can't restrict reproduction until a cycle is complete duing which time a lot of births could have happened.  This is why the veggy population often exceeds the limit today.  If reproduction is disabled, then the populatuion falls, but the first cycle the population is below the limit and they are allowed to reproduce, they all reproduce during that cycle, before the prohibition is reinstated and you get essentially 2X the limit of veggies.

Other problems have to do with the arbitrary nature of disabling reproduction.  It's fine to disable reproduction for physical reasons such as there not being physical room because bots can evolve strategies for doing something about that.  But an arbitray limit is from the bot's point of view, well, arbitrary.

I have a viseral negative reaction to arbitray limits and I dislike even the current one for veggies.  I think the 'proper' way to control population is indirectly via sim resources I.e. limiting nrg inflow, physical space, ramping up costs, etc. which is why I have added such features as dynamic costs and inbound energy management.
Title: 2.42.9 Changes
Post by: Testlund on October 22, 2006, 05:16:35 PM
Well, I think the dynamic costs works a little strange. For instance I set the target population to 100, then +10 % and -10%. What I found out is that it works the same as the setting above (No costs when target reaches below). I mean that as long as the population is below 100 there are no costs applied at all, nomatter if  I set the minus percentage to 0, -10 or -90, but if the population is above 100 then the costs will start to apply again.

I wonder if it is a bug. I've been testing it with 4 instances with different bots. Herbivore stops losing energy if it drops between 900-1000, DNA Bacteria and Animal Minimalis doesn't seem to lose any energy at all, while R Fisannis loses energy slowly.
Title: 2.42.9 Changes
Post by: EricL on October 22, 2006, 09:21:47 PM
Are you typing the minus sign on the lower bound?  You should not be.  It is implicit.

Do you see Cost X suddenly go to zero in the tray when the population drops below 100?

Please post a sim when reporting a bug.  Without a sim, it is impossible to tell what is a bug and what is user error.
Title: 2.42.9 Changes
Post by: Testlund on October 23, 2006, 10:44:21 AM
Sometimes I don't think I need to post a sim because I think you should be able to reproduce it just trying out the stuff I mension, but I will post a sim from now on.  

Here's a sim I just started. What you should see here is that when population goes above 100 bots the cost multiplier will increase until the population goes down to between 50 and 100 bots, then the costs will stabalize at it's current level. Very cool! If the population goes below 50 bots the costs will stop. The lower range target is currently set to 10, but it doesn't matter what value I type here. I don't understand the lower range target and what it's supposed to do. But otherwise I think the dynamic costs work quite well, except for when the population goes up very fast. Then the cost multiplier can't keep up with it and the sim freezes.
Title: 2.42.9 Changes
Post by: EricL on October 23, 2006, 11:43:37 AM
Things appear to be working as designed as far as I can tell.

You have the lower range set to 10% and the upper range set to 100% with a midpoint of 50.  Thus, while the non-autotrof population is between 45 and 100, the system will not change the CostX multiplier.  When above 100, it is increased as you see (with execptions - see below).  When below 45, it is decreased (with exceptions - see below).

Note that the algorithm is more complex than simply increasing and decreasing.  I have described it in detail in previous posts but in short, if the popualtion is below the lower threshold, but it happened to increase over the previous cycle, the CostX multipler will *not* be decreased that cycle since the population is moving towards the range.  Additionally, if the population is belwo the range and remained the same from one cycle to the next, the CostX multiplier will similarly not be decreased unless it stays the same for 10 consecutive cycles.  Then it will get bumped down.  How much it gets bumped down is a function of the sensitivity and of how far out of the range it is.  Of course, the inverse happens for when the population is above the upper range.

Using the Auto Costs Stats graph is very useful to see what is happening.

The overpopulation problem following when the zero costs threshold is hit and the CostX multipler crashes to 0 has been pointed out previously and I have added the new CostX reinstatement feature described in the first post in this thread to help address it.

Let me know if you still think there is a bug.
Title: 2.42.9 Changes
Post by: Testlund on October 23, 2006, 12:07:51 PM
Ok, I guess maybe it's just me having a problem comprehend this stuff. I probably need to keep running it and monitoring the dynamic costs graph to understand it better. I'm looking forward to your new costX function then.  
Title: 2.42.9 Changes
Post by: EricL on October 25, 2006, 03:36:02 PM
Bump.  2.42.8c buddy drop released.

2.42.8c Buddy Drop Download (http://www.darwinbots.com/FTP/Darwin2.42.8c.zip)
Title: 2.42.9 Changes
Post by: Numsgil on October 25, 2006, 05:49:50 PM
Quote from: EricL
23) Changed the Age cost log(age) option so that it is now log (age - cost start).  In this way, the cost will start ramping up at the age at which it compences.

What do you mean by "compences"?
Title: 2.42.9 Changes
Post by: EricL on October 25, 2006, 08:34:47 PM
Quote from: Numsgil
What do you mean by "compences"?
Sorry, phat phingers.  I meant "commenses".  An example is warrented.

If I have an age cost of 1 and chose to delay it for the first 1000 cycles of a bot's life and check the log increase option, prior to 2.42.8c, on it's 1000th cycle of life, the bot would be charged 1 + log (1000) or 4 nrg.  That is, the age cost per cycle went from 0 to 4 in one cycle.  Boom!  And from there on the increase is very gradual.  

Begining with 2.42.8c, it will be charged 1 + log(1000-1000) or exactly 1 but the ramp up following will be steeper.  On the 1010th cycle, it will be charged 2.  On the 1100th cycle 3, on the 2000th cycle 4, and so on.

Beginning the logrthmic growth at the age at which the age cost commenses simply seems more intuitive to me.
Title: 2.42.9 Changes
Post by: Numsgil on October 25, 2006, 08:54:42 PM
Ah, that makes sense

You might want to add some pop up help windows for the log age cost, since it confuses alot of people.  Sort of like I did on the advanced physics panel with the "Help with units" etc.
Title: 2.42.9 Changes
Post by: EricL on October 30, 2006, 02:30:22 PM
Bump.  2.42.8d Buddy drop released.
Title: 2.42.9 Changes
Post by: EricL on November 04, 2006, 12:32:14 AM
Bump.  2.42.8e buddy released.
Title: 2.42.9 Changes
Post by: EricL on November 06, 2006, 02:59:49 PM
Quote from: Numsgil
Does #2 mean we can now double click on a saved sim and have the sim be loaded into DB?
IF you manually asscoated the *.sim file extension with the DB exe, this will now work.  See #47 above.
Title: 2.42.9 Changes
Post by: Numsgil on November 06, 2006, 05:17:42 PM
I thought something like that might work.

Only problem will be using newer versions.  Maybe you could associate it with a .bat file or dummy program that searches for the newest version?
Title: 2.42.9 Changes
Post by: EricL on November 06, 2006, 05:40:55 PM
Someday I will have the exe register the file type itself to avoid additional files.  For now, the user will have to update the association manually with each new version.
Title: 2.42.9 Changes
Post by: EricL on November 06, 2006, 07:56:03 PM
Bump.  2.42.8f released.

This one is pretty stable.  I will probably drop 2.42.9 within a few days if no one finds any serious issues with this drop, so please dowload and stress it over the next few days.  Thanks.
Title: 2.42.9 Changes
Post by: Numsgil on November 06, 2006, 09:10:19 PM
This is a bot with all the sysvars in it.  The DNA should be able to parse this back into sysvars, but it doesn't.  It just lists the corresponding numerical values.
Title: 2.42.9 Changes
Post by: EricL on November 06, 2006, 10:45:49 PM
Quote from: Numsgil
This is a bot with all the sysvars in it.  The DNA should be able to parse this back into sysvars, but it doesn't.  It just lists the corresponding numerical values.
The DNA detokenize routine appears to only treat base pairs as sysvars if the following base pair is type 7, namely a store, inc or dec command.  Otherwise, it is treated as a number.  I have not touched this area of the code, so likely this is how it has been for a very long time.  It does not appear that this issue impacts bot execution, only the reverse tokenization used to display DNA in human readable form in DNA portion of the bot properties dialog.  If you change the bot to have each sysvar followed by a bp of type 7,

1 .up store
2 .dn inc
.
.
.

then it detokenizes correctly.

I will look at this and see if I can do a better job of detokenization here, but I have to wrap my head around the whole DNA base pair type system and state machine first.  It's not immediatly clear to me for example, what the correct detokenization behaviour should be.  I just haven't looked at it very close.  But from what I can tell, the base pair type 0 appears to be used both for numbers and for sysvars and the interpretation of whether to treat a bp value as a sysvar or a number is a stateful decision, a function of the finite state machine executing the DNA.  Thus, it is not immedieatly clear to me that what the code is doing here is incorrect given the incorrect semantic use of sysvars in the bot file.  Any education appreciated.
Title: 2.42.9 Changes
Post by: Numsgil on November 06, 2006, 11:42:48 PM
Oh, right.  I forgot about that.

I was mostly testing to see if the parser is converting sysvars to their IDs correctly.  It looks like it is.
Title: 2.42.9 Changes
Post by: EricL on November 08, 2006, 12:25:54 PM
Bump.  Buddy drop 2.42.8g released.  Please verify that the tie issues with 2.42.8f have been addressed.  Thanks.