Author Topic: Community Bots  (Read 5887 times)

Offline Gambit

  • Bot Builder
  • **
  • Posts: 52
    • View Profile
Community Bots
« on: April 29, 2008, 11:44:12 AM »
I'm working on a bunch of bots that will recognize each other AND recognize what species the other bot is.

they'll work togethor accordingly.

I'm using .myeye and outs and ins for the recognition.

theres one that stores massive large amounts of food and doesnt do much with it. but loves to share it with weaker bots.

1 that sends out a self destruct virus

1 that sends out a self replicating bleeder virus

and eventually some kind of multi bot that has a scout and a warrior attached to each other. or maybe a warrior that attaches itself to the sharer bot and will give up all its resources to protect it.

it would built up slime shell poison and venom and if the sharer was attacked it would give up all its resources in a flash via a tie to save the sharer.

why make all these speperate species work togethor? the answer is simple.

TO TAKE OVER THE WORLD!  

p.s. has this ever been done before?

Offline Moonfisher

  • Bot Overlord
  • ****
  • Posts: 592
    • View Profile
Community Bots
« Reply #1 on: April 29, 2008, 12:31:59 PM »
You should also make a strong veggy to cooperate with them... would help a lot if you're going to release them on IM.
Dunno if it's been done before... I know I thought about it... but I think I would probably just make a bot that mates with the veggies and just addapt it's behavior to the amount of energy and body it recieves per cycle.
In the end you can always put all the different behaviors into one bot, but if you want to run an evo sim it could be interesting with several small bots that work together. See if they can stay friendly long enough for some sort of balance to form, or atleast have a base that could lead to many different outcomes...
If you're going to run an evo sim you need a strong conspec, or they'll turn into canibals in no time...

Offline Gambit

  • Bot Builder
  • **
  • Posts: 52
    • View Profile
Community Bots
« Reply #2 on: April 29, 2008, 12:51:51 PM »
I'm using in/out + myeye for the conspec. I'd like a third part to it. any ideas on how custom variables can be adapted for a conspec gene?

then it'd be fool proof.

here is the "Sharer" bot (Communitus_Friendlius). I need to chagne the reproduction conditions so that it will reproduce/self destruct to keep the ratio of its species to total bots at 1:5 -finished thanks to Moonfisher-

'virus nullifyer and conspec programmer
cond
 *.robage 0 =
start
 7 990 store
37 .out1 store
18 .myeye store
stop

'If there is no food then look for some randomly.
cond
*.eye5 0 =
 *.refeye *.myeye = or
*.in1 37 = or
*.in1 38 = or
*.in1 39 = or
start
314 rnd .aimdx store
10 .up store
stop

'peripheral vision left
cond
*.eye1 0 >
*.in1 37 !=
*.in1 38 !=
*.in1 39 !=
 *.refeye *.myeye !=
start
52 .aimsx store
stop

peripheral vision right
cond
*.eye9 0 >
*.in1 37 !=
*.in1 38 !=
*.in1 39 !=
 *.refeye *.myeye !=
start
52 .aimdx store
stop

'if you find something chase it
cond
*.eye5 0 >
*.refnrg 3000 >
*.in1 37 !=
*.in1 38 !=
*.in1 39 !=
 *.refeye *.myeye !=
start
*.refveldx .dx store
*.refvelup 30 add .up store
stop

'Attack the food if its strong enough but dont kill it. Let it live so you can feed on it

later. Though bigger bots may accidentally kill prey.
cond
*.eye5 50 >
*.refnrg 3000 >
*.in1 37 !=
*.in1 38 !=
*.in1 39 !=
 *.refeye *.myeye !=
start
16 .shootval store
-1 .shoot store
*.refvelup .up store
stop

'poop
cond
*.waste 200 >
start
.backshot inc
-4 .shoot store
*.waste .shootval store
stop

'if you find something that isnt food (a relative) heal it if it needs
cond
*.eye5 50 >
 *.refeye *.myeye !=
*.in1 37 = or
*.in1 38 = or
*.in1 39 = or
*.refnrg 5000 <
*.nrg 5000 >
start
-2 .shoot store
stop

'eat body
cond
*.nrg 3 div
*.body sub dup
start
.strbody store - .fdbody store
stop

'if you get huge and there arent enough of your species reproduce
cond
*.totalbots *.totalmyspecies 6 div >
*.nrg 9000 >
start
40 .repro store
stop


end
« Last Edit: April 29, 2008, 04:55:29 PM by Gambit »

Offline Gambit

  • Bot Builder
  • **
  • Posts: 52
    • View Profile
Community Bots
« Reply #3 on: April 29, 2008, 01:37:07 PM »
okay I just tested it and the gene moonfisher gave me is defective... and he didnt give me a warrenty

so I think I may have to have 2-3 different

if totalbots equals about this AND totalmyspecies is under this THEN you should reproduce

with each one getting higher

the totalbots I'm thinking

near 100

near 500

near 1000

so like

cond
*.totalbots 1 >
*.totalbots 100 <
*.totalmyspecies 15 <
start
40 .repro store
stop

cond
*.totalbots 100 >
*.totalbots 500 <
*.totalmyspecies 100 <
start
40 .repro store
stop

