Difference between revisions of "Memloc and Memval"

From WikiManual
Jump to: navigation, search
((Elite) - Added chameleon code)
((Elite))
Line 20: Line 20:
 
Example:
 
Example:
  
' Chameleon
+
def foundmemloc 51
 +
def reqmemval 52
  
def foundmemloc 51
+
cond
def reqmemval 52
+
*.eye5 0 >
 +
*.refshoot *.myshoot !=
 +
*.foundmemloc 0 =
 +
start
 +
.memloc .memloc store
 +
*.memval .foundmemloc store
 +
stop
  
cond
+
cond
*.eye5 0 >
+
*.eye5 0 >
*.refshoot *.myshoot !=
+
*.refshoot *.myshoot !=
*.foundmemloc 0 =
+
*.foundmemloc 0 !=
start
+
start
.memloc .memloc store
+
*.foundmemloc .memloc store
*.memval .foundmemloc store
+
*.memval .reqmemval store
stop
+
stop
  
cond
+
cond
*.eye5 0 >
+
*.reqmemval 0 !=
*.refshoot *.myshoot !=
+
*.foundmemloc 0 !=
*.foundmemloc 0 !=
+
start
start
+
*.reqmemval *.foundmemloc store
*.foundmemloc .memloc store
+
stop
*.memval .reqmemval store
 
stop
 
 
 
cond
 
*.reqmemval 0 !=
 
*.foundmemloc 0 !=
 
start
 
*.reqmemval *.foundmemloc store
 
stop
 
  
 
These genes will fool memloc/memval conspec recognition
 
These genes will fool memloc/memval conspec recognition

Revision as of 09:38, 28 January 2006

These allow the bots to readback another bot's memory locations. To do this simply specify the location you'd like to reference in memloc and the bot will receive the information in memval.

Example:

cond
start
67 .memloc store
stop
cond
*.eye5 40 >
*.memval *67 !=
start
-1 .shoot store
stop

This will cause the bot to attack bots that don't have the same number as it does in memory location 67.

A slight problem, is that any bot can determine the location being referenced by simply checking in memloc with it's own memloc/memval. This is simply a more complex version of the problems facing bots using In and Out for secure information exhchange.

Example:

def foundmemloc 51
def reqmemval 52
cond
*.eye5 0 >
*.refshoot *.myshoot !=
*.foundmemloc 0 =
start
.memloc .memloc store
*.memval .foundmemloc store
stop
cond
*.eye5 0 >
*.refshoot *.myshoot !=
*.foundmemloc 0 !=
start
*.foundmemloc .memloc store
*.memval .reqmemval store
stop
cond
*.reqmemval 0 !=
*.foundmemloc 0 !=
start
*.reqmemval *.foundmemloc store
stop

These genes will fool memloc/memval conspec recognition

A more complex method would be to randomly vary the locations checked per cycle, but most bots simply make do with the refeye/myeye combination.

To use the commands tmemval and tmemloc the procedure is similar, but requires the tie number to be stored in tienum.