Darwinbots Forum

Code center => Bugs and fixes => Topic started by: EricL on November 14, 2006, 01:45:14 PM

Title: 2.43 Changes
Post by: EricL on November 14, 2006, 01:45:14 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.9 to 2.43.   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 link to an interim release attached to this topic, it is a stable buddy drop which you are encouraged to try.  Such 'between release' exes will have letters following the release version e.g. 2.42.9a.

If you have feature requests or bug reports for this version, please report those as separate topics in the Bug Reports forum and be sure to include the specifc version, a complete description of the behaviour and how it differs from what you expect and if possible, an attached sim file.

1) The memory location on which stores, inc's and dec's opeate is now abs(n) mod MaxMem.    The inverse is true with detokinization.  The result is that vastly more numbers (all of them) will tokinize and detokinize to valid memory locations.  This dramatically increases the probabiltiy that mutations will result in DNA that actually does something though since the sysvar space is still rather sparse (there are only about 200 sysvars out of 1000 memory locations) there will still be a lot of operations on bot memory that does not impact anything.
2) Changed the var l in UpdateShots to a Single instead of a Long to avoid a possible underflow bug.
3) RobArrayMax is now 10,000.  Sims will now only cull bots if the total robot population exceeds 10,000.
4) Fixed a typo in SimpleCol which prevented some bots from reproducing when they were below a shape and their X location > Y location.
5) Added underflow protection to the velocity values in NetForces.  Very very small velocities can overflow the vector routines which multiply velocities together.
6) Enhanced repel3() so that fixed bots or bots with very very low velocities that overlap are moved apart.
7) NEW SYSVARS.  Added two new sysvars:

.focuseye read/write (mem location 511).  Indicates which of the bot's 9 eyes should be used to populate the refvars.  A value of 0 indicates .eye5 should be used.  A value of -1 indicates .eye4, and value of +1 indicates .eye6 and so on for values from -4 to +4 inclusive.  If a value outside this range is stored to the location, it is MODed in such a way that the value refers to one of the 9 eyes.  A value of -5 corrosponds to .eye9 for example, a value of 5 to .eye1 and so on.  The refvars are updated using the specifried eye during the same cycle .focuseye is modified.  Values stored into .focuseye persist across cycles, can be read by bot DNA and the specified eye will be used for refvars until a new value is stored into .focuseye.

.eyef read only (mem location 510).  This sysvar acts just like the eye1-eye9 sysvars except that it's value is based on the view from whatever eye is specified as the focus eye using the .focuseye sysvar.  If .focuseye is 0, the value of this sysvar will be identical to .eye5.

8) Pressing the eye button on the bot consule dialog now displays the value of .eyef and .focuseye in addition to the other 9 .eye values.
9) The eye dislay grid thingy for the bot with the focus now shows which eye is the focus eye by turnign the arc portion of the eye view thingy red instead of Cyan.
10) Ties to corpses now allowed.  Tie body sharing and tie body feeding enabled via .tieloc of -6.
11) Gauss() can retrun values which overflow Integers when the BP value passed to it is near 32000.  Added protection to the routine to check that retrun values are -32000 < x < 32000.

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


12) NEW SYSVARS!!!!!!!!  The direction each eye points can now be modified by storing values into the sysvars .eye1dir -> .eye9dir (mem locations 521-529).  The value stored is treated as an offset from the eye's default direction.  Values persit across cycles and are read/write.  

Thus, storing 0 values in these locations results in the eyes pointing in their traditional directions.  For example, the following gene results in .eye5's direction slowly rotating about the bot every 1256 cycles:

cond
start
*.robage .eye5dir store
stop

To calculate absolute eye directions, one needs to know the default offset from .aim for each eye.  The field of view for each eye is pi/18 radians or approx. 35 turning units.  Thus, the default offsets for each eye from .aim are as follows:

.eye1 = (4 * pi/18) = 140
.eye2 = (3 * pi/18) = 105
.eye3 = (2 * pi/18) = 70
.eye4 = (1 * pi/18) = 35
.eye5 = 0
.eye6 = -35
.eye7 = -70
.eye8 = -105
.eye9 = -140

Note that the turning units are rounded.

The following gene points all eyes straight ahead, all overlapping .eye5

cond
start
-140 .eye1dir store
-105 .eye2dir store
-70 .eye3dir store
-35 .eye4dir store
35 .eye6dir store
70 .eye7dir store
105 .eye8dir store
140 .eye9dir store
stop

13) Fixed a huge energy leak bug in tie nrg sharing.  Basically, a bot could still share a ton of nrg even it it's own nrg was negative.  This could result in expolosive, cancerous growth of rapidly reproducing tied bots where near death bots could give their tied partners huge amounts of nrg they did not have.
14) Addressed another energy loophole in corpse nrg shot decay mode.  Bascially, a corpse with negative or zero or a small abount of body would still give off a decay shot containing the default nrg.  Bots could reproduce quickly, have their offspring absorb the shot from their death and thereby give their offspring more nrg than they had.
15) Values stored in .vshoot were not effecting the range of virus shots as they should.  Now a positive value stored in vshoot adds half the amount in cycles to the range (I.e. lifetime) of virus shots.

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

16) Whoops.  The new CompareRobots routine for the new vision stuff had a bug that screwed up refvars and tie firing.  Basically, .lastopp wasn't getting set.  Now it is.

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

17) Large values of angular momentum which wrapped 2 * pi could overflow SetAimFunc().  Added overflow protection.
18) Prety serious tweaks to ha3A11ed tie physics.  Briefly, when a tie hardens, it's length gets set to whetever is is at the time it hardens.  The angle of the tie relative to the bot that created the tie gets fixed at that end but the angle at the other end, the end connected to the victim bot, continues to be free to rotate.  This makes sense to me in that a bot should be able to control his end of the tie, but not the other end.  People may hate this, but it really helsp tie physics I think.  Bots should still be able to fix the angle of a tie they did not create by explicitly using .fixang.  I also added some slop in the tietorque and tiehooke routines so that small angle deviations and small tie length deviations from the fixed values don't result in forces being translated to the tied bots.  This helps get rid of funny harmonics in tightly tied clusters of bots.  There are still cases where lightweight bots can vibrate or get whipped around, but I think things are much much better than they were.  Also added some limits on the effect of torque values on .aim.
19) Removed .nrg < 0 check in releasebod() so that -6 shots work against corpses.

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

20) In experimneting with ties above, I made hardened ties weak and breakable.  Now they are stong again.
21) Made the minimum bot mass 1 instead of 0.25.  This helps tremendously with tie problems when very low mass bots have multiple hardened ties.
22) NEW SYSVARS.   The last of the big new vision features.  Added the new read/write sysvars .eye1width - .eye9width (531-539).  Storing values into these locations changes the width of the repsective eye.  A value of 0 indicates the default width of pi/18 (approx 35 bot rotation units).  Storing positive values increases the eye width over and above the default width by .eyeNwidth /1256.  Storing negative vaules narrows the eye width.  Note that a value of 1221 (1256 - 35) is equivalent to a value of -35 and represents a 360 degree field of view.  Both postive and negative values are MODed such that an eyewidth value of 1222 is equivalent to a value of -34 which represents the smallest possible eyewidth of 1/1256 * 2 * pi.

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

