|
-
Oct 31st, 2009, 10:14 AM
#1
Curve Needed
If anybody has been tracking the threads I have started in the Math forum, they have probably noticed that they all have to do with a robot project. This is another one in the same family.
The brain of the robot is going to be a complex pseudo-neural net of my own design, which will be trained via a genetic algorithm using dreaming. However, this is being created in a modular fashion, as there is just too much to bite off in one chunk. The item I am currently looking at is how to set the anxiety and confidence levels regarding power. Basically, once the bot is off the charger, it will have certain anxiety about power, and a counterbalancing feeling of well being (confidence) about power. The anxiety will rise over time, the confidence will drop over time. Similar to hunger for us.
Much of the confidence and anxiety is genetically driven, but not entirely. Confidence is sort of the inverse of anxiety, though they will be determined independently. However, since they can be thought of as inverses, I will just ask this question regarding anxiety:
There are three factors that combine to set the anxiety level for the robot. The first factor is the total time since last charging. This one I have worked out. The second factor is the total time spent driving. The third factor is current power level (basically a battery meter reading), which may not even be available. It is that second factor that I am looking for a suggestion on.
Driving will gobble up power faster than anything else. In fact, the robot might be able to run for days if the tracks never turn, but turning the tracks will reduce duration to hours, at most, and probably only a couple hours. Therefore, I was thinking that driving time might cause a parabolic rise in anxiety, but my examination of various parabolic equations hasn't produced a curve that I like. In contrast, total time will have no impact on anxiety until a certain threshold has been reached, after which anxiety will increase in a linnear relationship with the equation mT, where m <= 1, and T is total time in minutes. Both m and the aforementioned threshold are genes in the genome, so the point at which total time begins to impact the anxiety of the robot, as well as the rate of impact, are both independently heritable traits.
I am looking for some equation that will do something like that for drive time, but I'm thinking that the anxiety should increase more than linnearly. One equation I looked at was (xT^2 - yT). For various x and y, this curve never really looked right. It rose VERY fast unless x was less than 1, in which case it was negative for some time (which I could get around by using a threshold for T). I think I'm looking for an equation that remains relatively flat for some time, then begins climbing in a curvilinnear fashion. The equation can dip into the negative early on, since I can use a threshold, if need be, but it would be better if it had a small positive rise for some time, before climbing.
Any suggestions for equations that might suit?
My usual boring signature: Nothing
 
-
Oct 31st, 2009, 05:35 PM
#2
Re: Curve Needed
I'd suggest a linear dependence on total time driving, but with a large "slope". For instance, if your anxiety/min (m) due to time since last charge (T) is m = 1 anx/min, you'd probably want to use, say, n=30 anxiety/min for each minute spent driving (call that D), since driving drains the battery so much more quickly. I can see where you might want to increase the slope after a certain threshold--the "I'm about to run out of battery!" effect. Perhaps you'd prefer to use a quadratic function there. If you know what you'd like your maximum anxiety to be, you can use edge conditions to solve for which parabola to use, given only n, continuity, and the above.
You can use non-linear functions as well, of course. A few that grow more slowly than x^2 are...
x + sqrt(x)
x*sqrt(x)
x^(1+e) for some constant e near 0
x + x^e as above
x ln x
x + ln x
x (cos x) <--- if you want your robot to be bipolar
The time you enjoy wasting is not wasted time.
Bertrand Russell
<- Remember to rate posts you find helpful.
-
Oct 31st, 2009, 08:09 PM
#3
Re: Curve Needed
I knew you'd come through. I'll take a look at those curves. The bipolar bot would be interesting, though I don't think I'll do that.
Ultimately, this will have to fit into a byte, so there is a maximum value of 255. That's not all that big a concern, as any value greater than 255 will just be truncated down to 255. At that point, the anxiety is maxed out. The reason for the 255 is that the really isn't any need for more values than that. Evolving for a scale that fits into two bytes, four bytes, or otherwise, doesn't really gain anything that I can see.
After looking at those curves, I think that a more complex solution using two equations is probably correct. A linnear relationship with a modest slope up to some point, after which a quadratic relationship until the anxiety maxes out. The slope of the linnear, the threshold at which the change to the quadratic occurs, and some modifier on the quadratic can be the genes.
My general philosophy is: Toss it all into the genome and let evolution determine what matters. In all GAs that I have written to date, that philosophy is born out. The GA will latch onto the critical elements, while the others can float. Of course, that means that the genome is enormous.
Last edited by Shaggy Hiker; Oct 31st, 2009 at 08:32 PM.
My usual boring signature: Nothing
 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|