Darwinbots Forum

Code center => Bugs and fixes => Topic started by: EricL on June 19, 2006, 02:02:13 PM

Title: 2.42.6e
Post by: EricL on June 19, 2006, 02:02:13 PM
[attachment=320:attachment][attachment=316:attachment]

In the course of working on performance for the next version, I re-wrote the shot/bot collision routine (again).  The result was gratifying.  This version is substantially, noticably faster than 2.42.6, so much so that I thought it a good idea to drop this buddy drop.  I'll wait until 2.42.7 to drop source and update the FTP page, but for those wanting a significantly faster 2.42.6, this is for you.

I have verified that the upload suceeded.
Title: 2.42.6e
Post by: Griz on June 19, 2006, 02:53:05 PM
so ... we find it where?
Title: 2.42.6e
Post by: EricL on June 19, 2006, 05:03:02 PM
[attachment=324:attachment]

I 've attached it 6 times and each time, the zip checksum fails.  Let me try a new post...

Okay, this one seems to have worked finially...
Title: 2.42.6e
Post by: EricL on June 19, 2006, 05:22:54 PM
I should add the that extra pair of zoom magnifying glass buttons on the right end of the button bar are temporary - they control profiling.  I don't know what will happen if you click them.  Maybe nothing maybe crash.  Sorry, forgot to hide them.
Title: 2.42.6e
Post by: Griz on June 19, 2006, 05:30:06 PM
ok ... got it.
and it seems to work.

haven't had a chance to play with anything since 2.42.4 ...
but have all your 'destructions' downloaded so will do some
experimenting this week.
 
I know it has to be a labor of love ...
but thanks for all the work.
now if only I had time to keep up.
Title: 2.42.6e
Post by: Testlund on June 19, 2006, 08:45:06 PM
Yeah, it runs a little faster now. Check out my screenshot with tons of shots flooting around. It's down to 0.6 cycles per second but I think that's acceptable on a 1.53 MHz processor and 512 MB ram. I have the field size set to 8 with 9 different species and I'm going to run this through night to see what happens.

And those extra magnifying glasses should be left alone.  
Title: 2.42.6e
Post by: EricL on June 19, 2006, 10:49:55 PM
Wow.  You have over 20,000 shots in this sim.  Nice.  I think the next release will have a dialog that lets you select exactly which kind of shots you want to decay and whice ones you don't.  A problem I've encounterred is that you end up with two many -1 and -6 shots floating around, creating very lethal environment...
Title: 2.42.6e
Post by: Numsgil on June 20, 2006, 12:26:44 AM
I definately think that you should limit the number of -1 and -6 shots floating around the sim, for the sake of the bots.  Reminds me of a sci fi story where the Soviet and American military bases on the Moon learned to peacefully coexist because stray bullets could reach orbit and perigee (or apigee?) back at base that shot them

I can see arguments for venom and poison, and waste and nrg should probably stick around forever, never decaying.

Just 2 cents
Title: 2.42.6e
Post by: Testlund on June 20, 2006, 03:17:12 AM
Well, what happend was that I found early this morning that the program had crashed, displaying the dialog 'Darwinbots has encountered a problem and needs to close'. All shots had dissapeared too. Maybe it got too much for the program to handle. So maybe reducing the kind of shots that don't decay might make it more stable.
Title: 2.42.6e
Post by: EricL on June 20, 2006, 10:23:29 AM
Quote from: Testlund
Well, what happend was that I found early this morning that the program had crashed, displaying the dialog 'Darwinbots has encountered a problem and needs to close'. All shots had dissapeared too. Maybe it got too much for the program to handle. So maybe reducing the kind of shots that don't decay might make it more stable.
Its just another overflow that may or may not be related to shots.  I hit it too and I'm tracking it in VB now...
Title: 2.42.6e
Post by: EricL on June 20, 2006, 02:02:34 PM
Okay, I found the crash.  There was a bug in my new shot collision detection algorithm which would exhibit itself in the rare case where the relative velocity of the shot and bot was exactly 0.

