Author Topic: 'Batterybot' gene!  (Read 2291 times)

Offline Elite

  • Bot Overlord
  • ****
  • Posts: 532
    • View Profile
'Batterybot' gene!
« on: January 24, 2006, 02:56:14 PM »
This is a prototype - a first attempt to put the basics of batterybot code into one gene, so don't be surprised if it doesn't work very well

EDIT: Seems to work fine  ^_^

Code: [Select]
*.tiepres .readtie *.numties sgn mult store
.tiepres .memloc *.robage -1 mult 1 add sgn mult store
.numties .tmemloc *.robage -1 mult 1 add sgn mult store
55 .tie *.numties sgn -1 mult 1 add sgn mult *.refeye sgn -1 mult 1 add sgn mult *.eye5 45 sub sgn mult *.memval sgn -1 mult 1 add sgn mult *.robage sgn mult store
628 .fixang *.numties sgn mult store
50 .fixlen *.numties sgn mult store
55 .tienum *.numties sgn mult *.treffixed mult store
.fixpos .tieloc *.numties sgn mult *.treffixed mult store
0 .tieval *.numties sgn mult *.treffixed mult store
80 .sharenrg *.multi mult store
*.tiepres .deltie *.robage -1 mult 50 add sgn mult store
*.tiepres .deltie *.tmemval 1 sub sgn mult store
*.tiepres .deltie *.myeye *.trefeye sub sgn abs -1 mult 1 add mult store

A bot with this gene (preferably near the end) will collect a veggie and use it as a portable power source, taking 80% of the veg's energy. However, your bot will navigate and act just the same as before (hopefully - well, they did in testing  :unsure: ).

[span style=\'font-size:14pt;line-height:100%\']This gene is free for all to use[/span]

Problems with this gene:
- Larger population densities can lead to several bots tieing to one veg by mistake (fixed)
- Bots will attack each other's vegs

Tell me if you notice any other bugs

EDIT: I've corrected the first error and updated the code  ^_^ , but the bots still attack other bots' vegs. I'll leave that to you, since it will require forcing the bot to not attack vegs that are tied to a conspec.

EDIT: It seems to work well, provided your bot is not a tie-feeder and has no leach genes, tie defences or pretty much anything to do with ties!
« Last Edit: January 25, 2006, 04:45:02 PM by Elite »