23) Changed what happens when a lot of torque is applied to to a bot via a fixed tie.  Now if the angular momentum exceeds 2 * pi, the fixed angle will slip and get reset to whatever the tie's current angle is.
24) Closed a nrg/body loophole in tie sharing that allowed tied bots to create nrg/body from nothing.  Now, you can't give or take body or nrg if your body or nrg are below 0.
25) There were two .trefbody sysvar locations.  Now only mem location 437 is used.
26) The impulse and resistance vectors were only getting zeroed in UpdatePostion for non-fixed bots.  This could result in the build up of impulse or resistance forces for fixed bots in contact with shapes, say in a sim with Y-axis gravity.  If they became unfixed, they coudl suddenly get levitated.  Cool bug.
27) Leagues were broken by the copying of tmpopts into simopts near the end of StartNew_Click() for the options form.  A bunch of league stuff gets put into SimOpts in SetupLeagueRound and it was getting overwritten.  Now SetupLEague round changes both simopts and tmpopts since it gets called both from the open optiosn dialog and between each league round.
28) Made saving league files work by using FileCopy and Kill instead of Name in Save_League_File().

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

29) Disabled Make Walls menu item and commented out a whoel bunch of checks for .wall since old style walls are obsolete.
30) Added EyeNDir and EyeNWidth to the eye button output in bot console.
31) Added Poison, VTimer and Unique Bot ID to the bot properties dialog.
32) The .view flag is now ignored in BasicProximity which means that .eye values are populated for all bots whether their DNA contains .eye sysvars or not.  We do this because even if a bot does not reference their eyes directly, they can evolve indirect addressing and not populating these sysvars would make such bots blind.
33) Had a bug in the new vision Compare routine when the eye or the bot spanned 0 degrees.
34)  HUGE.  NEW SYSVAR.   Shapes can now be made visable to bots via a checkbox on the Shapes dialog.  If shapes are visable, a bot's eye sysvars will register values when they look at a shape.  A new sysvar .reftype (mem location 685) indicates the type of object that is in the bot's focus eye.  If the object is a bot, the value of .reftype will be 0.  If it is a shape, it will be 1.  Refvars such as positon and velocity are updated for shapes though many that are bot specific are zeroed out.   There is a ton of new code to make this work.  Phew!
35) Removed some const definitions in DoObstacleCollisions() under the therory that VB may no deallocate consts declared within functions in some cases.  Could be the root of a hard to find memory leak bug.
36) Fixed a couple of league bugs.  There was no code to properly handle checking and unchecking the 'rerun league' checkbox and tmpopts overwriting simopts was screwing up some league setup code in StartSimul.
37) Added the Dsiable DNA, DisableVoluntary Movement and Disable Vision options on the species tab.


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

38) All relevant shapes settings are now saved in sim files.  This includes shapes being visable, see through, shot absorbing, colorful, opaque, drift horz, drift vert and drift speed.
39) The F1 Contest Conditions checkbox on the leagues dialog now sets BadWasteLevel to -1.
40) Address another single->Long conversion bug in the energy cost for shots.  When a bot's nrg was 50 or less, it could shoot various types of shots including -2 shots where no .shootval is specified for free.
41) Fixed an overflow with shape visability where the shapes poisition was being asigned to the position refvars.  Now shape positions >32000 are truncated to 32000 in refvars.
42) The Cost Multiplier (CostX) is now displayed on the Costs dialog and can be changed whether dynamic costs are being used or not.

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

43) Addressed an overflow bug similar to 41 above for shapes with positions < -2^15.
44) Minor fix to the way the Cost Multiplier was being displayed on the Costs dialog.
45) Adding a whole pile of hard coded settings for F1 Contest Conditions in the Leagues dialog.
46) Assign simopts to tmpopts at the end of running the league so that the species list is correct.

2.42.9i Buddy Drop Download (http://www.darwinbots.com/FTP/Darwin2.42.9i.zip)

47) Fixed crashing issue where an attempt to display the DNA for a deceased bot would crash.  Now the bot existing is checked before DeTokinize is called.
48) Fixed crashing issue with log(n) aging costs.  Added a check for log(0).
49) Now clicking on the screen when a bot is selected does not move the bot.  The bot can be moved by dragging it around.
50) Corpse's eyes are now zeroed to prevent confusion when looking at their vision raidus thingy.
51) F1 League mode now sets Shot energy to proportional 100%.
52) Mutations are now disabled for bots in F1 mode.
53) Addressed a subscript out of range issue with virus shots when running in league mode.  When a league round is started, stored shot references were not getting zeroed out.  This would casue an overflow if the bot attempted to fire the virus shot as it woudl refer to a position in the shot array which probalby no longer esists.
54) Collision ELasticity in leagues is now 0.
55) Addressed a guages bug with the slime guage.  Had an incorrect test.
56) First entry in the species list is forced to be a veg when running F1 leagues.

2.42.9j Buddy Drop Download (http://www.darwinbots.com/FTP/Darwin2.42.9j.zip)

57) Made a few main menu changes so things are more logicly layed out.
58) League mode eyeFudge had a few êèid related to the DNA modification.  The DNA array was not being redimmed using preserve.  Also, the starting number of veggies coudl screw it uyp so it is now set to 10 in league mode.
59) A check in ExecuteDNA was preventing the code from MODing indirect references to mem array locations which fell outside 1 - 1000.  Now all indirect references will result in valid references into the mem array.  DNA is not changed, but the usuable value space is now much larger.
60) Cost mulipliter wasn't getting loaded into tmpopts so the field would display whatever was the user had set last time, not the current value.  Now it is loaded in DispSettings.

2.42.9k Buddy Drop Download (http://www.darwinbots.com/FTP/Darwin2.42.9k.zip)

61) Addressed overflows in storePoison and storeVenom which could occur when the venom or poison cost was very small.

2.42.9L Buddy Drop Download (http://www.darwinbots.com/FTP/Darwin2.42.9L.zip)

62) The way DB handles different screen aspect ratios was pissing me off.  Now, when the field is unlocked, the field is displayed on the screen at the native 4X3 aspect ratios used by DB.  When unlocked, the screen should now display accuratly what the bot perceives w.r.t bot position, eyesight, etc.  This should only really be noticable by people using monitors with resolutions which depart wildly from a 4X3 aspect ratio.
63) Changed the eyegrid for the bot with the focus so that it now displays how far away a bot is when a bot is visiable in an eye.  There is some innacuracy here in that the code delibertly gives the bot more eye value resolution for bots it sees whcih are closer than for those farther away but it should give the human a good idea of the bot's eye values and which bot it is seeing when eye widths are large.
64) Addressed a bug with leagues when re-runnign the league table was requested and there were only 1 or 0 bots in the league.
65) Now set .virusshot and .vtimer to 0 for bots when sim is started.  Not doing so can result in an arrray bounds error when runnign leagues.
66) Wasn't setting CantReproduce correctly when bots are loaded for a new simulation.
67) If the DNA file for a bot listed in a league file is not found, then the path is prompted for and once the user specifies a path, that bot file is copied to the appropriate league directory.
68) Fixed a little divide by zero crash when the gene activation dialog is opened on a bot with no genes such as a zero bot.
69) Negative values stored into .repro or .mrepro now don't do anything.  Postive values are mod 100.

2.42.9m Buddy Drop Download (http://www.darwinbots.com/FTP/Darwin2.42.9m.zip)

70) Deleted shapes were still blocking bot vision.
71) Waste threshold set to 10000 for F1 leagues.
72) Added crash protection for when the program creates a first time league file and no .bak file yet exists.
72) Don't decay nrg shots menu item not propertly initialized.

2.42.9n Buddy Drop Download (http://www.darwinbots.com/FTP/Darwin2.42.9n.zip)

73) Leagues no longer call StartSimul() recursivly.  Rearchitected how contest rounds are kicked off using a flag to avoid blowing VB's stack when a contest goes into lots of rounds.
74) Implemented Max rounds feature.  If 0, the contest will go until a contestant wins by a statistically significant number of rounds.  If non-zero and 10 or more, the defender will be declared the winner if this number of rounds is met and no combatant has acheived a statistically significant number of victories.
75) Did away with the poll frequency setting in leagues.  It was uncessary.  The code is now hard coded to check every 10 cycles to see if one contestant has managed to wipe out the other.

