Bots and Simulations > Bot Tavern
MB architecture: How do we get amoeba/fungus moving?
Welwordion:
Well I trieed myself on the old problem of multibot moving,trying for any amorphous mass of bots to learn crawling with ties, for some reason the condraction and extension does not activate most of the times, so as it would be really good for the new leagues that are in planning to have a first amoeba ready I thought why not make this a group work?
Everone who is interested write code to get the crawling working and post it here.
A basic structure would be: genes managing tie addresses, switching mechanism between those genes, genes to activate and deactivate movement , genes that regulate fixing and genes that regulate ties
As for my code:
--- Code: ---
def building 77
def suppotie 76
def tiecheck 75
def writpos 74
def inspect 73
def counter 72
def scout 89
'for tieaddresses
cond
*.tiecheck *.numties >
start
*.readtie 80 >=
*.readtie 80 *.tiecheck add <= and
*.trefnrg 0 = and
*.readtie .writpos store
*.writpos *.tiecheck =
*.writpos *.numties 1 add = and
*.numties .tiecheck store
dropbool
dropbool
80 *.inspect add * .readtie store
.inspect inc
*.inspect *.tiecheck >
0 .inspect store
stop
cond
*.tiepres *.suppotie !=
start
*.numties *.tiecheck >
*.numties .tiecheck store
*.numties .writpos store
dropbool
*.tiepres .suppotie store
*.tiepres 79 *.writpos add store
stop
' basic tie settings and switching between ties
cond
*.numties 0 >
start
50 .sharenrg store
80 *.robage *.numties mod add * .tienum store
500 .fixlen store
100 .stifftie store
*.robage 40 mod 0 =
'*.readtie .deltie store
stop
'a tieing gene
cond
*.numties 3 <
*.eyef 50 >
'*.refeye *.myeye =
start
*.numties 10 mult 9 rnd add .tie store
stop
'just a repro gene
cond
*.nrg 7000 >
start
200 .strbody store
50 .repro store
stop
' gene for movement activation fixing the bot that spots the food for the contraction
cond
*.eyef 0 >
*.refeye *.myeye !=
*.scout 0 =
start
7 .scout store
1 .fixpos store
.scout .tieloc store
7 .tieval store
stop
'contraction
cond
*.scout 7 =
start
*.timer 10 mod 5 <
.scout inc
not
100 .fixlen store
.scout .tieloc store
7 .tieval store
dropbool
stop
'extension
cond
*.scout 8 =
start
800 .fixlen store
0 .fixpos store
*.timer 10 mod 9 =
0 .scout store
dropbool
stop
end
--- End code ---
bacillus:
IMO, there's only three good ways of moving a multibot, each of which rely on a stable info grid.
1-Traditional movements-this is more suited for linear bots, as getting bots to face the same way is a mightmare
2-Shortening and extending rigid ties-this may be easier, bots just shoot out if they're facing the right way
3-Turning moments-this is by far the easiest to use and the hardest to coordinate. Bots just swing the ties around, like a big lasso, then fix in place and become the new center of rotation when they turned far enough.
The best way to coordinate movement is by using *.timer, especially when you have nonlinear structures.
Welwordion:
--- Quote from: bacillus ---The best way to coordinate movement is by using *.timer, especially when you have nonlinear structures.
--- End quote ---
There is the problem I am doing that and for some reason it does not work, hell knows why.
Well I got it running at least sometimes here the sim.
bring some veggies near the orange bots and hope for the best, sometimes it works sometimes they bahave irregulary.
bacillus:
Did you remember to put in a time delay for different cells?
Peter:
Well I had a mulitibot behaving properly and moving with ties. I used a duo-bot woth contracting and extending ties. The actual movement was placed in 4 genes. And worked pretty efficient, really really efficient. Efficient like gaining maxvel with just ties. It worked with timecycles to extend and to relax for head and body.
Then I added stuff to make it behave right, and it went completely wrong.
The bot loses control now. I'll try to shorten it up, and refactor it.
Navigation
[0] Message Index
[#] Next page
Go to full version