Code center > Darwinbots Program Source Code

No fix for ghost collisions with planet eaters necissary

<< < (3/5) > >>

Numsgil:
The timings look weird to me.

Make sure you're starting the simulation up and then starting the capture.  There's a lot of time in the capture from what looks like the application starting up and you starting a new simulation.  You probably don't want to be capturing that.

I'll play with it more later tonight if I have time.

Botsareus:
Actually I started both runs after starting a sim and disabling video. However, I only captured for one hour and my cpu is not top notch.

Numsgil:
You usually don't need more than 10-20 seconds of capture.  You're just looking for trends.

Anyway, I was able to take a capture of it with good data.  Looks like Robots::UpdateRobots takes about 80% of the time.  Which makes sense since pretty much everything goes through that.

37% is taken up by Buckets_Module::CompareRobots3.  Half of that is in Common::VectorMagnitude.  The symbols don't point to the source code I have on disk (they point to your J:/... drive path), so I can't find where in that all the time is going.

I'm attaching the capture.  Play around with it inside Sleepy until you feel comfortable figuring out how I got those numbers.  Profiling is a skill worth having if you're starting a career as a programmer.

In terms of making it faster, you could probably cache a lot of the calculations going on in CompareRobots3.  It's basically calculating how far a robot can see from scratch for every robot-robot vision check.  It would also be worthwhile to double check that the bucket system is still working.  If that was broken it would be difficult to detect other than that the program would be slower.

Botsareus:

--- Quote ---In terms of making it faster, you could probably cache a lot of the calculations going on in CompareRobots3.  It's basically calculating how far a robot can see from scratch for every robot-robot vision check.  It would also be worthwhile to double check that the bucket system is still working.  If that was broken it would be difficult to detect other than that the program would be slower.
--- End quote ---

I will windiff the source for CompareRobots3 and Bot bucket system, though I am pretty sure I have not even touched these.
I will also take a look at your capture.



--- Quote ---The symbols don't point to the source code I have on disk
--- End quote ---

No wonder I could not figure out anything, I forgot that it uses the actual source code.

Botsareus:
Ok, the only difference is the eye strength mod for pondmode. But I think that is still faster then calculating shadow lines. If pondmode is off it is x1.
Anyway, thank you for your help. I think I am confident enough to move on.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version