Author Topic: shootval and distance for -1 shots  (Read 8576 times)

Offline peterb

  • Bot Destroyer
  • ***
  • Posts: 148
    • View Profile
shootval and distance for -1 shots
« Reply #15 on: April 03, 2010, 03:30:02 PM »
Quote
...hmmm for some reason its not ok,
did i make an error here above ?, i do believe the math retrieved from eureqa was ok 25.0438 / (0.217382 -e5)

hmm the same program reminds me to  

-32 / *.eye5 .shootval store  

Since it sugested -30 / eye5.. i have to say this was one of the simplest forms of the formula and might not be correct.
There are more precize versions like  -22.0415/(*.eye5 - 0.285701) - 1.14216 .shootval store

The point is my data set contains errors..  its not based on the exact values but the nearest values i could get..
it results in the longshots.. but not the short powerful ones, but i neither could retrieve those values for shot shots in my data collection earlier..



bot added again it has no repro, (and sadly it spins again around targets... sometimes)
« Last Edit: April 03, 2010, 03:30:34 PM by peterb »

Offline ashton15

  • Bot Builder
  • **
  • Posts: 99
    • View Profile
shootval and distance for -1 shots
« Reply #16 on: April 03, 2010, 04:53:09 PM »
I have discoverd a fatal flaw in my code, when I implemeted it into goggle goo v0.4b (unpublished) with F1 default costs and tested it when goggle goo chose to use the narowest eyesight possible -34 with the furthest range when he shot at maximum distance I noticed he would lose a significant ammount of energy. The reason was because a higher (or if shootval is negative, lower) value in shootval costs more enrgy so at the extremities of vision goggle goo was firing shots of -144 costing a huge ammount of enrgy per shot, to rectify this before every instance of dup *.shootval insert - *.range ceil - and like power store the maximum ammount of energy you are prepared to spend on each shot and prefreably for more effciency substitue every value, I suggest that if anything requires a higher shootval you move closer as shots will fall short of the target otherwise. Another thing to implement is only to store a value in shootval if you actually need to fire using *.shoot sgn abs mult -3 sub sgn abs mult *.shoot -4 sub sgn abs mult before every instance of store... no point calculating how much power you need to put into a shot if your not actually going to shoot whatever your looking at.
« Last Edit: April 03, 2010, 05:17:06 PM by ashton15 »

Offline Houshalter

  • Bot Destroyer
  • ***
  • Posts: 312
    • View Profile
shootval and distance for -1 shots
« Reply #17 on: April 03, 2010, 10:45:06 PM »
Well it does have an awful lot of stores in it. You do know that those use up energy? Anyway to eliminate them?

Offline ashton15

  • Bot Builder
  • **
  • Posts: 99
    • View Profile
shootval and distance for -1 shots
« Reply #18 on: April 04, 2010, 04:24:35 AM »
Quote from: Houshalter
Well it does have an awful lot of stores in it. You do know that those use up energy? Anyway to eliminate them?

Only one activates at any one time, I used conditionless logic which multiplies the location to be stored by 0, that resulsts in trying to store something into location 0 which is impossible and thus costs no energy. Alos they only activate when they see something and stuff like that, I used conditionless loggic because each normak condition costs about a tenth of a store command whilst conditionless logic is free. Therefore in theory minimal energy should be used... at least it worked when I tested it, when unactivated has a smaller energy consumption rate than alga_minimalis. Most of the gene is repetitive, one store for each eyewidth (negative, 0 and positive) multiplied by the ammount of eyes, so ultimately the 27 stores are in place for examining a range of possibilities in various eyes.
« Last Edit: April 04, 2010, 04:28:18 AM by ashton15 »

Offline peterb

  • Bot Destroyer
  • ***
  • Posts: 148
    • View Profile
shootval and distance for -1 shots
« Reply #19 on: April 04, 2010, 10:11:05 AM »
Quote from: ashton15
Quote from: Houshalter
Well it does have an awful lot of stores in it. You do know that those use up energy? Anyway to eliminate them?

Only one activates at any one time, I used conditionless logic which multiplies the location to be stored by 0, that resulsts in trying to store something into location 0 which is impossible and thus costs no energy. Alos they only activate when they see something and stuff like that, I used conditionless loggic because each normak condition costs about a tenth of a store command whilst conditionless logic is free. Therefore in theory minimal energy should be used... at least it worked when I tested it, when unactivated has a smaller energy consumption rate than alga_minimalis. Most of the gene is repetitive, one store for each eyewidth (negative, 0 and positive) multiplied by the ammount of eyes, so ultimately the 27 stores are in place for examining a range of possibilities in various eyes.

ehm i've written them too in the past, i think all bots could be written like it, see the beasteary 1G bots, some of mine must be there as well

Offline abyaly

  • Bot Destroyer
  • ***
  • Posts: 363
    • View Profile
shootval and distance for -1 shots
« Reply #20 on: April 04, 2010, 10:32:04 AM »
peterb-
You should test shot lifetimes with various shootvals.
Then with various body sizes, because that's also a factor. Once you know shot lifetime, multiply by 40 to get distance.

I remember I did this at some point and the results were not what the formula in the wiki predicted. I'm not sure if I posted a chart of my results somewhere, but you can easily do the experiments in half an hour or so.
Lancre operated on the feudal system, which was to say, everyone feuded all
the time and handed on the fight to their descendants.
        -- (Terry Pratchett, Carpe Jugulum)

Offline ashton15

  • Bot Builder
  • **
  • Posts: 99
    • View Profile
shootval and distance for -1 shots
« Reply #21 on: April 04, 2010, 10:39:04 AM »
Quote from: abyaly
peterb-
You should test shot lifetimes with various shootvals.
Then with various body sizes, because that's also a factor. Once you know shot lifetime, multiply by 40 to get distance.

I remember I did this at some point and the results were not what the formula in the wiki predicted. I'm not sure if I posted a chart of my results somewhere, but you can easily do the experiments in half an hour or so.

I worked out the increase in shot distance is lineraly proportional to eye distnce and so the overall change is nil and no change was needed when I tested it earlier, hasn't shot distnace been worked out already?

EDIT: Opps, I thought you meant the size of the bot using the gene not the bot it was colecting information from... hmm now that's a whole new story

I think I agree with you peter all robots could be coded with conditionless logic, I believe it actually increases the possible options as it adds aditional complexity and breaks conditions up into smaller peices.
« Last Edit: April 05, 2010, 04:39:03 PM by ashton15 »

Offline peterb

  • Bot Destroyer
  • ***
  • Posts: 148
    • View Profile
shootval and distance for -1 shots
« Reply #22 on: April 04, 2010, 08:57:14 PM »
Quote from: abyaly
peterb-
You should test shot lifetimes with various shootvals.
Then with various body sizes, because that's also a factor. Once you know shot lifetime, multiply by 40 to get distance.

I remember I did this at some point and the results were not what the formula in the wiki predicted. I'm not sure if I posted a chart of my results somewhere, but you can easily do the experiments in half an hour or so.


I think for the moment -32 *.eye5 div .valshoot store    (works for starting robots)..
i got to admit not tested it against all sizes

Getting good data is the biggest problem here and it does take a long time to get it, not a half hour i'm afraid

if you still have the data i would be happy to synthesize a math formula on it