Author Topic: Keep feeding while breeding  (Read 4709 times)

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Keep feeding while breeding
« on: March 14, 2005, 01:11:53 PM »
Ever noticed that when your little robot reaches enough energy to reproduce, he sometimes doesn't but just keeps right on feeding? The reason is that he can't make a baby when there isn't room in front.

This can sometimes be a critical mistake if you want to colonize the screen before the enemy does.

Here is how you make your robot reproduce without missing a beat.

Start by defining a nice custom variable at the start of the genome. .newmom is my favorite.
Code: [Select]
def newmom 55

cond
 *.newmom 0 >
start
 0 .newmom store
 628 .aimsx store
stop

cond
 *.nrg 6000 >
start
 1 .newmom store
 628 .aimsx store
 50 .repro store
 0 .shoot store
stop

Your robot should spin 180 degrees, pop out a baby then spin straight back and carry right on feeding.

What does the "0 .shoot store" line do?

Figure it out. It isn't that difficult!

 :D  PY  :D
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Keep feeding while breeding
« Reply #1 on: March 14, 2005, 01:21:23 PM »
One of my questions:

Which commands are executed in which order?  If we could have a list it'd be  good to know.  I'll look through the source and try it myself.

Knowing that turning happens before reproducing is critical for this to work.

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Keep feeding while breeding
« Reply #2 on: March 14, 2005, 01:23:36 PM »
Turning before shooting is kind of important too.

Turning is actually about the first thing that is done other than changing memory location like .newmom.

A list of the hierarchy of all the commands would be quite useful.

 :D  PY  :D
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D