Darwinbots Forum

Code center => Bugs and fixes => Solved Bugs => Topic started by: Testlund on September 09, 2013, 02:50:10 PM

Title: Division by zero
Post by: Testlund on September 09, 2013, 02:50:10 PM
This should happen within a few minutes after you load it.
Title: Re: Division by zero
Post by: Panda on September 09, 2013, 03:18:11 PM
Oh bugger. :L
Title: Re: Division by zero
Post by: Panda on September 09, 2013, 04:00:13 PM
I can't recreate it!
Title: Re: Division by zero
Post by: Botsareus on September 09, 2013, 04:43:07 PM
There is a painful div/0 bug I introduced by adding new dna commands, I was trying to track it down, but had little luck. I'll have another go at it next weekend.
It is really bothering me because I put integrity checks on all new commands I added.

Code: [Select]
addstore
substore
multstore
divstore
ceilstore
floorstore

rndstore
sgnstore
absstore
sqrstore
negstore

anglecmp

unpow
depow
sin (multiplied by 32000)
cos
Title: Re: Division by zero
Post by: Panda on September 10, 2013, 05:35:32 AM
Yeah, I was looking through those as well, I couldn't really find what the problem was
Title: Re: Division by zero
Post by: Testlund on September 10, 2013, 08:14:58 AM
At least it doesn't seem to happen often. This happened on my laptop with Win XP when I was running two instances with randombots. It hasn't happened yet on my desktop with Win 7 where I'm running two instances with designed bots.
Title: Re: Division by zero
Post by: Botsareus on September 15, 2013, 05:39:55 PM
Found it, was caused by attempting to divide by log(1)
Title: Re: Division by zero
Post by: Botsareus on September 21, 2013, 11:40:25 AM
enabled some low level checks in an attempt to stabolize the program and awoid or atleast track run-time errors better (It was surprizing how little they impacted performance)
Created more meaningfull names for unpow (now called root) and depow (now called logx)
Fixed error in logx (this was causing a div/0)
mutation ox now between 20x and 1/20 x