cond
*.totalbots 500 >
*.totalmyspecies 200 <
start
40 .repro store
stop

I'd still like to have a more adaptive solution but if I cant come up with one I guess I'll have to use those 3...  
« Last Edit: April 29, 2008, 01:37:44 PM by Gambit »

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Community Bots
« Reply #4 on: April 29, 2008, 03:45:03 PM »
start
*.totalmyspecies 100 mult *.totalbots div 10 <
40 .repro store
stop


Reproduces if the bot's population is below 10% of the total sim population.
« Last Edit: April 29, 2008, 03:47:55 PM by EricL »
Many beers....

Offline Gambit

  • Bot Builder
  • **
  • Posts: 52
    • View Profile
Community Bots
« Reply #5 on: April 29, 2008, 04:23:45 PM »
cool. thank you.

Offline gymsum

  • Bot Destroyer
  • ***
  • Posts: 215
    • View Profile
Community Bots
« Reply #6 on: April 29, 2008, 04:30:11 PM »
If you're making a multibot, the best form of food I have found is stringy (ie uses ties to form clusters). This means a bot can harvest through a chain of veggies without having much difficulty searching for food.. If you're going to make a boung of species, then coordinate their tactics for shots accordingly, make larger venomous bots to slow an enemy, and the smaller ones to feed and kill.

Also it looks like you put some conditions after the start command....
« Last Edit: April 29, 2008, 04:31:31 PM by gymsum »

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
Community Bots
« Reply #7 on: April 29, 2008, 06:57:29 PM »
If you use .memloc and .memval, you can use custom memory locations as conspec. A good idea when including veggies is to harvest them until they have a small amount of nrg left so they don't die and defend the veggies, and kill them when the threshold is reached so high-nrg veggies can reproduce.
"They laughed at Columbus, they laughed at Fulton, they laughed at the Wright brothers. But they also laughed at Bozo the Clown."
- Carl Sagan

Offline Moonfisher

  • Bot Overlord
  • ****
  • Posts: 592
    • View Profile
Community Bots
« Reply #8 on: April 30, 2008, 02:33:04 PM »
Hmmm, never tested the gene... that'll teach you not to trust strangers !
Not sure why the gene didn't work, I guess I either messed up or maybe the boolean stack doesn't accept decimal values... (Noticed Eric scaled the values in his condition) If that's the case it would explain some bugs I've had in the past  
And the condition after the start is just an inline condition... an option that was added recently...

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Community Bots
« Reply #9 on: April 30, 2008, 02:43:05 PM »
Quote from: Moonfisher
Not sure why the gene didn't work, I guess I either messed up or maybe the boolean stack doesn't accept decimal values... (Noticed Eric scaled the values in his condition) If that's the case it would explain some bugs I've had in the past  

The integer stack does not accept decimals.  That's why its called an integer stack.    Thus, if you want to do decimal arithmetic, you need to do it with whole numbers and handle the place shift yourself.  Values on the stack can be large, like 20,000,000,000 but you can't put them there directly since the value of any given DNA bp that is a number must be an integer in the range -32000 to 32000.
« Last Edit: April 30, 2008, 02:44:15 PM by EricL »
Many beers....

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Community Bots
« Reply #10 on: April 30, 2008, 02:54:29 PM »
To follow up Eric's post, this is actually a good thing, because it means floating point errors won't bite you in the butt.  Ie: 1 10 div 10 mult wouldn't necessarily equal 1 even if the stack handled decimals.

Offline Moonfisher

  • Bot Overlord
  • ****
  • Posts: 592
    • View Profile
Community Bots
« Reply #11 on: April 30, 2008, 04:33:54 PM »
Heh... integer stack... ok  

But if you divide 1 by 10 and then mulitply by 10 in a stack that handles decimals... why would the result not always be 1 ???
To the best of my memmory : 1/10 = 0.1, 0.1 * 10 = 1....
And if it didn't handle decimals... wouldn't it just always be 0 ?
Just not sure what you point was ? Why is it a good thing ? (Not saying it's a bad thing... just... nevermind...)

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Community Bots
« Reply #12 on: April 30, 2008, 04:41:56 PM »
See this link.  Algebraically 1 10 div 10 mult should equal 1, but the realities of computers make it so this is not always the case.  .1 is impossible to represent exactly using decimals on a computer.  It's like 1/3 in decimal (ie: .3333333).  Worse yet, the actual value of .1 will vary on different computers or programs or languages depending on all sorts of factors, some even on the hardware level.

By using integer math, the value you get will always be predictable and the same on all computers, hardware, etc.  It might not always be "correct", but at least it's deterministically incorrect.  You can compensate for it by doing a little fixed point math.  ie: 1 1000 mult 10 div 10 mult 1000 div, which will always give you the correct answer of 1 even on different hardware, different languages, different drivers, etc.

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
Community Bots
« Reply #13 on: April 30, 2008, 06:08:05 PM »
Funny to see forums like these lead to conversations that have nothing to do with their title  
"They laughed at Columbus, they laughed at Fulton, they laughed at the Wright brothers. But they also laughed at Bozo the Clown."
- Carl Sagan

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Community Bots
« Reply #14 on: April 30, 2008, 07:10:12 PM »
We (well, I really) have never been very good at staying on topic