Bots and Simulations > Bot Tavern

Advanced Multibot Project

<< < (5/7) > >>

ashton15:

--- Quote from: bacillus ---Looks like Hydra  
I think tie IDs should be calculated on-site. What I did for the spine is alternate between 1 and 2 so bots only have to remember which one's in front or behind (this should be the first tie formed anyway), then 3 and 4 for tentacles, depending on if they were formed to the left or right of the spine. In this way, you can describe every cell, its function and its position in relation to the spine it's attached to. Tentacle bases would have an extra variable, or a different tie ID, that would signal new cells to act as tentacles rather than spines. I know this sounds a bit overwhelming, but the bottom line is that we need a non-static tie ID at some point, else something like 102 .readtie will become ambiguous and erratic at some point.
--- End quote ---

Ok I've implemented a way to reconfigure tie numbers and store/change them correctly (I've not tested it however), each .tiex variable stores the number to be used in .tienum, also should handle enemies tieing well. It turned out to be quite simple in the end after I spent a while thinking about it... though it's long and probably needs compression. So TJ3 hows it going with your bit of coding, anything intresting yet?

[div class=\'codetop\']CODE[div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']def tie1 101
def tie2 102
def tie3 103
def tie4 104
def numtiescheck 105
def timer2

'The timer is here for when multiple ties are deleted at once and also the delay
'in moving evrything down is one memory change per cycle
cond
start
.timer2 inc
stop

cond
*.numtiescheck *.numties !=
start
0 .timer2 store
stop

cond
'If the ammount of ties change
*.numtiescheck *.numties !=
*.timer2 5 < or
start
'update memory of many ties exist
*.numties .numtiescheck store

'Basically sees if there are any values
*.tie1 4  =
*.tie2 3 !=
*.tie3 3 != or
*.tie4 3 != or
and
*.tie1 dec

*.tie2 4  =
*.tie1 3 !=
*.tie3 3 != or
*.tie4 3 != or
and
*.tie2 dec

*.tie3 4  =
*.tie1 3 !=
*.tie2 3 != or
*.tie4 3 != or
and
*.tie3 dec

*.tie4 4  =
*.tie1 3 !=
*.tie2 3 != or
*.tie3 3 != or
and
*.tie4 dec


''''----''''

*.tie1 3  =
*.tie2 2 !=
*.tie3 2 != or
*.tie4 2 != or
and
*.tie1 dec

*.tie2 3  =
*.tie1 2 !=
*.tie3 2 != or
*.tie4 2 != or
and
*.tie2 dec

*.tie3 3  =
*.tie1 2 !=
*.tie2 2 != or
*.tie4 2 != or
and
*.tie3 dec

*.tie4 3  =
*.tie1 2 !=
*.tie2 2 != or
*.tie3 2 != or
and
*.tie4 dec


''''----''''

*.tie1 2  =
*.tie2 1 !=
*.tie3 1 != or
*.tie4 1 != or
and
*.tie1 dec

*.tie2 2  =
*.tie1 1 !=
*.tie3 1 != or
*.tie4 1 != or
and
*.tie2 dec

*.tie3 2  =
*.tie1 1 !=
*.tie2 1 != or
*.tie4 1 != or
and
*.tie3 dec

*.tie4 2  =
*.tie1 1 !=
*.tie2 1 != or
*.tie3 1 != or
and
*.tie4 dec


''''----''''

*.numties 3 <=
*.tie1 1 =
*.tie2 4 =
*.tie3 4 = or
*.tie4 4 = or
and
*.tie1 dec

*.numties 3 <=
*.tie2 1 =
*.tie1 4 =
*.tie3 4 = or
*.tie4 4 = or
and
*.tie2 dec

*.numties 3 <=
*.tie3 1 =
*.tie1 4 =
*.tie2 4 = or
*.tie4 4 = or
and
*.tie3 dec

*.numties 3 <=
*.tie4 1 =
*.tie1 4 =
*.tie2 4 = or
*.tie3 4 = or
and
*.tie4 dec


''''----''''

*.numties 2 <=
*.tie1 1 =
*.tie2 3 =
*.tie3 3 = or
*.tie4 3 = or
and
*.tie1 dec

*.numties 2 <=
*.tie2 1 =
*.tie1 3 =
*.tie3 3 = or
*.tie4 3 = or
and
*.tie2 dec

*.numties 2 <=
*.tie3 1 =
*.tie1 3 =
*.tie2 3 = or
*.tie4 3 = or
and
*.tie3 dec

*.numties 2 <=
*.tie4 1 =
*.tie1 3 =
*.tie2 3 = or
*.tie3 3 = or
and
*.tie4 dec


