Bots and Simulations > Bot Tavern
Advanced Multibot Project
Tj3:
Let's come up with cell types we know we'll need, so we know what to work on.
I think some important ones are
Body cells: Store nrg, transfer information
Brain cells: Process information, send instructions
Eye cells: "See." Send brain information on what's happening
Tentacle cells: Branches out. Kill enemies, tie to veggies.
Movement cells: Move the robot, by either swimming or just moving.(We could use tentacle cells for this too.)
If we need more, we can add them, but we should work on these main ones to start.
Houshalter:
Sounds good to me although before we create specialized cells like movement, eye, or brain cells don't you think it would be simpler to see if you can distribute some of these tasks over many other cells. As they say, "You will never get paid to do with 2 men what you've proven you can do with one". I think thats how it goes. Anyways I have thought of another specialized cell. A stomach cell. These cells hold lots of body and are essentially storage places for the organism. They will form between the tentacles and the body and when veggies are pulled in they will group around them and tie to them. They might fire viruses at them or keep statistics about them and distribute them to your "brain" cells. They might have other uses to.
Tj3:
That's a good idea. Okay, time to start posting some code ! These are some basic variables for important stuff in all cells, like type, the botid(Special ID of multibot I was thinking of using), and IDs for up to 5 ties.
I left room for more ties if we need them.
[div class=\'codetop\']CODE[div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']
def type 100
def tie1 101
def tie2 102
def tie3 103
def tie4 104
def tie5 105
def botid 125
Houshalter:
This is in no way finished but it gives you an idea on the direction of the tentacle cell. Suggestions are welcome:
[div class=\'codetop\']CODE[div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']def botnumber 70 'what number i am in the tentacle chain
def lasttienum 71 'last tienumber (nessasary for comunication) I found out you
'can use .tiepres. May have to change this
def agewhentied 72 'what age was i when i tied to my first bot (or got tied to)
def whichside 73 'which side of the tentacle will i search for food?
def clock 74 'turn clockwise or counter clockwise?
def foundveg 75 'this stops it from moving when it is in route to a veg
def tiedveg 76 'have i tied to a veg? shows various states of the veg
' tieing proccess
def howmanyties 77 'tells me how many ties i have minus the vegs im tied to
'========================================================================
'touts and outs and ins tins etc.
' out1 = numties
' tout1 = my botnumber
' out2 = botnumber
' tout2 = which side of the bot my search pattern is assigned
' tout3 = refxpos
' tout4 = refypos
' tout5 = communication state
'========================================================================
'reproduce to form a new tentacle
'NOTE: this is temporary to test the performance of the tentacle, my idea
' is that the tentacle will grow longer over time when theres nrg.
cond
*.foundveg 1 !=
*.botnumber 20 !=
*.robage 20 >
*.eye5 0 =
start
*.nrg 20 *.botnumber sub div 100 >
*.nrg 20 *.botnumber sub div *.nrg div 100 mult .repro store
stop
'what to do when i see my new offspring
cond
*.numties 1 =
*.multi 1 =
*.refeye *.myeye =
*.reftie *.myties =
*.refmulti 0 =
*.in1 0 =
start
.howmanyties inc
*.lasttienum 1 =
.tie inc
not
.tie inc .tie inc
stop
'set my out1 (can change if nessacary) to show if im part of the main bot yet
'so when im a new cell i won't be tied to two tentacles instead of just one
cond
*.out1 *.numties !=
start
*.numties .out1 store
stop
'store a value in .lasttienum to find what tie connects to the bot behind me
cond
*.multi 1 =
*.lasttienum 0 =
start
*.tiepres .lasttienum store
stop
'Find out what cell number i am etc, once im a multibot
cond
*.multi 1 =
*.botnumber 0 =
start
*.readtie *.tiepres != 'this makes sure it stores .tieread before it does
'anything
*.tiepres .readtie store
not
*.tin1 1 add .botnumber store
stop
'store .botnumber in tout1
cond
*.tout1 *.botnumber !=
start
*.botnumber .tout1 store
stop
'find age when tied
cond
*.multi 1 =
.agewhentied 0 =
start
*.robage .agewhentied store
stop
'store my bot number in my out2
cond
*.botnumber *.out2 !=
start
*.botnumber .out2 store
stop
'search for food
Cond
*.foundveg 1 !=
*.multi 1 =
start
*.clock 0 = and
100 .aimdx store
*.clock 1 = and
-100 .aimdx store
stop
'check the bot behind me if i should be searching on the left or the right
cond
*.whichside 0 =
*.readtie *.lasttienum =
start
*.tin2 1 =
.whichside inc inc
.tout2 inc inc
*.tin2 2 =
.whichside inc
.tout2 inc
stop
'turn untill i see bot next to me
cond
*.eye5 0 >
*.refeye *.myeye =
*.reftie *.myties =
*.numties 2 =
start
*.in2 *.botnumber 1 sub =
*.whichside 1 = and
*.in2 *.botnumber 1 add =
*.whichside 2 = and or
*.clock 0 = and
.clock inc
*.in2 *.botnumber 1 add =
*.whichside 1 = and
*.in2 *.botnumber 1 sub
*whichside 2 = and or
*.clock 1 = and
.clock dec
stop
'if i have one tie then just turn untill i see bot behind me
cond
*.eye5 0 >
*.numties 1 =
*.refeye *.myeye =
*.reftie *.myties =
*.in2 *.botnumber 1 sub
start
*.clock 1 =
.clock dec
*.clock 0 =
.clock inc
stop
'when i see food I? (should i put a refshell/slime condition here?)
cond
*.eye5 0 >
*.refshoot 0 =
*.reftie 0 =
*.refkills 0 =
*.tiedveg 0 =
*.refmulti 0 =
start
*.refxpos *.refypox angle .setaim store
.tie inc .tie inc .tie inc 'I only want to shoot one tie but this might shoot untill it hits
*.foundveg 0 =
*.foundveg inc
*.tout3 *.refxpos !=
*.refxpos .tout3 store
*.tout4 *.refypos !=
*.refypos .tout4 store
*.tout5 1 !=
.tout5 1 store
stop
'once ive tied to and captured the food?
cond
*.tiepres 3 = 'will this work? Does the tie have to be hardend first?
*.tiedveg 0 =
*.howmanyties 1 sub 'uh-oh, this may activate when it reproduces.
start
.tiedveg inc
*.robage .vegtimer store
stop
'
Tj3:
Nice. That looks fairly easy to incorporate into the MB, which is good.
I just came up with these genes to exchange information between cells. I'm not sure if they work, but it's the general idea.
[div class=\'codetop\']CODE[div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']'Genes for information exchange between cells.
'Define statements
def type 100
def tie1 101
def tie2 102
def tie3 103
def tie4 104
def tie5 105
def botid 125
'Info exchange genes
cond
*.tie1 0 =
*.multi 0 !=
start
*.tiepres .tie1 store
stop
cond
*.multi 0 !=
start
*.tie1 .readtie store
stop
cond
*.multi 0 !=
*.tin1 0 !=
*.tin1 *.botid !=
start
*.tin1 *.tout1 store
*.tin2 *.tout2 store
*.tin3 *.tout3 store
*.tin4 *.tout4 store
*.tin5 *.tout5 store
*.robage .lastsend store
stop
cond
*.robage *.lastsend 1 add store
start
0 *.tout1 store
0 *.tout2 store
0 *.tout3 store
0 *.tout4 store
0 *.tout5 store
stop
And the gene for processing it when it gets to its destination might look something like this.
[div class=\'codetop\']CODE[div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']cond
*.multi 0 =
*.tin 0 !=
*.tin1 *.botid =
*.type [bottype] =
start
'action
stop
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version