Welcome To Darwinbots > Newbie
Best thing ever
southpointingchariot:
--- Quote from: Tilthanseco on July 03, 2012, 06:00:28 PM ---
--- Quote --- I think I'd like to get bots to better handle objects
--- End quote ---
Ya, in evo sims I like to put an object in hoping they will eventually figure out what to do with it.
In some of my sims, the object would move, grouping veggies in a pile, then the bots would plow through them, eating all they could get.
If you want them aware of objects, .refnrg can be used (objects and corpses have no energy), or .reftype (0 for bots, 1 for objects)
--- End quote ---
Would adding putting in a condition like
--- Code: ---'Turn around
cond
*.eye5 0 >
*.in1 *971 sub abs 1 =
*reftype 1 =
start
314 rnd .aimdx store
stop
--- End code ---
work?
--- Quote ---
--- Code: ---cond
start
*.robage 100 <
-20 .up store
0 .shoot store
dropbool
'This drops the last condition in the gene, I didn't feel like making two genes, so here is one with two conditions
*.refage 100 < *.eye5 0 > and
0 .shoot store
314 .aimdx store
stop
--- End code ---
or
--- Code: ---cond
*.robage 100 <
start
-20 .up store
0 .shoot store
stop
cond
*.refage 100 <
*.eye5 0 >
start
0 .shoot store
314 .aimdx store
stop
--- End code ---
--- End quote ---
Er, what would this code do? Who is protected from attack currently?
Tilthanseco:
--- Code: ---cond
*.eye5 0 >
*.in1 *971 sub abs 1 =
*reftype 1 =
--- End code ---
No, what you have has to meet all three conditions, can see check, is related check, is a block huh?. You should put an "or" after *.reftype 1 =
--- Code: ---cond
*.eye5 0 >
*.in1 *971 sub abs 1 =
*.reftype 1 = or
--- End code ---
That way it is either related or is a block.
--- Quote ---Er, what would this code do? Who is protected from attack currently?
--- End quote ---
It just makes it so bots can't kill each other when they are A. not old enough or B. the food is too young
Currently you have it setup where a bot doesn't kill its children or parent, but that code is too complex to last 100% in a mutation sim. So expect it to break in a few generations.
I was just offering a solution to:
--- Quote ---That seems to be working somewhat better - bots still sometimes stare at each other until something runs by them.
--- End quote ---
southpointingchariot:
--- Quote from: Tilthanseco on July 03, 2012, 09:29:10 PM ---
--- Code: ---cond
*.eye5 0 >
*.in1 *971 sub abs 1 =
*reftype 1 =
--- End code ---
No, what you have has to meet all three conditions, can see check, is related check, is a block huh?. You should put an "or" after *.reftype 1 =
--- Code: ---cond
*.eye5 0 >
*.in1 *971 sub abs 1 =
*.reftype 1 = or
--- End code ---
That way it is either related or is a block.
--- End quote ---
Ah, thank you. Is the range (whatever you would call that first condition) a good construction?
--- Quote ---I was just offering a solution to:
--- Quote ---That seems to be working somewhat better - bots still sometimes stare at each other until something runs by them.
--- End quote ---
--- End quote ---
I see - this seem to be happening some at the very beginning, not after mutation. I very much like the "mother or daughter" protection :). Fortunately, this seems to work well with mutation :). You mentioned there might be a better aiming structure - any suggestions? Is there a way to make the bots know if they're being injured? I notice sometimes bots are being eaten as they go through open space and just sort of ignorantly amble on until they die.
Is there a way for a bot to check if a target is receiving photosynthesis? I'm still having problems with mutations allowing sex with vegetables, which of course then wipe out all the taxxons.
Do you think any of our improvements or other changes should be made to the rolling moss? I'd like to have it sexually reproduce as well - I guess it needs to pursue a mate? Here's its code:
--- Code: ---' Rolling Moss
' by: southpointingchariot
' Vegetable
'
' A scared plant
'Mate Finder
cond
*.eye5 -10 >
*.in1 0 =
start
*.refveldx .dx store
*.refvelup 10 add .up store
stop
'Sperm shooter
cond
*.eye5 50 >
*.refeye *.myeye =
*.in1 0 =
start
-8 .shoot store
stop
'Sexual Reproduction
cond
*.fertilized 0 >
*.nrg 20000 >
start
50 .sexrepro store
stop
Mitosis
cond
*.nrg 30000 >
start
50 .repro store
15 .aimdx store
stop
'Run away
cond
*.eye5 0 >
start
*.refveldx .dx store
*.refvelup -10 add .up store
stop
end
--- End code ---
Tilthanseco:
*.refxpos *.refyps angle .setaim store
Will have bots point very accurately at another bot.
Plants are hard to ID, if the plant has no eye commands, like alga_minimalis, then you can just *.refeye 0 =; with yours it would be a lot trickier.
You can tell when bots lose or gain nrg with *.pain and *.pleas. Also, bots can tell if they are shot, and the kind, with *.shflav, and the direction with *.shang. I don't know if *.shflav resets so make sure to 0 .shflav store in you gene.
For the above, you have to use the second version linked here: http://forum.darwinbots.com/index.php/topic,1249.msg1384143.html#msg1384143
--- Code: ---cond
*.shang 0 >
*.shflav -2 !=
*.shflav -8 !=
start
'Reset shflav might not be needed
0 .shflav store
'Ruuuuuuuuun
'Or turn to shoot back
*.shang .aimdx store
stop
--- End code ---
For your plant the possibilities are endless. If you want it to be hard to catch you can add the above code, replacing the 'Ruuuun.
southpointingchariot:
--- Quote from: Tilthanseco on July 03, 2012, 11:38:56 PM ---*.refxpos *.refyps angle .setaim store
Will have bots point very accurately at another bot.
--- End quote ---
So my version doesn't seem to be right - I'm not exactly sure how your code works.
--- Code: ---'Food Finder
cond
*.eye5 -10 >
*.in1 *971 sub abs 1 >
start
*.refxpos *.refyps angle .setaim store
*.refvelup 30 add .up store
stop
--- End code ---
--- Quote ---Plants are hard to ID, if the plant has no eye commands, like alga_minimalis, then you can just *.refeye 0 =; with yours it would be a lot trickier.
--- End quote ---
Hmm, we need to figure something out - both are sexual, and having them cross pollinate ruins everything. Maybe just have them broadcast several unique identifiers as failsafes in case one mutates? Perhaps the protections should be added to the sexrepro command as well.
--- Quote ---You can tell when bots lose or gain nrg with *.pain and *.pleas. Also, bots can tell if they are shot, and the kind, with *.shflav, and the direction with *.shang. I don't know if *.shflav resets so make sure to 0 .shflav store in you gene.
For the above, you have to use the second version linked here: http://forum.darwinbots.com/index.php/topic,1249.msg1384143.html#msg1384143
--- Code: ---cond
*.shang 0 >
*.shflav -2 !=
*.shflav -8 !=
start
'Reset shflav might not be needed
0 .shflav store
'Ruuuuuuuuun
'Or turn to shoot back
*.shang .aimdx store
stop
--- End code ---
For your plant the possibilities are endless. If you want it to be hard to catch you can add the above code, replacing the 'Ruuuun.
--- End quote ---
So should I just always run that other .exe if I'm to try and use that type of gene?
Also, I notice that as mutation occurs, bots change color. Is there anywhere that this process is detailed?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version