''''----''''

*.numties 1 <=
*.tie1 1 =
*.tie2 2 =
*.tie3 2 = or
*.tie4 2 = or
and
*.tie1 dec

*.numties 1 <=
*.tie2 1 =
*.tie1 2 =
*.tie3 2 = or
*.tie4 2 = or
and
*.tie2 dec

*.numties 1 <=
*.tie3 1 =
*.tie1 2 =
*.tie2 2 = or
*.tie4 2 = or
and
*.tie3 dec

*.numties 1 <=
*.tie4 1 =
*.tie1 2 =
*.tie2 2 = or
*.tie3 2 = or
and
*.tie4 dec


''''----''''

*.numties 0 =
*.tie1 1 =
and
*.tie1 dec

*.numties 0 =
*.tie2 1 =
and
*.tie2 dec

*.numties 0 =
*.tie3 1 =
and
*.tie3 dec

*.numties 0 =
*.tie4 1 =
and
*.tie4 dec

stop

EDIT:

Just realized I made a fairly major error with the code, if you scroll down to just under half way down the diffrence is fairly obvious and you should be able to work out the error easily enough by comparing the two, basically when the ammount of ties increases it puts the number of the tie into the relevant port, identifying which port is which is for another department and if the number of ties decreases it compacts the tie numbers. Also I suggest that the ball of the tentacles have one port in front, one behind, the third port for if they fork which can also be used for a veggie as can the the fourth port also be used for a veggie.

[div class=\'codetop\']CODE[div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']def tie1 101
def tie2 102
def tie3 103
def tie4 104
def numtiescheck 105
def timer2

cond
start
.timer2 inc
stop

cond
*.numtiescheck *.numties <
start
*.numties .numtiescheck store

'in tie port 1 and
*.tiepres .tie1 store

'in tie port 2 and
*.tiepres .tie2 store

'in tie port 3 and
*.tiepres .tie3 store

'in tie port 4 and
*.tiepres .tie4 store

'not tie1
'not tie2 and
'not tie3 and
'not tie4 and
'deal with enemy tie
stop

cond
*.numtiescheck *.numties >
*.timer2 5 < or
start
*.numties .numtiescheck store

*.tie1 4  =
*.tie2 3 !=
*.tie3 3 != or
*.tie4 3 != or
and
*.tie1 dec

*.tie2 4  =
*.tie1 3 !=
*.tie3 3 != or
*.tie4 3 != or
and
*.tie2 dec

*.tie3 4  =
*.tie1 3 !=
*.tie2 3 != or
*.tie4 3 != or
and
*.tie3 dec

*.tie4 4  =
*.tie1 3 !=
*.tie2 3 != or
*.tie3 3 != or
and
*.tie4 dec


''''----''''

*.tie1 3  =
*.tie2 2 !=
*.tie3 2 != or
*.tie4 2 != or
and
*.tie1 dec

*.tie2 3  =
*.tie1 2 !=
*.tie3 2 != or
*.tie4 2 != or
and
*.tie2 dec

*.tie3 3  =
*.tie1 2 !=
*.tie2 2 != or
*.tie4 2 != or
and
*.tie3 dec

*.tie4 3  =
*.tie1 2 !=
*.tie2 2 != or
*.tie3 2 != or
and
*.tie4 dec


''''----''''

*.tie1 2  =
*.tie2 1 !=
*.tie3 1 != or
*.tie4 1 != or
and
*.tie1 dec

*.tie2 2  =
*.tie1 1 !=
*.tie3 1 != or
*.tie4 1 != or
and
*.tie2 dec

*.tie3 2  =
*.tie1 1 !=
*.tie2 1 != or
*.tie4 1 != or
and
*.tie3 dec

*.tie4 2  =
*.tie1 1 !=
*.tie2 1 != or
*.tie3 1 != or
and
*.tie4 dec


''''----''''

*.numties 3 <=
*.tie1 3 =
*.tie2 4 =
*.tie3 4 = or
*.tie4 4 = or dupbool
*.tie2 2 = and overbool and
dropbool
.tie2 dec
*.tie3 2 = dupbool
*.tie4 2 = and overbool and
dropbool
.tie4 dec
dropbool
.tie3 dec
dropbool
.tie1 dec

*.numties 3 <=
*.tie2 3 =
*.tie1 4 =
*.tie3 4 = or
*.tie4 4 = or dupbool
*.tie1 2 = and overbool and
dropbool
.tie1 dec
*.tie3 2 = dupbool
*.tie4 2 = and overbool and
dropbool
.tie4 dec
dropbool
.tie3 dec
dropbool
.tie2 dec

