Ignore my previous post. As it turns out, the brains of the cattle and tigers were not defective. Because I was dealing with a very complicated function (and I was excited to get this thing running), I told myself "almost everything else is tested. I'll just skip the tests on this function for now and see if it runs."
Of course it didn't run. And did you note the use of the word "almost"? As it turns out, another function (percept) that I didn't test was involved in the failure. So now I have two functions, representing the brains and eyes, which weren't tested. I know better than that. It's to be expected that the only significant bugs I found were in the untested functions.
Further research revealed that the brains and the eyes of the little electronic beasties were going "bump in the night" quite correctly. However, due to a slight mistranslation of some C code, I had accidentally severed the nerves between the two. The Cow could think and the Cow could see, but the Cow couldn't think about what it saw. There was no way the animals could react to their environment. I am now rerunning the simulation and in less than an hour, I've almost caught up to where I was in two days of running it with severed nerves.
And after you gave me such good advice about testing on Perl Monks...
Naughty, naughty
Re:Doctor heal thyself
Ovid on 2004-04-10T16:43:40
Yeah, I'm a bad boy
:) I've rectified my mistake, but boy was I red in the face! Hoist on my own petard, as it were. I'm making up for that now as I'm refactoring everyting into separate classes and I have to have the tests to ensure that it works.