Author Topic: Advanced Multibot Project  (Read 10564 times)

Offline Tj3

  • Bot Neophyte
  • *
  • Posts: 39
    • View Profile
Advanced Multibot Project
« on: March 19, 2010, 10:25:40 PM »
I'm starting to work on an advanced multibot, and was wondering if anyone was interested in helping. The idea is to have all different kinds of cells to do different things, like:
  • Eye cells - Collect information
  • Body cells - The "body". Holds parts together, and share information and energy.
  • Movement cells - Cells used to get around.
  • Combat cells - Feed and fight. These are the cells that collect the food and defend the organism.
  • Brain cells - Reads information from eye cells, remembers things, and issues commands for combat and movement cells.
And maybe some others.
Anyway, I was thinking we could all write parts of it and then combine it all together. It'd be cool to have a multibot with, like, 50 cells all doing different things. It would be a challenge, but pretty awesome to watch this big thing moving around in a sim.
We'll probably have some things we will all use, like it might have a .type, to determine what cells do. This would be used by all of us to identify cells.
So who's in?

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
Advanced Multibot Project
« Reply #1 on: March 19, 2010, 10:41:43 PM »
Go down about 6 threads and you'll find such a project already underway. There's already a DNA 'skeleton' up, so you can post your code and integrate it into the bot.
I'm finding that cells dedicated to movement are a bad idea, as they snap ties too easily and have no advantage over each cell moving itself.
« Last Edit: March 19, 2010, 10:42:36 PM by bacillus »
"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 ikke

  • Bot Destroyer
  • ***
  • Posts: 300
    • View Profile
Advanced Multibot Project
« Reply #2 on: March 20, 2010, 03:25:55 AM »
Quote from: bacillus
I'm finding that cells dedicated to movement are a bad idea, as they snap ties too easily and have no advantage over each cell moving itself.
Which I would consider a design flaw if the goal of DB is to evolve more complex life

Offline Tj3

  • Bot Neophyte
  • *
  • Posts: 39
    • View Profile
Advanced Multibot Project
« Reply #3 on: March 20, 2010, 08:05:57 AM »
Oh, there's already someone doing the exact same thing.
It looks like nobody's worked on it in a month or so. Are you still working on it, or is it abandoned?

Quote from: bacillus
I'm finding that cells dedicated to movement are a bad idea, as they snap ties too easily and have no advantage over each cell moving itself.
Really? I was thinking it would be better, plus a lot more realistic to have movement cells, since coordinating motion through the whole bot seemed like it wouldn't work too well. "Swimming," or something like that, seemed a lot more realistic, since it wouldn't just be floating around. Kind of like moving legs.

Offline Houshalter

  • Bot Destroyer
  • ***
  • Posts: 312
    • View Profile
Advanced Multibot Project
« Reply #4 on: March 20, 2010, 11:31:39 AM »
Heres a link to the original topic. Its not abandoned but theres no one working on it at the moment. I still have the tentacle I was going to upload. Maybe we should start with that.

Offline Tj3

  • Bot Neophyte
  • *
  • Posts: 39
    • View Profile
Advanced Multibot Project
« Reply #5 on: March 20, 2010, 12:25:39 PM »
Okay. If you want to work on it, we should first decide on things that apply to the entire MB(variables, etc.). Then we can make the DNA for different cells seperately, and combine them at the end.
By the way, isn't there a limit on ties? Like 3 or 4 per bot?
« Last Edit: March 20, 2010, 01:37:05 PM by Tj3 »

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
Advanced Multibot Project
« Reply #6 on: March 20, 2010, 09:01:16 PM »
Whoa, so much to address:

Concerning tie motion, it's yet another thing that will be fixed in DB3 - the way I understand it, bots that are tied will be linked surface-to-surface, so they can't really stretch. However, it means turning will affect the entire organism, so would give realistic motion. As a result, turning will require exerting a torque rather than setting an angle (this makes aiming a bit of a pain, but having to develop muscles to flex seems like a good thing.)

I don't really have time to work on projects this year, and I also don't have anywhere to 'playtest' the code, so I'll mostly be dropping handy hints. I tried to make it obvious how the structure works, but if you have doubts, feel free to ask and I'll try my best to explain them.

Oh yeah, and no tie limits, but make sure to give your ties good IDs so the bots can easily find them...
"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 Houshalter

  • Bot Destroyer
  • ***
  • Posts: 312
    • View Profile