*.numties 3 <=
*.tie3 3 =
*.tie1 4 =
*.tie2 4 = or
*.tie4 4 = or dupbool
*.tie1 2 = and overbool and
dropbool
.tie1 dec
*.tie2 2 = dupbool
*.tie4 2 = and overbool and
dropbool
.tie4 dec
dropbool
.tie2 dec
dropbool
.tie3 dec

*.numties 3 <=
*.tie4 3 =
*.tie1 4 =
*.tie2 4 = or
*.tie3 4 = or dupbool
*.tie1 2 = and overbool and
dropbool
.tie1 dec
*.tie2 2 = dupbool
*.tie3 2 = and overbool and
dropbool
.tie3 dec
dropbool
.tie2 dec
dropbool
.tie4 dec


''''----''''

*.numties 2 <=
*.tie1 2 =
*.tie2 3 =
*.tie3 3 = or
*.tie4 3 = or dupbool
*.tie2 1 = and overbool and
dropbool
.tie2 dec
*.tie3 1 = dupbool
*.tie4 1 = and overbool and
dropbool
.tie4 dec
dropbool
.tie3 dec
dropbool
.tie1 dec

*.numties 2 <=
*.tie2 2 =
*.tie1 3 =
*.tie3 3 = or
*.tie4 3 = or dupbool
*.tie1 1 = and overbool and
dropbool
.tie1 dec
*.tie3 1 = dupbool
*.tie4 1 = and overbool and
dropbool
.tie4 dec
dropbool
.tie3 dec
dropbool
.tie2 dec

*.numties 2 <=
*.tie3 2 =
*.tie1 3 =
*.tie2 3 = or
*.tie4 3 = or dupbool
*.tie1 1 = and overbool and
dropbool
.tie1 dec
*.tie2 1 = dupbool
*.tie4 1 = and overbool and
dropbool
.tie4 dec
dropbool
.tie2 dec
dropbool
.tie3 dec

*.numties 2 <=
*.tie4 2 =
*.tie1 3 =
*.tie2 3 = or
*.tie3 3 = or dupbool
*.tie1 1 = and overbool and
dropbool
.tie1 dec
*.tie2 1 = dupbool
*.tie3 1 = and overbool and
dropbool
.tie3 dec
dropbool
.tie2 dec
dropbool
.tie4 dec


''''----''''

*.numties 1 <=
*.tie1 1 =
*.tie2 2 =
*.tie3 2 = or
*.tie4 2 = or
.tie1 dec

*.numties 1 <=
*.tie2 1 =
*.tie1 2 =
*.tie3 2 = or
*.tie4 2 = or
.tie2 dec

*.numties 1 <=
*.tie3 1 =
*.tie1 2 =
*.tie2 2 = or
*.tie4 2 = or
.tie3 dec

*.numties 2 <=
*.tie4 2 =
*.tie1 3 =
*.tie2 3 = or
*.tie3 3 = or
.tie4 dec


''''----''''

*.numties 0 =
*.tie1 1 =
and
*.tie1 dec

*.numties 0 =
*.tie2 1 =
and
*.tie2 dec

*.numties 0 =
*.tie3 1 =
and
*.tie3 dec

*.numties 0 =
*.tie4 1 =
and
*.tie4 dec

stop



Two queistions:

Going back to what Houshalter said what will the bots structure be?
Also may someone give me something new to make?

Tj3:
Here's an idea for telling offspring what to be.
I've been busy lately and haven't had a chance to work on this much.
But anyway, here it is:
[div class=\'codetop\']CODE[div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']cond
'Repro requirements
start
50 .repro store
.type .shoot store
[type] .shootval store
stop

Houshalter:
actually it will be something more like this:

--- Code: ---cond
*InsertReproRequireMentsHere*
.specrepro 0 =
start
*TheTypeOfOffspringYouWantToMake* 971 store
.specrepro inc
stop

cond
*.secrepro 1 =
start
x .repro store
0 .971 store
.specrepro dec
stop
--- End code ---

This way your using racial memory to tell your offspring what or who they are.

Tj3:
Yeah, that would be the best. I was thinking about that, but thought an issue might come up with cells behaving as other types for a cycle when they reproduce.
Oh never mind, type could still be 100 or some number, and it just uses this gene:
[div class=\'codetop\']CODE[div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']cond
*.robage 0 =
start
*971 .type store
stop

ashton15:
[div class=\'codetop\']CODE[div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']cond
*.robage 0 =
start
*971 .type store
stop

why not def type 971?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version