Bots and Simulations > Bot Tavern
Ambitious MB project
bacillus:
Currently I'm watching a giant snake threading itself slowly through a field of veggies . As sign of progress!
--- Code: ---'Primordius
'Community MB
'BOT NOTES
'The spine bits will alternate between tie numbers 2 and 3. This allows them to
'communicate both ways. Ties are used to identify each adjacent bot's
'function, and by using .readtie we can than switch between those.
'IO PORT DESCRIPTION
'01-Conspec
'02-Birth control-What is assigned type?
'03-Birth control-What should my tie number be?
'CUSTOM LOCATIONS
'type-what kind of cell am I?
'firsttie-what is the tie ID of the first tie I made?
def type 989
def firsttie 990
'CUSTOM VARS
'TYPE VARS
def head 0
def spine 1
def tail 2
cond
*.robage 0 =
start
1221 .out1 store
1221 .tout1 store
*.in3 ++ .tie store
*.in3 ++ .firsttie store
stop
cond
*.robage 20 =
start
*.tin2 .type store
stop
cond
*.tin1 *.tout1 !=
start
*.tiepres .deltie store
stop
start
*.firsttie 2 sub sgn abs .out3 store
*.nrg *.body add 15 div *.body sub dup .strbody store
- .fdbody store
40 .stifftie store
5 *.velup sub .up store
50 .sharenrg store
stop
cond
*.numties 0 =
*.nrg 5000 >
*.robage 20 >
start
.tail .tout2 store
1 .out3 store
.head .type store
50 .repro store
628 .aimdx store
stop
cond
*.type .head =
start
100 .sharewaste store
-4 *.eye1 *.eye9 sub sgn 0 floor mult *.eye1 *.eye8 sub sgn 0 floor
mult *.eye1 *.eye7 sub sgn 0 floor mult *.eye1 *.eye6 sub sgn 0
floor mult *.eye1 *.eye5 sub sgn 0 floor mult *.eye1 *.eye4 sub sgn 0
floor mult *.eye1 *.eye3 sub sgn 0 floor mult *.eye1 *.eye2 sub sgn 0
floor mult 4 *.eye9 *.eye8 sub sgn 0 floor mult *.eye9 *.eye7 sub
sgn 0 floor mult *.eye9 *.eye6 sub sgn 0 floor mult
*.eye9 *.eye5 sub sgn 0 floor mult *.eye9 *.eye4 sub sgn 0 floor mult
*.eye9 *.eye3 sub sgn 0 floor mult *.eye9 *.eye2 sub sgn 0 floor mult
*.eye9 *.eye1 sub sgn ++ sgn mult add -3 *.eye2 *.eye9 sub sgn ++ sgn
mult *.eye2 *.eye8 sub sgn 0 floor mult *.eye2 *.eye7 sub sgn 0 floor
mult *.eye2 *.eye6 sub sgn 0 floor mult *.eye2 *.eye5 sub sgn 0 floor
mult *.eye2 *.eye4 sub sgn 0 floor mult *.eye2 *.eye3 sub sgn 0
floor mult *.eye2 *.eye1 sub sgn ++ sgn mult add 3 *.eye8 *.eye9 sub
sgn ++ sgn mult *.eye8 *.eye7 sub sgn 0 floor mult *.eye8 *.eye6
sub sgn 0 floor mult *.eye8 *.eye5 sub sgn 0 floor mult *.eye8 *.eye4
sub sgn 0 floor mult *.eye8 *.eye3 sub sgn 0 floor mult *.eye8 *.eye2
sub sgn ++ sgn mult *.eye8 *.eye1 sub sgn ++ sgn mult add -2 *.eye3
*.eye9 sub sgn ++ sgn mult *.eye3 *.eye8 sub sgn ++ sgn mult *.eye3
*.eye7 sub sgn 0 floor mult *.eye3 *.eye6 sub sgn 0 floor mult
*.eye3 *.eye5 sub sgn 0 floor mult *.eye3 *.eye4 sub sgn 0 floor mult
*.eye3 *.eye2 sub sgn ++ sgn mult *.eye3 *.eye1 sub sgn ++ sgn mult
add 2 *.eye7 *.eye9 sub sgn ++ sgn mult *.eye7 *.eye8 sub sgn ++
sgn mult *.eye7 *.eye7 sub sgn 0 floor mult *.eye7 *.eye6 sub sgn 0
floor mult *.eye7 *.eye5 sub sgn 0 floor mult *.eye7 *.eye4 sub sgn ++
sgn mult *.eye7 *.eye2 sub sgn ++ sgn mult *.eye7 *.eye1 sub sgn ++
sgn mult add -1 *.eye4 *.eye9 sub sgn ++ sgn mult *.eye4 *.eye8 sub sgn
++ sgn mult *.eye4 *.eye7 sub sgn ++ sgn mult *.eye4 *.eye6 sub sgn
0 floor mult *.eye4 *.eye5 sub sgn 0 floor mult *.eye4 *.eye3 sub
sgn ++ sgn mult *.eye4 *.eye2 sub sgn ++ sgn mult *.eye4 *.eye1 sub
sgn ++ sgn mult add 1 *.eye4 *.eye9 sub sgn ++ sgn mult *.eye4 *.eye8
sub sgn ++ sgn mult *.eye4 *.eye7 sub sgn ++ sgn mult *.eye4 *.eye6
sub sgn ++ sgn mult *.eye4 *.eye5 sub sgn 0 floor mult
*.eye4 *.eye3 sub sgn ++ sgn mult *.eye4 *.eye2 sub sgn ++ sgn mult
*.eye4 *.eye1 sub sgn ++ sgn mult add 0 *.eye5 *.eye9 sub sgn ++
sgn mult *.eye5 *.eye8 sub sgn ++ sgn mult *.eye5 *.eye7 sub sgn ++
sgn mult *.eye5 *.eye6 sub sgn ++ sgn mult *.eye5 *.eye4 sub sgn ++ sgn
mult *.eye5 *.eye3 sub sgn ++ sgn mult *.eye5 *.eye2 sub sgn ++ sgn
mult *.eye5 *.eye1 sub sgn ++ sgn mult add .focuseye store
stop
cond
*.numties 0 =
start
.head .type store
stop
cond
*.type .head =
*.eyef 0 >
*.in1 *.out1 !=
start
*.refxpos *.refypos angle .setaim store
stop
cond
*.type .tail =
*.nrg 10000 >
start
628 .aimdx store
50 .repro store
.tail .tout2 store
.spine .type store
stop
cond
*.in1 *.out1 !=
*.eye5 40 >
start
-6 .shoot store
stop
cond
*.waste 250 >
*.type .head =
start
*.waste .shootval store
-4 .shoot store
stop
--- End code ---
bacillus:
Okay, the basic structure is almost complete. I had to relabel 'body' to spine, as the bots were doing funny things to their body mass levels; the only problem I'm having now is to get the damn bots to tie on birth.
EDIT=> I think I fixed the problem. It might make the spine connection only work one way, but the many-to-one inputs should still works using .tieloc and .tieval.
OK, the current bot should be enough to get started. ATM, if you want to design a new cell type, just post the genes along with a description with its position on the bot and I'll try massage it in. Otherwise, improvements on the current bot, such as steering, feeding etc. are also welcome.
jknilinux:
This reminds me, I was trying to modify Seasnake so it would use Peter's "caterpillar" movement scheme. Do you think that would be easy to do? I was thinking of using that as the basis for a 0% bang efficiency evosim. . . The goal is to encourage MB evolution.
Houshalter:
I have an idea which im trying at the moment. Its the tentacles. They would sweep around (actually they don't even have to move, just keep up with the main bot.) and snatch up veggies and fire at enemies. when a tentacle grows big enough it could form into a body segment and sprout more tentacles, like a tree grows branchs that grow more brances. This would make reproduction easy since all the bot would have to do to reproduce is to detach one of these branches and send it out on its own. Anyway im working on some of the basic code for them if anyone has ideas or anything.
bacillus:
Ooh, fascinating. The 'branching out' idea was one I was thinking of putting in later on, as to create a branched 'nerve network'. The tricky bit, though, is coordinating motion in vastly non-linear systems. The original idea of reproduction was to create a new cell and delete the tie it makes, but I think generalizing to breaking off should work. After all, each cell knows its initial tie ID, so if it realizes it broke off from the main body it could easily become a new head. The new tail is a different story altogether...
I can't actually remember Caterpillar. Is it the one that stretches and contracts ties? Easy with two cells, but in such a huge system...
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version