Difference between revisions of "In and Out"
Chickenlord (talk | contribs) |
(Edited to include that there are now 10 in and out sysvars as the article had previously only made reference to 5.) |
||
Line 1: | Line 1: | ||
− | This refers to the [[ | + | This refers to the 10 [[in]] and [[out]] sysvar locations. The number stored at [[.out1]], [[.out2]] or another out can be read by any robot viewing the bot, with the value arriving at [[.in1]], [[.in2]] or another in respectively. These were in the past used for identification, and more recently in unique bot species not intended for battle. |
ID'ing non family with in/out: | ID'ing non family with in/out: |
Revision as of 17:58, 6 July 2008
This refers to the 10 in and out sysvar locations. The number stored at .out1, .out2 or another out can be read by any robot viewing the bot, with the value arriving at .in1, .in2 or another in respectively. These were in the past used for identification, and more recently in unique bot species not intended for battle.
ID'ing non family with in/out:
*.in1 *.out1 !=
A problem similar to the one facing bots using memloc/memval for identification is that with the simple code:
*.in1 .out1 store
An enemy bot can seem like family. Of course with randomly(rnd) changing their value via inc/dec an enemy bot will waste Energy storing these.
But, you can ID bots by talking to them:
' if you see something, ask "Can I eat you?" cond *.eye5 0 > start 1 .out1 store stop ' If they don't say No, ' eat em cond *.eye5 0 > *.out1 1 = *.in2 2 != start -1 .shoot store stop ' If Someone asks to eat you, ' just say "No" cond *.eye5 0 > *.in1 1 = start 2 .out2 store stop
This DNA tells the bot: see something, put out1 1. If that thing doesn't put out 2, then eat it. And when something says 1, say 2.