Author Topic: newbie robot  (Read 6322 times)

Offline Lorgar

  • Bot Neophyte
  • *
  • Posts: 12
    • View Profile
newbie robot
« on: May 01, 2011, 02:31:07 PM »
Ok, I have been through the tutos many times. (and even now, some subtle uses of info shot are still out of reach). I tried to make a small bot. Hubris was greatly rewarded, my boyz were wiped clean by the "animal minimalis" bots I introduced. shame and anger. After a lil bit of work I made this :

'orkyboy
cond
 *.eye1 0 =
 *.eye5 0 =
 *.eye9 0 =
start
 mult 314 rnd
stop


cond
 *.eye1 *.eye5 >
start
 mult -40
stop

'idem oeil5
cond
 *.eye9 *.eye5 >
start
 mult 40
stop


'set aim
cond
start
 .aimdx store
stop

cond
 *.refeye *.myeye !=
 *.eye5 20000 <
start
 15  .up store
stop

'waste shoot
cond
 *.waste 800 >
start
 -4 .shoot store
stop

'attackshoot
cond
 *.eye5 0 !=
 *.refeye *.myeye !=
 *.refdist 1 <
start
 -1 .shoot store
stop

cond
 *.trefeye *.myeye =
 *trefnrg 100 = or
start
 *.tienum .deltie store
stop


'feeding genes
cond
 *.eye5 5000 >
 *.refeye *.myeye != and
 *.tienum 3 < and
start
  1 .tie store
  1 .tienum store
 -6 .tieloc store
 -1000 .tieval store
stop


cond
 *.robage 0 =
start
 *.tienum .deltie store
stop


'reproductive gene
cond
 *.nrg 6000 >
 *.eye5 40 <
start
 -180 .aimdx store
 25 .repro store
 180 .55 store
stop
end

it does manage to survive and thrive competing with animalminimalis, but cant do a thing about more evolved bots. What can I do to make it work better? what mistakes did I make coding its dna? how can I make him create energy sharing ties with his comrades AND taking body points from enemy ties-targeted bots?

looking forward for an answer...
btw, strange thing, I may be tired but it seems that the "newbie-section-presentyourself" disappeard when I loged in after register...
Am I seeing things?

Offline SiriusPrater

  • Bot Neophyte
  • *
  • Posts: 11
    • View Profile
Re: newbie robot
« Reply #1 on: May 01, 2011, 03:59:51 PM »
Hey Lorgar.  I'd like to help, though I'm not an expert.  The first thing to work on, I think, would be what the bot does when it eye5 sees a conspec.  You could make the bot continue spinning or have them move away from conspecs.  Other than that, it seems to work.  Good luck.

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Re: newbie robot
« Reply #2 on: May 01, 2011, 07:44:26 PM »

'orkyboy
cond
 *.eye1 0 =
 *.eye5 0 =
 *.eye9 0 =
start
 mult 314 rnd
stop


cond
 *.eye1 *.eye5 >
start
 mult -40
stop

'idem oeil5
cond
 *.eye9 *.eye5 >
start
 mult 40
stop


'set aim
cond
start
 .aimdx store
stop

I don't quite get the idea of these genes, what are they meant to do?

Offline Lorgar

  • Bot Neophyte
  • *
  • Posts: 12
    • View Profile
Re: newbie robot
« Reply #3 on: May 02, 2011, 05:43:03 AM »
It was thought like this : if one gene is activated, the others are not, mult delete one value of the stack and replace it by 40/-40 etc, wich is then taken and stored in .aimdx.

did not work well, so I nuked it. now it's like this :
 
Code: [Select]
'orkyboy
'orkybot

'tie to parent
cond
*.robage 0 =
start
.tie inc
.tienum inc
stop

'untie
cond
*.robage = 1
start
.deltie inc
stop


'movement genes
cond
 *.eye5 0 =
 *.eye3 0 =
 *.eye7 0 =
 *.numties 0 =
start
 314 rnd .aimdx store
 15 .up store
stop

cond
 *.eye3 *.eye5 >
start
 -30 .aimdx store
stop

cond
 *.eye7 *.eye5 >
start
 30 .aimdx store
stop

cond
*.eye5 0 >
*.refeye *.myeye !=
start
*.refxpos *.refypos angle .setaim store
*.refveldx .dx store
*.refvelup 30 add .up store
stop


'waste shoot
cond
 *.waste 800 >
start
 -4 .shoot store
stop

cond
 *.venom 100 <
 *.nrg 3000 >
start
 100 *.venom sub .strvenom store
 .up .vnloc store
 -2 .venval store
stop


'venom shoot
cond
 *.eye5 20 >=
 *.refeye *.myeye !=
start
 -3 .shoot store
stop

'attackshoot
cond
 *.eye5 20 >=
 *.refeye *.myeye !=
start
 -6 .shoot store
stop


'feeding genes
cond
 *.eye5 0 !=
 *.refeye *.myeye !=
 *.refbody *.mybody =<
start
  1 .tie store
stop

cond
 *.numties 0 !=
start
 .readtie

'reproductive gene
cond
 *.nrg 8000 >
 *.body 800 >
 *.eye5 40 <
start
 50 .repro store
stop

cond
 *.numties 0 >
 *.trefeye *.myeye !=
start
 -1 .tieloc store
 -1000 .tieval store
 1 .tienum store
stop



'shell gene
cond
 *.shell 100 <
start
 100 *.shell sub .mkshell store
stop

'poison gene
cond
 *.poison 100 <
 *.nrg 2000 >
start
 100 *.poison sub .mkpoison store
 .shoot .ploc store
stop

cond
 *robage 0 >
start
 1 .deltie store
stop