2.42.9o Buddy Drop Download (http://www.darwinbots.com/FTP/Darwin2.42.9o.zip)

76) Shots are now saved in sim files.  Oh my.  All shots are saved and restored but when a stored shot such as an unfired virus shot is restored, it is fired immediatly.  This is partly because such things as .virusshot and .Vtimer are not currently saved with bots in sim files and partly for backward compatability ease with saved sims from before shots were saved.  Could be added later, but this seems to be a big step for now.
77) Addressed a tight loop hang in PointMutation() which could occur when a point mutaiton is attempted on a bot of age 0 and DNALen 1.  More than a single point mutation  per cycle can no longer occur for bots age 0.
78) Most of the Robot's menu is now disabled unless a bot has the focus so as to avoid uninitialization crashes.
79) Stores were not being exectued inside else conditions.  Now they are.
80) The CostX cost was not being initialized in the case when the options dialog was opened but the Costs dialog was not.  This coudl result in an old value of CostX being put back into SimOpts.

2.42.9p Buddy Drop Download (http://www.darwinbots.com/FTP/Darwin2.42.9p.zip)

81) Genetic memory locations 971-975 now are transferred to offspring instantly at birth.  Locations 976-990 occur over the forst 15 cycles of life as long as the birth tie remains in place.  In the case of sexual reproduction, the locations are choosen from one of the parents randomly.
82) Addressed incorrect calculations in the 'Average" graphs.  Totals are now devided by bots of that species rather than the total number of bots.
83) Addressed a conflict between non-league restart mode and the way league mode does restarts. If the last of both combatant species in a contest died in the same cycle and that cycle was the one in which the leage code checked the species populations (happens every 10 cycles) then both the league mode code and the restart code would increment the number of contests and restart. When a contest was in extra rounds, this double increment would push it past the variable "maxrounds" and screw up subsquent tests for league population checks. Bascially, the contest would run forever.  I changed restart mode to use the same non-recursive restart flag that league mode now does and cleaned up some other checks and interactions between restart mode and league mode, making them essentially independent. Now one can choose to auto-restart a sim when the population of hetertrofs hits 0 independent of league mode (you don;t need it in league mode) and use league mode without the restart code getting in the way and screwing it up.
84) If video mode is disabled, the bots are now not painted in the first cycle when a simulation is started, such as when running leagues.

2.42.9q Buddy Drop Download (http://www.darwinbots.com/FTP/Darwin2.42.9q.zip)

85) Implemented the option to include autotrophs in the population targets for dynamic cowsts and zeroing costs.

2.42.9r Buddy Drop Download (http://www.darwinbots.com/FTP/Darwin2.42.9r.zip)

86) Corpses weren't decaying.  Now they do.
87) Passing a non-fully qualified argument (.virusshot) in a call to VShoot was the ultimate cause of an exception vilolation crash that bypassed VB's exception handling.  Now the fully qualifed argument  (rob(n).virusshot) is passed.
88) Fixed a bug where nrg shots taken by bots with large body values could push the nrg received to 32000!
89) Changes the unique bot ID mechanism to use a monotonicly increasing counter.
90) Addressed potential crashing bug in KillRobot where .virusshot was not getting zeroed.
91) Fixed an issue where manual setting of CostX would sometimes not work becuase DispSettings was overriding it when the Options dialog repainted.
92) Addressed an nrg leak issue when using everlasting nrg shots.  The shot's nrg was not being calculated correctly when shot decay was off.
93) -2 shot nrg is now stored in .nrg for the shot.
94) Addressed an issue with total sim nrg calculation.  Corpses were not being counted.

2.42.9s Buddy Drop Download (http://www.darwinbots.com/FTP/Darwin2.42.9s.zip)

95) Fixed a crashing overflow bug where the Int varible 'min' was overflowing when sec /60 exceeded 2^15.
96) Disabled DNA organisms can now die.  Before, ManageDeath() was not being called for them.
97) Slime and shell are now saved in sim files.
98) Sims keep running when the options dialog is open.  If sunset or sunrise occurs while the dialog is open, then the wrong values can get put back into the SimOpts structure, messing upo the sun state or the cycles to go.  Same with the number of cycles to go until sunset/sunrise.  Now these are loaded from simopts into tmpopts just before the tmpopts struct is put back into simopts so that the current values are used.
99) Wired up the rotational cost.  You could set it before, but it didn;t do anything.  Now bots are charged the cost for each radian then turn.  For example, if the cost is set to 3, a 360 degree turn costs 3 * Pi * 2.

2.42.9t Buddy Drop Download (http://www.darwinbots.com/FTP/Darwin2.42.9t.zip)

100) Addressed a crashing overflow with using proportional shot energies greater than 100%.
101) Minor enhancements to the robot properties dialog.  Velocity and radius added.
102) Implemented the memory view option on the robot properties dialog.
103) Had a bug which made sim sizes huge.  The DNA array was being saved for all shots.  Now it is only saved for virus shots.

2.42.9u Buddy Drop Download (http://www.darwinbots.com/FTP/Darwin2.42.9u.zip)

104) Pops off an empty boolean stack now return true.  This may impact evolved bots or bots that rely upon the results of boolean operators which attempt to pop values off an empty stack.
105) THe stack length for both the integer and boolean stacks are now 100.  They were only 20.
106) Tweaks to the auto-cost algorithm.  The slope of the popuatlion curve over the previous 100 cycles is now used when calculating whether to make a change to the cost multiplier.  Should help address CostX oscilations.

2.42.9v Buddy Drop Download (http://www.darwinbots.com/FTP/Darwin2.42.9v.zip)

107) Fixed an overflow crash due to an unprotected Single->Long assignment in Takevenom() where a venom shot could result in a huge shell value.  Added input protection logic for sim files with outrageous values of shell and slime.
108) Addressed divide by zero crash with mutations dialog where the mutation probability text field Probs(1) would attempt to show  1/Psome.  Now it shows"inf" when PSome is zero.

2.42.9w Buddy Drop Download (http://www.darwinbots.com/FTP/Darwin2.42.9w.zip)

109) Added checkbox on robot properties dialog which allows memory to be displayed at the beginning of a cycle.  Useful for examing what bots are doing with sysvars such as .up which the bot may set but which the program zeros each cycle