Advanced Multibot Project
« Reply #7 on: March 20, 2010, 10:41:34 PM »
I don't like the idea of abandoning ties. I think you should just drop the things that are supposed to balance them but end up making it a pain like nrg distribution, tie angles, etc. Ties should be easy to do and be completely open to different strategies so its open to evolution. Don't make it more complicated, even if it is more like real life.

Also, for the bot were making, we need to set a few things in reserve. We need to create a way for a bot to control what it does on the first cycle. We need to set one variable aside that will control which specialized genes activate on each type of cell, some genes might go to multiple cells. My idea was to have a snake like bot that would spawn long tentacles on either side of it that would grow over time when there was nrg and grab food when they saw it. When they grew long enough, or collected enough veggies they would become body cells themselves and spawn more tentacles, like a tree growing branches that grow more branches. Eventually it would grow big enough that some of the branches would "break off" from the larger bot and become a seprate bot entirely. I already have the tentacle cell mostly done, but it still needs genes for feeding and for growing/branching-off.

Offline ashton15

  • Bot Builder
  • **
  • Posts: 99
    • View Profile
Advanced Multibot Project
« Reply #8 on: March 21, 2010, 05:08:09 AM »
If we want to have movement cells surely an easy way to stop them breaking would be

[div class=\'codetop\']CODE[div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']cond
*.multi 0 !=
*.celltype 5 =
*.tielen 80 >
start
75 .tielen store
stop

where 5 is a movement cell. And also could .tmemval be used in conjunction with .tmemloc to syncronise timers for directed movement and also use 0 .setaim store to help with co-ordination, so the robot rather than turning and twisting out of control moves up and down, left and right
« Last Edit: March 21, 2010, 11:24:28 AM by ashton15 »

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
Advanced Multibot Project
« Reply #9 on: March 22, 2010, 12:04:36 AM »
Quote from: Houshalter
Also, for the bot were making, we need to set a few things in reserve. We need to create a way for a bot to control what it does on the first cycle. We need to set one variable aside that will control which specialized genes activate on each type of cell, some genes might go to multiple cells. My idea was to have a snake like bot that would spawn long tentacles on either side of it that would grow over time when there was nrg and grab food when they saw it. When they grew long enough, or collected enough veggies they would become body cells themselves and spawn more tentacles, like a tree growing branches that grow more branches. Eventually it would grow big enough that some of the branches would "break off" from the larger bot and become a seperate bot entirely. I already have the tentacle cell mostly done, but it still needs genes for feeding and for growing/branching-off.

I think the best way to do it would be this:
 - the tentacles can read from the base 'spine' and use .tmemloc to pass on limited info, but the spine will only read from the brain. In other words, the ten I/O ports are used for head-to-spine and spine-to tentacle information, and .tmemloc has to be used as an eleventh 'reverse port'.
 - the head gives off a signal, which is passed up the spine, increasing every time a cell recieves it, and once it hits the tail, it's bounced back without incrementation. That way, each spinal cell knows roughly its position in the organism and the size of the organism, which can then be transmitted to the tentacles to determine size eg. the larger the organism, the larger the tentacles, and tentacles shouldn't form too far in front so it doesn't interfere with vision etc.
 - The tail cell has to spawn the new tail before becoming a part of the spine - this is marginally more difficult than the standard head reproduction, but solves the problem of functional head-cell issues.


The best way for ties not to break is to use .stifftie and coordinate motion with velocity limits.
"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 Tj3

  • Bot Neophyte
  • *
  • Posts: 39
    • View Profile
Advanced Multibot Project
« Reply #10 on: March 22, 2010, 07:39:43 AM »
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.

Offline Houshalter

  • Bot Destroyer
  • ***
  • Posts: 312
    • View Profile
Advanced Multibot Project
« Reply #11 on: March 22, 2010, 04:13:06 PM »
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.

Offline Tj3

  • Bot Neophyte
  • *
  • Posts: 39
    • View Profile
Advanced Multibot Project
« Reply #12 on: March 22, 2010, 04:39:03 PM »
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
« Last Edit: March 22, 2010, 04:40:11 PM by Tj3 »

Offline Houshalter

  • Bot Destroyer
  • ***
  • Posts: 312
    • View Profile
Advanced Multibot Project
« Reply #13 on: March 22, 2010, 05:22:07 PM »
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

'

Offline Tj3

  • Bot Neophyte
  • *
  • Posts: 39
    • View Profile
Advanced Multibot Project
« Reply #14 on: March 22, 2010, 06:34:54 PM »
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