end

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Re: newbie robot
« Reply #4 on: May 02, 2011, 11:31:35 AM »
Is there anything wrong with this one now?

Offline Lorgar

  • Bot Neophyte
  • *
  • Posts: 12
    • View Profile
Re: newbie robot
« Reply #5 on: May 02, 2011, 01:45:40 PM »
I want to make it more resilient. What about a paralel virus based reproduction system? what defense should I put up first (as shell, poison, venom or slime are costly I may have to choose wich one to implement first, taking into account the energy and waste management system)

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Re: newbie robot
« Reply #6 on: May 02, 2011, 03:27:03 PM »
I do not know what you mean by a "parallel virus based reproduction system", can you explain that? Viruses are also very expensive and difficult to spread without using a lot of energy. I remember making one and it killing my own bots off very quickly before it even spread.

I use poison mostly as defense as it is easy to control and can allow you to do many things to the other bot, for example, you can get their bot to fire energy at you while you have a chance to react. It can also be used to blind them or make them turn away(which isn't useful in all circumstances because some bots have eyes all the way around them). One limitation of the poison is that it degrades, which means that you need to work out a good way to create it while being attacked. Shell and slime are expensive and, to be honest, I hardly use them but I am sure that they are a good defense when used well. Slime also degrades and only protects from viruses, I think. Venom is an offense, by the way, it is just a bot controlled poison, being able to choose when to fire it, instead of it being a "reflex". It does not degrade like poison either.

To be honest I would go with poison as it can do so many more things than the others, however, you will need to have some sort of "detection" system to tell when it is being hit.

Offline Lorgar

  • Bot Neophyte
  • *
  • Posts: 12
    • View Profile
Re: newbie robot
« Reply #7 on: May 02, 2011, 04:10:34 PM »
A virus infected bot would use all his body and nrg to produce little poisoned bots that create ties and stay together, sharing slime (to protect them from another virus infection) they would react with poison and/or venom if attacked by a bot without a specific gene added to all my bots.
something like this (101 being the memory address and 13 the specific gene) I assume the presence of an aiming gene to aim at the attacker

cond
*.hit 0 !=
*.bodloss 0!=
*.ref101 13 !=
start
-3 .shoot store
stop

these little beings would be "stockbots" just fortifying themselves to protect whatever body and nrg point they have until some of my bots come around to eat them. What they would do without being hindered by poison (either using -6 shots or just not being seen as foes) or venom.

edit, where can I find a good MB tuto?

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Re: newbie robot
« Reply #8 on: May 02, 2011, 04:30:41 PM »
There's only the one on the wiki. To be honest, multibots isn't the way to go.

Offline Lorgar

  • Bot Neophyte
  • *
  • Posts: 12
    • View Profile
Re: newbie robot
« Reply #9 on: May 04, 2011, 01:48:13 AM »
ok, panda, look at this one!
 8)
Code: [Select]
'orkyboy

def tgtpoison 50
def tgtvenom 51
def tgtslime 52
def tgtshell 53
def tgtparalyzed 54
def tgtma 55

'tie to parent
cond
*.robage 0 =
start
.tie inc
*.tiepres .tienum store
stop

'untie
cond
*.robage = 1
start
*.tienum .deltie store
 stop


'movement genes


cond
 *.eye3 *.eye5 >
start
 -30 .aimdx store
stop

cond
 *.eye7 *.eye5 >
start
 30 .aimdx store
stop

cond
*.eye5 0 =
*.refeye *.myeye = or
start
314 rnd .aimdx store
stop

cond
*.eye5 0 >
*.refeye *.myeye !=
start
*.refxpos *.refypos angle .setaim store
*.refveldx .dx store
*.refvelup 30 add .up store
stop


'waste shoot
cond
 *.waste 800 >
start
 -4 .shoot store
stop

cond
 *.venom 30 <
 *.nrg 2000 >
start
 30 *.venom sub .strvenom store
 .up .vnloc store
 0 .venval store
stop


'venom shoot
cond
*.eye5 =!
*.refeye *.myeye !=
start
 *.memval .tgtID store
 .up .memloc store
 *.memval .tgtma store
 .paralyzed .memloc store
 *.memval .tgtparalyzed store
 .shell .memloc store
 *.memval .tgtshell store
 .poison .memloc store
 *.memval .tgtpoison store
 .slime .memloc store
 *.memval .tgtslime store
stop


cond
 *.eye5 20 >=
 *.refeye *.myeye !=
 *.tgtma 0 =!
 *.tgt paralyzed 0 !=
 *.tgtshell 0 =
 *.tgtpoison 0 =
 *.tgtID *out1 =
start
 -3 .shoot store
stop


'attackshoot

cond
 *.eye5 20 >=
 *.refeye *.myeye !=
 *.tgtshell 0 =
start
 -6 .shoot store
stop

'nrg shot
cond
*.eye5 20 >=
*.refeye *.myeye !=
*.tgtpoison 0 =
start

stop

'feeding genes
cond
 *.eye5 0 !=
 *.refeye *.myeye !=
 *.tgtslime 0 =
start
  50 rnd .tie store
 *.tiepres .tienum store
 -6 .tieloc store
 -1000 .tieval store
stop


'anti leach gene
cond
*.tiepres *.tienum !=
start
*.tiepres .deltie store
stop


'reproductive gene
cond
 *.nrg 6000 >
 *.body 800 >
 *.eye5 40 <
start
 50 .repro store
stop


'shell gene
cond
 *.slime 20 <
start
 20 *.slime sub .mkslime store
stop

'poison gene
cond
 *.poison 10 <
 *.nrg 2000 >
start
 10 *.poison sub .mkpoison store
 .shoot .ploc store
stop


end