The attached buddy drop has the fix.
Title: 2.42.6e
Post by: EricL on June 20, 2006, 02:16:27 PM
[attachment=339:attachment]Once again, trying to attach using a new post...
Title: 2.42.6e
Post by: Elite on June 20, 2006, 02:49:18 PM
Still doesn't work  

Maybe try re-ziping it?
Title: 2.42.6e
Post by: EricL on June 20, 2006, 02:55:16 PM
Okay, I put it up on the FTP share.  This seems to work.  I think the http server or a script there-in is dropping bits...



Try this link (http://www.darwinbots.com/FTP/Darwin2.42.6b.zip)
Title: 2.42.6e
Post by: Testlund on June 21, 2006, 11:27:32 AM
Nice. It looks like you have done something else too. I find that when I zoom all the way out the bots don't look solid anymore.    

And I'm glad you got rid of those extra magnifyers, cause I accidently clicked on them sometimes, wich crashed the program.
Title: 2.42.6e
Post by: EricL on June 21, 2006, 11:32:23 AM
Actually I think that version has a debugging feature turned on.  In that version, the bot turns a color approriate to the type of shot that impacted it (just for 1 cycle).  It won't be that way in the next official release.
Title: 2.42.6e
Post by: Testlund on June 21, 2006, 11:45:48 AM
No, I meant that before when I zoomed out all the bots and veggies looked like solid dots, but now when I zoom all the way out they are still little circles, wich looks better.

But I found this instead. I have a screenshot here with Triangulus communicating with ties that blink white, but also causes the bot to turn solid white. It doesn't bother me much but maybe that's not supposed to be.
Title: 2.42.6e
Post by: Elite on June 21, 2006, 11:50:21 AM
It's crashing on me quite a lot

When I try to run Una 3.0 ot SWARM SG in a sim it gives an overflow error in the first couple of seconds

I don't seem to be doing anything other than putting Una or SWARM SG in the sim so maybe you could run a sim and step through it in VB (unless its one of those pesky executable-specific bugs) - it should overflow within seconds.
Title: 2.42.6e
Post by: Testlund on June 21, 2006, 12:00:31 PM
Sometimes I post here a little too quickly before I have checked something out properly. It looks like the bots turns white for a cycle when they pick up an energy shot, like you said, Eric. But I think this looks nice though. It's easier to tell this way when a bot picks up a shot.  
Title: 2.42.6e
Post by: EricL on June 21, 2006, 12:06:19 PM
Quote from: Testlund
No, I meant that before when I zoomed out all the bots and veggies looked like solid dots, but now when I zoom all the way out they are still little circles, wich looks better.
Ah, right.  I did fixed a minor bug where the fillstyle wasn't getting initialized to transparent.  Bots would be solid until you zoomed.
Title: 2.42.6e
Post by: EricL on June 21, 2006, 12:07:44 PM
Quote from: Elite
It's crashing on me quite a lot

When I try to run Una 3.0 ot SWARM SG in a sim it gives an overflow error in the first couple of seconds

I don't seem to be doing anything other than putting Una or SWARM SG in the sim so maybe you could run a sim and step through it in VB (unless its one of those pesky executable-specific bugs) - it should overflow within seconds.
Any chance you can attach the sim?  Helps me save time.  Thanks.
Title: 2.42.6e
Post by: Elite on June 21, 2006, 12:12:58 PM
error.sim is attached
Title: 2.42.6e
Post by: Elite on June 21, 2006, 12:13:05 PM
error.sim is attached
Title: 2.42.6e
Post by: Elite on June 21, 2006, 12:13:33 PM
error.sim is attached
Title: 2.42.6e
Post by: EricL on June 21, 2006, 12:14:05 PM
Quote from: Testlund
Sometimes I post here a little too quickly before I have checked something out properly. It looks like the bots turns white for a cycle when they pick up an energy shot, like you said, Eric. But I think this looks nice though. It's easier to tell this way when a bot picks up a shot.  
You will like what this feature becomes in 2.42.7 then.  Instead of turning the whole bot solid, I display a smaller circle (radius 20) at the point of impact.  This allows for easy identification of shot impact as well as the type of shot and the actual point of impact.  It also lets you see multiple impacts that happen on the same bot on the same cycle.

I needed this for debugging.  Its not very computationaly costly and it turns off with any of the graphics reduction settings.  You can also turn it off exclusively, so everyone should be happy.
Title: 2.42.6e
Post by: Elite on June 21, 2006, 12:15:44 PM
OK, after much coaxing it uploaded, I hope this works ...
Title: 2.42.6e
Post by: EricL on June 21, 2006, 12:33:55 PM
Quote from: Elite
OK, after much coaxing it uploaded, I hope this works ...
Got it.  Bot 17's velocity is overflowing the single valued vaurables in the friction routine.  I suspect somewhere the code is doing assignment using a double or Long.  Will have to look at everyplace velocity gets changed.  Probalby has to do with gravity.  Stay tuned.
Title: 2.42.6e
Post by: EricL on June 21, 2006, 01:15:00 PM
Is it possible for you to post a sim from before the error occurred?  The error.sim file contains bots whose velocity has already overflowed.  I need to track down the root cause of why the velocity is overflowing in the first place so I need to catch it in the act so to speak.

BTW, I suspect this is specific to your specific physics settings, so I do appreciate you posting the sim as it lets me reproduce them exactly.  Thanks.
Title: 2.42.6e
Post by: Elite on June 21, 2006, 01:33:51 PM
OK, here's a similar sim, it will overflow within a couple of cycles
Title: 2.42.6e
Post by: EricL on June 21, 2006, 02:28:08 PM
Found it.  In sims with fluid density=0, the sphere drag routine could cause bot velocities to get progressivly smaller and smaller but never reach 0, eventually resulting in an overflow of the Single valued velocity varibles.  I now avoid the drag routine all together when density is 0 (without fluid desity there is no drag - friction yes, but not drag) and added some protection code which now sets very very small velocities to zero in such cases.

Here's a new buddy drop.  Give it a try.



Darwinbots 2.42.6c (http://www.darwinbots.com/FTP/Darwin2.42.6c.zip)
Title: 2.42.6e
Post by: Testlund on June 21, 2006, 09:50:38 PM
I just crashed. I've been running this latest drop for some hours, then when I was looking at it now all shots dissapeared and a few seconds later it crashed, displaying the dialog 'Darwinbots has encountered a problem and needs to close'. I think I had something like 30000 shots on screen. I guess I had between 300-400 bots and 600-700 veggies. Also when I loaded the last outosave now all shots were gone. It looks like shots aren't saved.  
Title: 2.42.6e
Post by: EricL on June 21, 2006, 10:34:39 PM
Shots arn't saved.  Never have been.  I could add that, but there are other things higher on the list.

You were runing 2.42.6c?  Post the last autosave and I'll see if I can repro...
Title: 2.42.6e
Post by: Testlund on June 22, 2006, 10:10:01 AM
Hmm... I think it might be hard to repro. I loaded the last autosave myself and it has been running perfectly the rest of the night and the whole day. I suspect it COULD be that when there gets too many shots in the sim it is more likely to crash. Now the shots seems to have stabelized somewhat, at around 23000. I also have only 55 bots and 627 veggies. Speed is at 0.3 cycles/sec. But I guess I could upload the last save I have here if you whould have time to check it out.

By the way, nice to see you have fixed the mutation rates allready.  
Title: 2.42.6e
Post by: EricL on June 26, 2006, 12:07:53 PM
Latest buddy drop.  Fixes a crashing bug in 2.42.6d related to insertion and deletion mutations.


Darwinbots 2.42.6e (http://www.darwinbots.com/FTP/Darwin2.42.6e.zip)