Difference between revisions of "MB Construction"
m (work in progress) |
(Contruction page for basic mb) |
||
Line 1: | Line 1: | ||
− | + | Below is a slightly modified form of TierMBt2. It represents a basic form of a multibot and has several unique features that make it easier to work with. It typically forms lines but will also form triangular forms on occasion. | |
− | |||
− | |||
− | |||
cond | cond | ||
*.robage 0 = | *.robage 0 = | ||
start | start | ||
− | |||
.tie inc | .tie inc | ||
+ | .numties .memloc store | ||
stop | stop | ||
+ | |||
+ | The .tie inc allows it to setup it's initial tie, typically tieing itself to it's parent. Next it stores the location of numties into memloc, this allows it to easily determine the number of ties other bots have. Multi works similar, but doesn't record unhardened ties. | ||
+ | |||
+ | cond | ||
+ | start | ||
+ | .out1 inc | ||
+ | stop | ||
+ | |||
+ | This gene continually increases out1. Other bots can check this against refage to see if the bot's age does in fact match. | ||
+ | |||
+ | cond | ||
+ | *.nrg 3000 > | ||
+ | *.body 100 < | ||
+ | start | ||
+ | 100 *.body sub .strbody store | ||
+ | stop | ||
+ | |||
+ | Keeps body levels around 100, only activates when the bot has enough nrg. | ||
cond | cond | ||
Line 15: | Line 30: | ||
*.body 100 > | *.body 100 > | ||
start | start | ||
− | 50 .repro | + | 50 .repro store |
stop | stop | ||
+ | |||
+ | Ahh, reproduction the beginnings of life. | ||
cond | cond | ||
*.myeye *.refeye = | *.myeye *.refeye = | ||
+ | *.in1 *.refage = | ||
*.numties 2 < | *.numties 2 < | ||
*.memval 2 < | *.memval 2 < | ||
Line 25: | Line 43: | ||
.tie inc | .tie inc | ||
stop | stop | ||
+ | |||
+ | Any time the bot and the bot it's looking at have less than two ties, a new tie is formed. This helps with bots seperated from the main multibot either by natural tie stretching, accidental tie removal, or it's partner dieing. | ||
cond | cond | ||
*.myeye *.refeye != | *.myeye *.refeye != | ||
+ | *.in1 *.refage != | ||
*.eye5 45 > | *.eye5 45 > | ||
+ | *.multi 1 = | ||
start | start | ||
-1 .shoot store | -1 .shoot store | ||
stop | stop | ||
+ | |||
+ | Feeding gene, currently bot only feeds when it ties have hardened. | ||
cond | cond | ||
*.myeye *.refeye = | *.myeye *.refeye = | ||
+ | *.in1 *.refage = | ||
*.eye5 0 > | *.eye5 0 > | ||
start | start | ||
Line 41: | Line 66: | ||
cond | cond | ||
− | *. | + | *.eye5 0 = |
start | start | ||
− | . | + | 314 rnd *.aim add .setaim store |
stop | stop | ||
+ | |||
+ | Random search genes using setaim. This is one of the most useful commands since it allows individual bots to look around themselves. Using aimdx or aimsx will turn the entire multibot, making co-ordinated motion difficult without specifically designating a single "head" for the entire multibot. | ||
cond | cond | ||
− | *. | + | *.myeye *.refeye != |
− | *. | + | *.in1 *.refage != |
+ | *.eye5 0 > | ||
start | start | ||
− | + | *.refxpos *.refypos angle .setaim store | |
stop | stop | ||
+ | |||
+ | Hunting gene allows bot to exactly focus on it's prey. | ||
cond | cond | ||
*.eye5 0 > | *.eye5 0 > | ||
*.myeye *.refeye != | *.myeye *.refeye != | ||
+ | *.in1 *.refage != | ||
start | start | ||
*.maxvel *.vel sub 2 div .up store | *.maxvel *.vel sub 2 div .up store | ||
stop | stop | ||
+ | |||
+ | Acceleration controls, bot accelerates whenever it sees prey. | ||
cond | cond | ||
− | *. | + | *.numties 2 > |
− | |||
start | start | ||
− | + | .deltie inc | |
stop | stop | ||
− | + | This causes the bot to delete ties when it has more than two. This helps to keep the structure of the mb from getting out of control. | |
− | |||
− | |||
− | |||
− | |||
end | end |
Revision as of 02:25, 6 July 2007
Below is a slightly modified form of TierMBt2. It represents a basic form of a multibot and has several unique features that make it easier to work with. It typically forms lines but will also form triangular forms on occasion.
cond *.robage 0 = start .tie inc .numties .memloc store stop
The .tie inc allows it to setup it's initial tie, typically tieing itself to it's parent. Next it stores the location of numties into memloc, this allows it to easily determine the number of ties other bots have. Multi works similar, but doesn't record unhardened ties.
cond start .out1 inc stop
This gene continually increases out1. Other bots can check this against refage to see if the bot's age does in fact match.
cond *.nrg 3000 > *.body 100 < start 100 *.body sub .strbody store stop
Keeps body levels around 100, only activates when the bot has enough nrg.
cond *.nrg 3000 > *.body 100 > start 50 .repro store stop
Ahh, reproduction the beginnings of life.
cond *.myeye *.refeye = *.in1 *.refage = *.numties 2 < *.memval 2 < start .tie inc stop
Any time the bot and the bot it's looking at have less than two ties, a new tie is formed. This helps with bots seperated from the main multibot either by natural tie stretching, accidental tie removal, or it's partner dieing.
cond *.myeye *.refeye != *.in1 *.refage != *.eye5 45 > *.multi 1 = start -1 .shoot store stop
Feeding gene, currently bot only feeds when it ties have hardened.
cond *.myeye *.refeye = *.in1 *.refage = *.eye5 0 > start 314 rnd *.aim add .setaim store store stop
cond *.eye5 0 = start 314 rnd *.aim add .setaim store stop
Random search genes using setaim. This is one of the most useful commands since it allows individual bots to look around themselves. Using aimdx or aimsx will turn the entire multibot, making co-ordinated motion difficult without specifically designating a single "head" for the entire multibot.
cond *.myeye *.refeye != *.in1 *.refage != *.eye5 0 > start *.refxpos *.refypos angle .setaim store stop
Hunting gene allows bot to exactly focus on it's prey.
cond *.eye5 0 > *.myeye *.refeye != *.in1 *.refage != start *.maxvel *.vel sub 2 div .up store stop
Acceleration controls, bot accelerates whenever it sees prey.
cond *.numties 2 > start .deltie inc stop
This causes the bot to delete ties when it has more than two. This helps to keep the structure of the mb from getting out of control.
end