2.43 Official Release (http://www.darwinbots.com/FTP/DarwinBots2.43.zip)
Title: 2.43 Changes
Post by: Numsgil on November 14, 2006, 03:24:13 PM
#1 is pretty big.  My only caveat is that storing to 0 should be a free action (which it looks like it is).  This is firmly established and important for single gene bots.  I was also thinking of maybe reserving negative values for some new features at some point (I'm not sure what these features might be), so if you decide that negative values are legit too, it should be done with a certain amount of sobreity.

Last, if you're wrapping values you're going to want to do a little bit of tricky math.  You want the 2000th memory location to point to 1000 instead of 0.
Title: 2.43 Changes
Post by: EricL on November 14, 2006, 04:07:26 PM
Code: [Select]
Private Sub DNAstore()
   Dim b As Long
   b = PopIntStack          ' Pop the stack and get the mem location to store to
   If b <> 0 Then           ' Stores to 0 are allowed, but do nothing and cost nothing
     b = Abs(b) Mod MaxMem  ' Make sure the location hits the bot's memory to increase the chance of mutations hitting sysvars.
     If b = 0 Then b = 1000 ' Special case that multiples of 1000 should store to location 1000
     rob(currbot).mem(b) = PopIntStack Mod 32000
     rob(currbot).nrg = rob(currbot).nrg - (SimOpts.Costs(COSTSTORE) * SimOpts.Costs(COSTMULTIPLIER))
   End If
End Sub

Quote from: Numsgil
#1 is pretty big.  My only caveat is that storing to 0 should be a free action (which it looks like it is).  This is firmly established and important for single gene bots.

I feel compelled to point out that stores to location 0 only pop a single item off the integer stack, unlike all other other stores which pop two.  I hate the asymmetry, but this is the way the code was before and I don't want to break bots that rely on this...
Title: 2.43 Changes
Post by: Numsgil on November 14, 2006, 11:10:19 PM
I wouldn't be against 0 stores pulling two values from the stack.  You're right, it isn't symetrical.
Title: 2.43 Changes
Post by: EricL on November 16, 2006, 11:30:51 AM
Bump.  2.42.9a available.
Title: 2.43 Changes
Post by: EricL on November 19, 2006, 09:35:18 PM
Bump.  2.42.9b available.

Take a look at the new vision capabilities described above.
Title: 2.43 Changes
Post by: EricL on November 20, 2006, 01:17:10 AM
Bump again.  Major bug in 2.42.9b fixed in 2.42.9c.  Much better now.  Try it, you'll like it!  I even think the new vision routine is faster!
Title: 2.43 Changes
Post by: Jez on November 20, 2006, 10:40:19 AM
Quote from: EricL
Bump.  2.42.9a available.
Take a look at the new vision capabilities described above.

Thanks Eric! Will try as soon as I get enough time to spend experimenting with the new vision capabilities.  
Title: 2.43 Changes
Post by: Testlund on November 20, 2006, 03:14:30 PM
Any chance the crashing I keep getting has been addressed in the latest buddy drops?    I've been worried maybe you can't reproduce my problem, which means I whould have to go back to an earlier more stable version, which is missing some other fixes and features.  
Title: 2.43 Changes
Post by: EricL on November 20, 2006, 06:07:09 PM
Quote from: Testlund
Any chance the crashing I keep getting has been addressed in the latest buddy drops?    I've been worried maybe you can't reproduce my problem, which means I whould have to go back to an earlier more stable version, which is missing some other fixes and features.  
It's possible it has, I did address a few things profrolacticly, but that's no gurarentee.  There's certainly no huge harm in runnign the lates buddys...

I  haven't beeen able to reproduce the crash it in the IDE though I have tried.  The sim you posted doesn't seem to crash for me.  If you have a sim that crashes predictably, say an autosaved sim from right before the crash, that will help much.  If not, I'll try again to run your sim overnight and see if I can reproduce it.
Title: 2.43 Changes
Post by: EricL on November 21, 2006, 05:04:46 PM
Bump.  2.42.9d release.

Wow, I think I made some huge improvements in ties.  Check it out!  Also fixed acrashing bug (could be yours Testlund) and body feeding shots should work against corpses now.
Title: 2.43 Changes
Post by: Henk on November 22, 2006, 03:48:47 AM
Quote from: EricL
(...)

Wow, I think I made some huge improvements in ties.  Check it out (...)

Yeah they're not so springy anymore, check out the stable non springy organism in this sim  :
Title: 2.43 Changes
Post by: EricL on November 22, 2006, 04:28:15 PM
Bump.  2.42.9e released.

Check it out, the last of the big new eye capabilities!!!!!!!
Title: 2.43 Changes
Post by: Jez on November 22, 2006, 05:40:08 PM
And so the brain overfloweth, (mine at least!)

I hope all these new sysvars and changes have been added to the Wiki sysvars because I can see me hogging that page for a while when I start trying to write a bot again...
Title: 2.43 Changes
Post by: EricL on November 22, 2006, 07:40:33 PM
Not yet.  If someone feels ambitious, feel free.  Otherwise I'll do it this weekend, maybe, if I'm in town...
Title: 2.43 Changes
Post by: Sprotiel on November 22, 2006, 09:15:56 PM
I don't know the reason, but Duo, which worked in 2.42.9d, is now broken.
Title: 2.43 Changes
Post by: EricL on November 23, 2006, 01:54:29 AM
Quote from: Sprotiel
I don't know the reason, but Duo, which worked in 2.42.9d, is now broken.
I know what is going on.  Bare with me for a moment.

How are fixed ties connected to bots?  It's not a trivial question.  Are they rigidly connected?  Are they on a spring loaded bearings that try to get back to their fixed angle but can be torqued out of place like the arm of a clay pidgeon throwing arm or one of those spring loaded door hinges?  How far out of place?  Can I wind up the spring of a fixed bot indefenitly or only so far?  It there's a limit, what happens when I reach it?  

Imagine two bots tied together and the tie has hardened.  Now the one that created the tie executes a 180 degree about face.  What should the result be?  Perhaps the bot on the other end of the tie is small and it should get whipped around with the tie but now imagine the bot executing the turn is tied to a huge mass of other bots that far out mass it.  Should the "bearing" slip?  Or perhaps the hardened tie connection should break?  Or perhaps the bot should not be allowed to turn as far as it wants....   Now think about a bot that does a .fixang that positions a tie 180 degrees from where it is currently (which is what Duo does).  Should the bot spin or the tie move or both?.  What if the tie leads to a huge mass of other bots and similarly the bot has other fixed ties to large masses of bots?  Same kind of problem.  I can't whip two huge masses around just because some bot in the middle says to but I can't ignore the .fixang request either.  Torque is being applied, what should break or slip?

Bascially, our exact degree turning and exact angle tie fixing paradyms are totally broken.   Both are incompatable with realistic physics and the torque forces applied by hardened ties.  I can't both instantly turn a tied bot 180 degrees (or rotate a tie 180 degrees) and obey the laws of physics.  Something has to give.  In my opinion, we should change the turning and tie angle fixing paradyms so that it is the bot's resulting orientation that gives.  That is, a turn should be interpreted as the bot applying some torque to itself (same with a .fixang request) and that turning force should be added to all the other torque forces on the bot including that of hardened ties and the amount the bot actually turns should vary as the result.  Turns should apply force, which may or may not result in the turn the bot wants (to say nothing about how the bot should loose angular momentum once it's gained it).  

Needless to say, this is a big change, but we will have to do it I think.

But now back to Duo.  Ties connections are bascially spring loaded bearings today.  You can torque them up indefenitaly in 2.42.9d, but this spring loading manifests itself as all sorts of nasty harmonic vibrations and unwarrented spinning when large masses of bots are tied together.  They can even start spinning and vibrating when the bots arn't turnign or doing anything themselves because of brownian motion or even just the quantum nature of bot cycles trying to balance out all the tie forces.  Unlike nature, we can't integrate all forces all the time.  Inbalances build up, particularly when there is little or no friction or fluid resistance.

In 2.42.9e, in an attempt to address some of this mess, I added some code that breaks the tie bearing connection if the torque being applied on the spring loaded bearing by the sum of all the torque forces exceeds pi/2.  This is why Duo is breakign in 2.42.9e.  If it turned itself before the tie hardened and then did the .fixang, it would work fine.  

You may say that a quarter turn of the spring loaded bearing isn't enough and that we should let the bearing wind up a lot farther before it breaks.  I think I agree and will likely change this, but if we had a different turning and angle fixing paradym, it wouldn't be necessary or at least as necessary.  The torque would not get nearly as high as turns or .fixang stores would not be interpreted as absolutes.
Title: 2.43 Changes
Post by: Numsgil on November 23, 2006, 02:59:10 AM
This brings up the issue of using a physics library.

In the mean time, I think bots should be able to swivel around their tie connection freely.  It's not really backwards compatible, but it should allow more versatile multibots.

Bots that want to change the relative angle of two ties would use some sort of muscle like motion.  Like how we can spread our legs or pull them together using our muscles.
Title: 2.43 Changes
Post by: EricL on November 28, 2006, 12:19:55 AM
Bump.  2.42.9f released.

Leagues are working.  I have not tested it completly.  Users are encouraged to play with leagues and report bugs.
Title: 2.43 Changes
Post by: Jez on November 29, 2006, 03:18:50 PM
Sweet! I'll re-run the leagues over the next few days and see.
Title: 2.43 Changes
Post by: Jez on November 29, 2006, 04:33:49 PM
Oh fudge! Darwin Bots Simulator has encountered a problem and needs to close. We are sorry for the inconvenience...  

I was just letting Irish guy's bot walk all over the F1 and F2 leagues just to make sure it worked alright, damn nice MB (spiderweb variety). Don't think we will need a seperate MB league if it makes it all the way!

Prog lost it V DIN2, may have been because I still had Robot data open from James 4 (previous bot)

Anyway, tomorrow I'll work out how to rerun all of the bots to make a new league and post anymore probs.
Title: 2.43 Changes
Post by: Testlund on November 30, 2006, 05:30:54 AM
Quote from: EricL
34)  HUGE.  NEW SYSVAR.   Shapes can now be made visable to bots via a checkbox on the Shapes dialog.

I can't see any such checkbox. I only see the 2 that says "Bots can see through shapes" and "Shapes absorb shots".  
Title: 2.43 Changes
Post by: Henk on November 30, 2006, 09:18:04 AM
Quote from: Testlund
I can't see any such checkbox. I only see the 2 that says "Bots can see through shapes" and "Shapes absorb shots".  

That'll be in the next buddydrop
Title: 2.43 Changes
Post by: EricL on November 30, 2006, 07:05:27 PM
Bump.  2.42.9g released.
Title: 2.43 Changes
Post by: Jez on December 02, 2006, 05:32:00 AM
It was going so well, I had nearly completed the first run of a new league using about 10 bots when the last entry had a race with the bottom bot in the league to see who could die quickest...

It stopped at round 108, population 0 on each side, can't use instawin to trigger the next round.

Also some of the info at the bottom of the screen doesn't seem to be refreshing for each round, cycles is showing ~450,000

It is also adding the last league competitor to the loaded species part of new sim, if it is not deleted when another bot is entered it gets entered again.

This was using DB 2.42.9g

Perhaps it's going to be better if I just enter one bot at a time.  
Title: 2.43 Changes
Post by: EricL on December 02, 2006, 12:20:03 PM
Can you give me more specifics as to exactly the steps you are taking and exactly what happens as a result?

You enterred challengers in the species dialog?  How many?  WHich one caused the issue?  The last one?

Are you using a chengers file?

You started with a league file?  How many there?

Thanks
Title: 2.43 Changes
Post by: Jez on December 03, 2006, 07:42:12 AM
I started with one bot placed as n1 in the league, I added a list of other bots, about ten, to the loaded species list. They all ran fine except that the last bot on the challengers(loaded species) list and the bottom bot on the league list were both non competitive bots. They both took it in turns to die out which is why the rounds reached 108. I don't think it was the bots causing an issue really, I imagine that they both died out at exactly the same time and that's what caused the problem.

My league file has over 90 bots in, all the bots from the existing leagues. I have copied the league file into DarwinbotsII\robots which is where I select all the challengers from. I've done it this way because it's quicker than selecting them from the league file each time.
Title: 2.43 Changes
Post by: EricL on December 04, 2006, 12:39:36 AM
Bump.  2.42.9h released.

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

This drop should be considerred a 2.43 release candidate.  I have implemented all the features I planned to for this version (and then some).  Please pound hard on it and report any bugs you find or last minute feature requests ASAP.  I will likely hold off on releasing an official 2.43 until perhaps the end of the week to provide time for testing.  I'm sure there are a few issues with leagues in particular yet to address and I would like to get those nailed for 2.43.

It is likely I will slack off for a few weeks once 2.43 is released, enjoy the holidays and work on my book a little (which has sufferred greatly due to my DB obsession) so I would like to see 2.43 be a particularly solid and stable release.  Thanks for your help.
Title: 2.43 Changes
Post by: Numsgil on December 04, 2006, 06:14:15 AM
Once 2.43 is released I'll start to move some of my c++ changes into the VB source code.  Especially things that are relatively easy like some of the physics code.  Then I'll start working on DNA and setting up a new DNA system with codules as part of an initiative to port the program to the .Net framework (which will make interfacing with the internet much easier).
Title: 2.43 Changes
Post by: Jez on December 04, 2006, 02:05:04 PM
Apart from the last competitor in league appearing in loaded species list, (if you enter one bot in league then when league matches are finished two bots show in loaded species list) and if you have fixed the problem of the league freezing (supposedly if the competitors die out in the same cycle) then I think the only other thing I would like you to change is the F1 league defaults applying to all possible options. Something I am hoping Light will provide a list for soon.

You deserve a break! You've been incredibly quick off the mark fixing problems that people have found. Hope you enjoy your well earned hols!!
Title: 2.43 Changes
Post by: EricL on December 05, 2006, 12:53:02 AM
Bump.  2.42.9i released.


2.42.9i Buddy Drop Download (http://www.darwinbots.com/FTP/Darwin2.42.9i.zip)

F1 League Contest conditions defaults, fix for the species list issue and for Testlund's visable shapes overflow.  Still working on the league freeze issue.
Title: 2.43 Changes
Post by: Jez on December 05, 2006, 04:48:13 AM
I'll see if I can reproduce that league freeze issue again before I download and test your latest drop.

EDIT

Only took 20 rounds, definetely when both bots die out at same time.  
Title: 2.43 Changes
Post by: EricL on December 05, 2006, 10:39:43 AM
Quote from: Jez
Only took 20 rounds, definetely when both bots die out at same time.  
I have no problem reproducing it.  It's a tight loop somewhere in the routine that picks league winners.  The problem is VB6's damned single threaded IDE means that when the program freezes, the IDE freezes too!  I'll have to do it via code inspection and the exit conditions are a little convoluted.  Should have it soon.
Title: 2.43 Changes
Post by: Numsgil on December 05, 2006, 11:30:11 AM
The way leagues are done is generally convoluted.

I've had great success with a Game state manager (http://gamedevgeek.com/tutorials/managing-game-states-in-c/) in other projects.

Basically you'd push the league state onto the game state stack.  The league would then push the individual competitions onto the stack, and the competitions would push the individual simulations onto the stack.  The code to update the simulation would call an overloaded Execute() method of whatever state is on the top of the stack.

Not sure if this is possible in VB though.
Title: 2.43 Changes
Post by: Jez on December 05, 2006, 12:43:50 PM
Quote from: EricL
I'll have to do it via code inspection and the exit conditions are a little convoluted.  Should have it soon.
Ouch, nasty.
Title: 2.43 Changes
Post by: EricL on December 06, 2006, 12:35:41 PM
Bump.  2.42.9j.

2.42.9j Buddy Drop Download (http://www.darwinbots.com/FTP/Darwin2.42.9j.zip)

All discussed league changes plus a couple of bug fixes.  Not very confident I have addressed the league freeze issue but have made some small tweaks that may have got it.  Let me know if you see it again and if so, which two bots you are using when it freezes.
Title: 2.43 Changes
Post by: EricL on December 08, 2006, 02:44:05 PM
Bump.  2.42.9k.

2.42.9k Buddy Drop Download (http://www.darwinbots.com/FTP/Darwin2.42.9k.zip)

2.43 release candidate.  All known show stoppers addressed.  Speak up in the next 24 hours with any problems or change requests.  Otherwise this will be released as 2.43.
Title: 2.43 Changes
Post by: Numsgil on December 08, 2006, 03:26:09 PM
I would wait another week before proclaiming it as 2.43.  Wait a full week after the last bug is found before bumping it to 2.43.

I know you're ansy, but you don't want to leave on a sour note, do you
Title: 2.43 Changes
Post by: EricL on December 08, 2006, 03:42:45 PM
Okay.  No worries.  I'm not really going anywhere anyway (just going to try to curtail my coiding time for a few weeks).  My only hurry is that I know you want to start partying on the code or at least have a good starting base to move it into a source code management system but if your in no hurry, I'm not either...
Title: 2.43 Changes
Post by: EricL on December 08, 2006, 04:29:55 PM
Bump.  2.42.9L Released.

Addressed an overflow bug in making venom and poison when venom and/or posion costs or CostX are very small e.g. 0.0001

2.42.9L Buddy Drop Download (http://www.darwinbots.com/FTP/Darwin2.42.9L.zip)
Title: 2.43 Changes
Post by: Jez on December 08, 2006, 07:25:21 PM
2.42.9L

I keeps saying it is having problems reading from my league folder. Abandoning attempt.

Sometimes it comes up with an EMPTY file in the loaded species list.

Is there anything you have changed in the way leagues are run that I should be taking into account when starting a league? Such as needing two bots in species list or not needing veg or veg not called Alga_Minimalis anymore? I've tried lots of different ways to no avail, or is it just because I cut the league.txt file to 1 entry again?

Actually, just tried running a couple of bots in old F1 league rather than personal league. It always called the 2nd bot in list (just to right of list, properties for: ) Empty.txt, on each attempt to run league got grey screen and it changed 2nd bot in list's name to EMPTY

Just checked and it was doing that when tried to run personal league as well.

Only way I can avoid either of those problems is to just put 1 bot in list and run existing league, that still just seems to give grey screen though.

Aargh! What are the magic words to get it to run...
Title: 2.43 Changes
Post by: EricL on December 08, 2006, 09:52:35 PM
I havn't changed anything intentionally and have not been playing with or testing non-F1 leagues at all.  I'll dive into it, but not until tomorrow I'm afraid...
Title: 2.43 Changes
Post by: Jez on December 09, 2006, 09:05:34 AM
Np, thanks for having a look, I'll try the leagues again a bit later and check it again.
Title: 2.43 Changes
Post by: EricL on December 10, 2006, 04:33:40 PM
2.42.9m Buddy Drop Download (http://www.darwinbots.com/FTP/Darwin2.42.9m.zip)

Mostly League mode fixes.  Try leagues now.
Title: 2.43 Changes
Post by: Griz on December 11, 2006, 01:16:53 AM
Quote from: EricL
2.42.9m Buddy Drop Download (http://www.darwinbots.com/FTP/Darwin2.42.9m.zip)

Mostly League mode fixes.  Try leagues now.

I'd given up trying to get leagues to work ...
haven't been able to since 2.36 ...
and even then there were problems ...
but I could at least run a match on occasion.

so thought I'd give 2.42.x a try ...
seeing as you guys have been working on it
and jez had provided some guidance/basics.
I had high hopes
but ...
forgettabout it ...
don't fly ...
no matter what I try.
not with any 2.42.x version, including 'm'.
 
error.sim zip attached
Title: 2.43 Changes
Post by: EricL on December 11, 2006, 01:24:16 AM
Quote from: Griz
I'd given up trying to get leagues to work ...
haven't been able to since 2.36 ...
and even then there were problems ...
but I could at least run a match on occasion.

so thought I'd give 2.42.x a try ...
seeing as you guys have been working on it
and jez had provided some guidance/basics.
I had high hopes
but ...
forgettabout it ...
don't fly ...
no matter what I try.
not with any 2.42.x version, including 'm'.
 
error.sim zip attached
Your sim crashes the first time the first bot in the sim is being drawn due to a huge X positon value.  I suspect you have a corrupt sim file of some sort.

If you are going to file bugs, please do it as a separate topic and with a complete description of the steps you took to produce the problem.
Title: 2.43 Changes
Post by: Jez on December 11, 2006, 03:36:36 AM
Looks good to me, it did still say it had an error reading from the custom league I had created but it then ignored the error and carried on with the league.   (probably a user error)

It also looked pretty much like the old leagues did, with the few bots I have tested so far anyway, the only thing that looks different is the veg stacking as it got larger rather than spreading out as it used to. Not really a problem as far as I am concerned, it will just sometimes handicap the more stationary bots, specially as the change in bot sizes now means that the league field size can give more space for the bots.

I'll have a go at running a new F1 league from scratch and using all the old league entries to see if I spot any real problems.

Great work Eric! Thanks loads.

PS Griz, I hope you have managed to sort your problem with leagues.
Title: 2.43 Changes
Post by: Numsgil on December 11, 2006, 04:51:21 AM
Are vegs fixed in the league settings?  I thought vegs were supposed to be mobile for the leagues.
Title: 2.43 Changes
Post by: Jez on December 11, 2006, 05:24:22 AM
I think so, they were certainly not ticked as stationary when I checked. I'll see soon, now that I've renamed the first 27 entries for leagues.

Think it is undisturbed veg growing in patch that overlap.

EDIT

Yeah they certainly don't seem to be motionless
Title: 2.43 Changes
Post by: Griz on December 11, 2006, 10:27:21 AM
Quote from: Jez
Looks good to me, it did still say it had an error reading from the custom league I had created but it then ignored the error and carried on with the league.   (probably a user error)

It also looked pretty much like the old leagues did, with the few bots I have tested so far anyway, the only thing that looks different is the veg stacking as it got larger rather than spreading out as it used to. Not really a problem as far as I am concerned, it will just sometimes handicap the more stationary bots, specially as the change in bot sizes now means that the league field size can give more space for the bots.

I'll have a go at running a new F1 league from scratch and using all the old league entries to see if I spot any real problems.

Great work Eric! Thanks loads.

PS Griz, I hope you have managed to sort your problem with leagues.

nope.

I've had that read error as well ...
and yet it continues on ...
and encounters other probems.
ver m doesn't get that far for me.

is there a thread other than this one where we
can report and work on various problems?
these are likely not really 'bugs' ...
but just having all one's duck in a row.
I'd like to start 'clean' ...
using a F1 league/league table/bots that you
know works for you ...
if those are available somewhere to copy.

anyway ...
is there a league bug/problem thread?
talk to you there.

thanks
Title: 2.43 Changes
Post by: Griz on December 11, 2006, 10:36:24 AM
Quote from: EricL
Your sim crashes the first time the first bot in the sim is being drawn due to a huge X positon value.  I suspect you have a corrupt sim file of some sort.

If you are going to file bugs, please do it as a separate topic and with a complete description of the steps you took to produce the problem.

I don't know that I have any sims using 2.42.x that are not corrupt.

how about a Default F1 League sim that is known to work ...
with correct league tables and F1 league bots ...
that I can copy?

is there an existing League Bug/Problem Thread somewhere?
Title: 2.43 Changes
Post by: Jez on December 11, 2006, 10:57:49 AM
If you can use the Running leagues yourself (http://www.darwinbots.com/Forum/index.php?showtopic=1755) thread otherwise you'll have to start a league problems thread somewhere and I'll add a link to it from the running leagues yourself thread for anyone else that has problems.

EDIT

Or put it here: league problems (http://www.darwinbots.com/Forum/index.php?showtopic=1678)
Title: 2.43 Changes
Post by: EricL on December 11, 2006, 01:15:31 PM
Quote from: Jez
Looks good to me, it did still say it had an error reading from the custom league I had created but it then ignored the error and carried on with the league.   (probably a user error)
I've tried to add more forgivness in places such as when a league subdirectory doesn't exist.  The code will let you know and create it now.  Similarly when the DNA for a bot in a league file isn't present in the league's sub directory, I prompt for it and then move it there.  Could be you hadn't created the subdirectory (or typoed the name or something).  Let me know what the error is if you hit it again.

Quote from: Jez
It also looked pretty much like the old leagues did, with the few bots I have tested so far anyway, the only thing that looks different is the veg stacking as it got larger rather than spreading out as it used to. Not really a problem as far as I am concerned, it will just sometimes handicap the more stationary bots, specially as the change in bot sizes now means that the league field size can give more space for the bots.
I imagine the combination of middle of the road collision elasticity (which translates to bot overlap repel force) with metal surface friction is to blame for veggies stacking up.  When veggies reproduce, their offspring are obviously right next to the parent and they don't overlap but then when they are prevented from reproducing by the population limits they will grow VERY big over time and will end up overlapping some.  Note that this will appear more pronouced on some screens with aspect ratios diferent from the 4X3 used by DB.

Quote from: Jez
Great work Eric! Thanks loads.

Thank you.  I spend a lot of time on DB.  Its nice to be recognised.
Title: 2.43 Changes
Post by: EricL on December 11, 2006, 08:21:17 PM
Bump.

2.42.9n Buddy Drop Download (http://www.darwinbots.com/FTP/Darwin2.42.9n.zip)

F1 waste threshold now 10000.
Fix for invisable shapes blocking vision.
Title: 2.43 Changes
Post by: Jez on December 12, 2006, 05:06:25 AM
You are just to good to be true sometimes Eric! I'll try rerunning the leagues again later, thanks.
Title: 2.43 Changes
Post by: EricL on December 14, 2006, 01:26:13 AM
Bump.

2.42.9o Buddy Drop Download (http://www.darwinbots.com/FTP/Darwin2.42.9o.zip)

Did away with the recursive way in which the league code invoked rounds.  Minor surgury.  Don't think I messed anything up.  Hopefully, the stack overflow issue when running leagues should now be a thing of the past.

Also implemented the max rounds feature for leagues.  See the first post in this topic for details.
Title: 2.43 Changes
Post by: Jez on December 14, 2006, 05:13:24 AM
Thankyou Sir!

Will go and try it out..
Title: 2.43 Changes
Post by: EricL on December 19, 2006, 12:05:08 PM
Bump.

2.42.9p Buddy Drop Download (http://www.darwinbots.com/FTP/Darwin2.42.9p.zip)

Shots are now saved in sim files.  I've tested this pretty well I think, but I would appreciate it if people could try loading and saving a few sims with shots.  In particular, I would be interested in hearing confirmation that sims with virus shooters save and load properly as there are some delicate issues with saving and loading virus shots.

This drop does not have any new work on leagues.  I will dig into that today and probably make a drop with league fixes tomorrow.  This release is pretty close to what I think 2.43 should be however.  I'd like to make that release this week so I can enjoy the holidays.
Title: 2.43 Changes
Post by: EricL on December 21, 2006, 11:34:20 AM
Bump.

2.42.9q Buddy Drop Download (http://www.darwinbots.com/FTP/Darwin2.42.9q.zip)
Title: 2.43 Changes
Post by: Testlund on December 21, 2006, 01:53:48 PM
You think you could add the Dynamic Costs function for veggie only sims before New Years Eve? Unless there were objections against it. Forgot what topic this were mensioned in. Right now I've been running my evosim for days at 0.2 cycles with 1000 vegs in it. Maybe this function could lower the amount of vegs and keep the best fit and speed up the program a little. Don't want to change other things to speed up the program, like turning off vision for instance.  

The best thing whould be if you could make the dynamic cost work individually for autotrophs and heterotrophs, so you can keep selective pressure on each kind. For instance, in my other sim I think I have 1400 vegs and only 300 bots and everything stands still. No costs or reproduction.
Title: 2.43 Changes
Post by: Jez on December 21, 2006, 03:38:40 PM
Quote from: EricL
Bump.

2.42.9q Buddy Drop Download (http://www.darwinbots.com/FTP/Darwin2.42.9q.zip)

Thankyou! I'll have another go at running leagues, fingers crossed.  
Title: 2.43 Changes
Post by: EricL on December 22, 2006, 02:19:43 PM
Quote from: Testlund
You think you could add the Dynamic Costs function for veggie only sims before New Years Eve?
Okay.

2.42.9r Buddy Drop Download (http://www.darwinbots.com/FTP/Darwin2.42.9r.zip)
Title: 2.43 Changes
Post by: Testlund on December 23, 2006, 10:00:10 AM
Awesome!  

Though I think you mean include autotrophs but you wrote heterotrophs.  
Title: 2.43 Changes
Post by: EricL on December 23, 2006, 12:18:57 PM
Quote from: Testlund
Awesome!  

Though I think you mean include autotrophs but you wrote heterotrophs.  
oh, yea.
Title: 2.43 Changes
Post by: EricL on January 02, 2007, 01:07:15 PM
Bump.

2.42.9s Buddy Drop Download (http://www.darwinbots.com/FTP/Darwin2.42.9s.zip)

Crushed a really hard to find crashing issue plus some other things.
Title: 2.43 Changes
Post by: Jez on January 02, 2007, 01:13:04 PM
Quote from: EricL
Crushed a really hard to find crashing issue plus some other things.

Yay!   Will rush off to try...
Title: 2.43 Changes
Post by: Griz on January 02, 2007, 02:54:30 PM
Quote from: EricL
Bump.

2.42.9s Buddy Drop Download (http://www.darwinbots.com/FTP/Darwin2.42.9s.zip)

Crushed a really hard to find crashing issue plus some other things.

great!
I see you put up the source also:
2.42.9s Buddy Drop source (http://www.darwinbots.com/FTP/Darwinsource2.42.9s.zip)

tanks
Title: 2.43 Changes
Post by: Testlund on January 03, 2007, 02:17:52 AM
Boing!        
Title: 2.43 Changes
Post by: EricL on January 10, 2007, 04:30:51 PM
Bump.


2.42.9t Buddy Drop Download (http://www.darwinbots.com/FTP/Darwin2.42.9t.zip)
Title: 2.43 Changes
Post by: Jez on January 10, 2007, 05:35:51 PM
You da' man!!

Not sure how this affects me 2bh but could you give league rotations a default cost pls. (if you haven't already!)
Title: 2.43 Changes
Post by: EricL on January 10, 2007, 05:51:51 PM
Quote from: Jez
Not sure how this affects me 2bh but could you give league rotations a default cost pls. (if you haven't already!)
Turning cost for F1 leagues is currently forced to be zero.  Would you like it non-zero?
Title: 2.43 Changes
Post by: Jez on January 11, 2007, 05:38:19 AM
No that's fine, I just wanted to make sure you had defaulted it for the leagues. (Although it might add a little bit more variation to league, hmm, will watch what changes it makes to bots behaviour.   )
Title: 2.43 Changes
Post by: Testlund on January 11, 2007, 07:56:22 AM
Wonderful! It looks like the problem with the day/night cycles was only the thing that you have fixed here. I did some more testing and it seems to work with even longer day/night cycles than 10000. Maybe it was this ui problem that was messing it all up. Nice! Also the rotation cost is much appreciated.  
Title: 2.43 Changes
Post by: Numsgil on January 11, 2007, 05:07:40 PM
I want to make sure that the turning cost's been done right, so bear with me.

The "proper" way to charge for turning is the following:

Force = I * (float)fabs(DeltaW) / this->radius;
Cost = Force * SimOpts.Costs[TURNCOST];

where I is the moment of inertia (or whatever, it's been a while since I looked at this) and is equal to this->mass * this->radius * this->radius * 2.0f/5.0f;

The most primary thing I want to point out is that bots should only get charged for changing their rate of turning.  Spinning at a constant rate shouldn't cost any nrg, and neither should not spinning.  Everything else above is just fluff to make the physics work out, and you can use it or not at your own discression.  But I really want to push the point above.
Title: 2.43 Changes
Post by: EricL on January 11, 2007, 07:24:16 PM
So, I haven't modifed the turning paradym yet.  That is a post 2.43 work item and I'll probablly make it optional for backward compatability reasons, perhaps even adding new sysvars for the new turn actions.  Thus, values written .aimdx and .aimsx today are still absolute degree requests, not turning force requests.  They accelerate, turn and decelerate all in one cycle.  Bots can have and keep angular momentum even today (primarily due to tie torque actions) which may keep them spinning withotu action on their part, but voluntary turns do not add to angular momentum (although they will reduce it if the turn direction is opposite the aquired spin).   This is broken I know, but its the best I can do at present without changing the turning paradym.

So, the way it is set up now, bots only get charged a turning cost for turns they make.  There is no charge for aquired angular momentum.  That is, a turning bot that is spinning due to aquired angular momentum will keep turning without charge.  It's just that today, it's really hard to aquire angular momentum.  A single voluntary turn request will not keep a bot spinning.

The turning cost today is proportional only to the amount of the turn and is not currently dependent on bot mass or radius.  I will change this as you indicate, but doing so won't help the larger issue above.
Title: 2.43 Changes
Post by: Numsgil on January 12, 2007, 11:44:54 PM
There are two ways you could think of bot commands: kinematics or dynamics.

At first, when I was playing around with the new physics, I imagined bot commands to be dynamic: that is, specify a force and have the bot respond appropriately.

However, as I've played with it more, I think a kinematic approach is preferable.  That is, specify a desired action and have the amount of effort needed to arrive at that result be calculated.

Mass and radius for bots are highly variable, so having sysvars use forces means that evolution is going to have a harder time to accomplish a comparable task using kinematic controls.

So then, if you view aimdx and aimsx as being angular velocity requests, it becomes pretty easy to implement rotational costs even if you don't have a proper physical system up and running.  All you need to do is add another variable to the robot data structure to remember your old aim.

It may seem a little odd to do it like this, where storing, say, 5 into aimdx every cycle means you don't get charged anything, but I think it makes the most sense.
Title: 2.43 Changes
Post by: EricL on January 13, 2007, 02:24:16 PM
I do indeed find the kinimatic approach to be non intuitive.  A big problem I see is what to do about cases when the bot attempts to do something that cannot be done.  They attempt to turn but a tie with a fixed angle prevents them.  They attempt to accelerate to some velocity, but are against a shape or a fixed bot.  A fixed bot attempts to pivot a hardened tie with another fixed bot on the other end and so on.

There will be many such cases where the action cannot be completed or can only be completed partially or where completing the action in a single cycle would require enormous amounts of nrg, more than a bot should be able to expend in a single cycle.

Another problem I see with the kimimatic approach is the difficulty in calculating what amount of effort is required to achive some goal.  Imagine a bot tied to a large cluster of other bots that attempts to rotate.  Whiel it is relativly straight forward to take a specific applied force and calculate the effect translated to the bots in the cluster via the tie, it is rather difficult to do the reverse I.e. figure out what force needs to be applied to rotate the cluster about it's center of mass such that the bot rotates the requested amount.  Remember you have to integrate all the requests from all the bots in the cluster...

It may have shortcomings, but the dynamic approach seems to me to be more straight forward and intuitive.  Bot's apply forces, there are limits on the magnitudes of the forces they can apply per cycle, the resultant action is a consequence of the force applied and the world physics.  Results are not absolute.  If a bot applies a turning force with a fixed tie, the entire structure aquires some angular momentum but only an amount proportional to the force applied as a function of the mass and moment of the structure.  If a bot attempts to accelerate against a fixed object or torque a tie with a fixed bot on the other end when fixed himself, it still gets charged nrg proportional to the force applied even if no Work (capital W) is performed.

Bots may need to compensate for their mass and radius in the forces they evolve to apply.  But what's more, bots will need feedback logic to guage the results of their actions.  Matching velocity with another bot for example, will be an itertive process.  This seems immently intuitive to me.

The limits on the per cycle forces that are allowed to be applied per cycle should probably be a function of certain bot properties such as mass I.e. heavier bots can apply larger turning or acceleration forces per cycle than lighter bots can.  To deal with the issue you mention of differening mass and radius, I might suggest we change the paradym for the movement sysvars such that the value written represents a percentage of the max allowed or use some other scaling method such that the units of the force request take mass and moment into considertaion.  In this way, the same DNA works for small bots and large bots.
Title: 2.43 Changes
Post by: Numsgil on January 14, 2007, 12:08:06 AM
Yep, I agree that both kinematic and dynamic methods have advantages/disadvantages.  You briefly touch on it, but I think perhaps the answer is to use kinematic inputs and outputs to control dynamic forces.

After all, if you're scalaing .up by the mass of the bot, you really have a kinematic control controllong a dynamic process.  This would seem the best way to handle this to me.  Bots send information to sysvars in a way thats kinematic, but these are translated into forces which may or may not do what the bot expects.  As in your single bot as part of a multibot example, trying to go 5 .up may or may not accelerate you by 5 twips/cycle, but it does translate into the same acceleration for small and large bots, which avoids issues of scaling.
Title: 2.43 Changes
Post by: EricL on January 19, 2007, 03:05:46 PM
2.42.9u Buddy Drop Download (http://www.darwinbots.com/FTP/Darwin2.42.9u.zip)

Okay, pound on this one.  It will be 2.43 unless something major comes up in the next couple of days.

I've seen a few posts related to league issues over the past week or two, but nothing actionable and thus I have made no changes in the area of leagues recently.  If you know of something that needs to be fixed for this release, for leagues or anything else, please bring it to my attention ASAP.  Thanks.
Title: 2.43 Changes
Post by: EricL on January 22, 2007, 05:51:38 PM
2.42.9v Buddy Drop Download (http://www.darwinbots.com/FTP/Darwin2.42.9v.zip)

Changes in boolean stack behaviour and auto-costs this drop were significant enough to require one more buddy drop.  This will be 2.43 tomorrow unless someone finds a showstopper.
Title: 2.43 Changes
Post by: Jez on January 22, 2007, 11:38:14 PM
LOL. so much for the original week timeline for 2.43. You are a showstopper in your own right, thanks for all the time you have spent on this project. Respect.
Title: 2.43 Changes
Post by: EricL on January 23, 2007, 01:39:11 PM
Bump.

2.42.9w Buddy Drop Download (http://www.darwinbots.com/FTP/Darwin2.42.9w.zip)

Addressed crash with venom shots and another with the mutation rates dialog.  Still on track to post as 2.43 late tonight or tomorrow morning PST.
Title: 2.43 Changes
Post by: Numsgil on January 24, 2007, 11:14:22 PM
After you post 2.43, don't make any source changes unless they're minor.   That'll give me time to find and set up a good source control system without you having to manually find and insert new changes into the system.

Ideally, I'd like the VB, C++, and C# sources to all be hosted by the same system, but physically seperate.  Sourceforge is always an option, even with the issues of GPL.
Title: 2.43 Changes
Post by: EricL on January 25, 2007, 12:18:53 PM
2.43 is released.   2.43 Download (http://www.darwinbots.com/FTP/DarwinBots2.43.zip)

Whew!!!!

I plan to take a few weeks away from DB coding and focus on other projects so the change rate should drop off to zero for a little while at least.  I will still be hanging around the forums and if any serious issues do crop up in 2.43, I'll take care of them and check any changes into the multiple forks once that is set up.
Title: 2.43 Changes
Post by: Testlund on January 29, 2007, 03:17:37 PM
Maybe you could update the link to this drop in the list of changes so it works to download from there too. It only seems to work downloading from the link here.
Title: 2.43 Changes
Post by: EricL on January 29, 2007, 04:06:43 PM
Quote from: Testlund
Maybe you could update the link to this drop in the list of changes so it works to download from there too. It only seems to work downloading from the link here.
Done.