Author Topic: Best thing ever  (Read 21240 times)

Offline southpointingchariot

  • Bot Neophyte
  • *
  • Posts: 22
    • View Profile
Re: Best thing ever
« Reply #15 on: June 28, 2012, 06:56:38 PM »
This process is truly amazing and awesome!

I've been having the same problem over and over again. After a while, a Rolling Moss bot mutates, and causes an massive explosion of birth, slowing things down to the point of unusable.

Here is the original code:
Code: [Select]
' Rolling Moss
' by: southpointingchariot
' Vegetable
'
' A scared plant

cond
  *.nrg  30000  >
start
  50  .repro  store
  15  .aimdx  store
stop

' Gene 1 Food Finder
cond
 *.eye5 0 >
start
 *.refveldx .dx store
 *.refvelup -10 add .up store
stop

end

And the mutated code:
Code: [Select]
''''''''''''''''''''''''  Gene:  1 Begins at position  1  '''''''''''''''''''''''
 cond
 *.nrg 30000 >
 else
 50 .repro store
 15 .aimright store
 stop
''''''''''''''''''''''''  Gene:  1 Ends at position  12  '''''''''''''''''''''''

''''''''''''''''''''''''  Gene:  2 Begins at position  13  '''''''''''''''''''''''
 cond
 *.eye5 0 >
 start
 *.refveldx .dx store
 *.refvelup -10 add .up store
 stop
''''''''''''''''''''''''  Gene:  2 Ends at position  26  '''''''''''''''''''''''
It would seem that the problem arises when .aimdx becomes .aimright. Any suggestions on how to prevent this from becoming disastrous?

Offline Tilthanseco

  • Bot Builder
  • **
  • Posts: 60
    • View Profile
Re: Best thing ever
« Reply #16 on: June 28, 2012, 07:20:58 PM »
Quote
It would seem that the problem arises when .aimdx becomes .aimright

Aimdx means aimright. For some reason in the program it lists it as that.

The problem really is that the veggies got "cancerous" by sticking an "else" in the repro gene. The bot reproduces unless it has more than 30000 nrg now.

Cancerous veggies are a very very very common mutation with veggies. Cancer bots aren't because they just die...

Edit: I still don't know of a good way to make veggies not cancerous... Try setting the veggy energy option to "kilobody point" That makes it so small veggies don't get as much nrg as big plants. (and cancer plants start out small) Also try lowering the nrg they get.
« Last Edit: June 28, 2012, 08:48:05 PM by Tilthanseco »
Undisputed creator of bot Sonar!

Offline southpointingchariot

  • Bot Neophyte
  • *
  • Posts: 22
    • View Profile
Re: Best thing ever
« Reply #17 on: June 28, 2012, 08:57:54 PM »
Edit: I still don't know of a good way to make veggies not cancerous... Try setting the veggy energy option to "kilobody point" That makes it so small veggies don't get as much nrg as big plants. (and cancer plants start out small) Also try lowering the nrg they get.

I was just about to come post that kilobody worked :). Things seem quite stable now. I just had a system break down because only non reproducing bots survived - this is actually a good thing, as all the changes I want to make will help fix that. Can you tell me precisely how toroidal works? Also, do veggies not mutate?
« Last Edit: June 28, 2012, 09:18:58 PM by southpointingchariot »

Offline Tilthanseco

  • Bot Builder
  • **
  • Posts: 60
    • View Profile
Re: Best thing ever
« Reply #18 on: June 28, 2012, 10:25:01 PM »
Toroidal means that the world loops around both east west and north south. The bots go up and come out the bottom, go right and come out the left. It's default for F1 conditions.

Veggies will mutate if "disable mutations" is unchecked (1).  You can also change the species and different rate of mutations in "mutations rates" (2).
I circled the stuff in the attached screen shot.

Undisputed creator of bot Sonar!

Offline southpointingchariot

  • Bot Neophyte
  • *
  • Posts: 22
    • View Profile
Re: Best thing ever
« Reply #19 on: June 28, 2012, 10:37:45 PM »
Thank you so much Tilthanseco! It seems I just wasn't being patient enough, as mutations have occurred. I've already had my first meaningful permanent mutation - changing the first gene in some way concerning when it decides to move that I don't fully understand - looks kinda like random movement, but I don't think it is. It definitely helps with searching for those elusive rollers:

Taxxon (Initial)
Code: [Select]
'Taxxon
'By: southpointingchariot
'Eat each other, yo.

' Gene 1 Food Finder
cond
 *.eye5 0 >
 start
 *.refveldx .dx store
 *.refvelup 30 add .up store
 stop

' Gene 2 Eat Food
cond
 *.eye5 50 >
 start
 -1 .shoot store
 *.refvelup .up store
 stop

' Gene 3 Avoiding Family
cond
 *.eye5 0 =
 start
 314 rnd .aimright store
 stop

' Gene 4 Reproduce
cond
 *.nrg 30000 >
 start
 10 .repro store
 stop

end

Rando (Mutated)
Code: [Select]
''''''''''''''''''''''''  Gene:  1 Begins at position  1  '''''''''''''''''''''''
 cond
 *.eye5 -10 >
 start
 *.refveldx .dx store
 *.refvelup 30 add .up store
 stop
''''''''''''''''''''''''  Gene:  1 Ends at position  14  '''''''''''''''''''''''

''''''''''''''''''''''''  Gene:  2 Begins at position  15  '''''''''''''''''''''''
 cond
 *.eye5 50 >
 start
 -1 .shoot store
 *.refvelup .up store
 stop
''''''''''''''''''''''''  Gene:  2 Ends at position  26  '''''''''''''''''''''''

''''''''''''''''''''''''  Gene:  3 Begins at position  27  '''''''''''''''''''''''
 cond
 *.eye5 0 =
 start
 314 rnd .aimright store
 stop
''''''''''''''''''''''''  Gene:  3 Ends at position  36  '''''''''''''''''''''''

''''''''''''''''''''''''  Gene:  4 Begins at position  37  '''''''''''''''''''''''
 cond
 *.nrg 30000 >
 start
 10 .repro store
 stop
''''''''''''''''''''''''  Gene:  4 Ends at position  45  '''''''''''''''''''''''

Offline Tilthanseco

  • Bot Builder
  • **
  • Posts: 60
    • View Profile
Re: Best thing ever
« Reply #20 on: June 29, 2012, 12:02:57 AM »
Quote
cond
 *.eye5 -10 >

That makes it so the bot always does that gene even when it doesn't see something. (because eye5 is always at least 0 which is > -10)

As a result, the bot stops moving to the side and starts accelerating 30 when it doesn't see a bot, because the refvel resets to 0.

If you have this as a plant, then it probably helped it run away from predators because it always moves now.
Undisputed creator of bot Sonar!

Offline ikke

  • Bot Destroyer
  • ***
  • Posts: 300
    • View Profile
Re: Best thing ever
« Reply #21 on: June 29, 2012, 01:20:35 AM »
If you have per kilobody energy, and set it low, the mutation to watch for is a change in the .repro condition from nrg to body

Offline southpointingchariot

  • Bot Neophyte
  • *
  • Posts: 22
    • View Profile
Re: Best thing ever
« Reply #22 on: June 29, 2012, 02:22:52 PM »
Can anyone tell me what "Objects > Speciation does?"

Offline Tilthanseco

  • Bot Builder
  • **
  • Posts: 60
    • View Profile
Re: Best thing ever
« Reply #23 on: June 29, 2012, 03:43:44 PM »
I think it is broken now, but it sounds like it made an awesome looking graph. And it was supposed to split species in 2.
 http://forum.darwinbots.com/index.php/topic,2910.msg1377954.html#msg1377954

The genetic distance and generation distance graphs are also broken.
« Last Edit: June 29, 2012, 03:46:20 PM by Tilthanseco »
Undisputed creator of bot Sonar!

Offline southpointingchariot

  • Bot Neophyte
  • *
  • Posts: 22
    • View Profile
Re: Best thing ever
« Reply #24 on: June 29, 2012, 06:19:03 PM »
I think it is broken now, but it sounds like it made an awesome looking graph. And it was supposed to split species in 2.
 http://forum.darwinbots.com/index.php/topic,2910.msg1377954.html#msg1377954

The genetic distance and generation distance graphs are also broken.

Too bad!

I'm now working on getting them not to shoot their parents or children. My first actual coding! The wiki lists some methods to prevent a bot from attacking its own species, but I only want to prevent them from attacking their parents and children. Any advice?

I'm also having trouble figuring how to structure the sexrepro and .fertilized code. I'm now trying to figure how to tell a bot not to fertilize a bot that's already fertilized. Are there any prominent examples of sexual bots or other suggestions? Here's the code I have:
Code: [Select]
cond
 *.eye5 0 >
 start
 *.refveldx .dx store
 *.refvelup 30 add .up store
 stop

cond
 *.eye5 50 >
 start
 -1 .shoot store
 *.refvelup .up store
 stop

cond
 *.eye5 0 =
 start
 314 rnd .aimright store
 stop

cond
*.eye5 50 >
*.refeye *.myeye =
start
-8 .shoot store
stop

cond
*.fertilized 0 >
*.nrg 10000 >
start
50 .sexrepro store
stop

 cond
 *.nrg 30000 >
 start
 10 .repro store
 stop
« Last Edit: June 29, 2012, 10:23:31 PM by southpointingchariot »

Offline ikke

  • Bot Destroyer
  • ***
  • Posts: 300
    • View Profile
Re: Best thing ever
« Reply #25 on: June 30, 2012, 02:15:05 AM »
The easiest way to signal fertilisation is setting .out1 and and reading with .in1. If I may request a feature for your bot: add sexual selection: something like *.refkills *.mykills > as condition for accepting sperm. My theory is that sexual reproduction will break down without proper sexual selection in a evo sim

Offline southpointingchariot

  • Bot Neophyte
  • *
  • Posts: 22
    • View Profile
Re: Best thing ever
« Reply #26 on: June 30, 2012, 02:02:12 PM »
The easiest way to signal fertilisation is setting .out1 and and reading with .in1. If I may request a feature for your bot: add sexual selection: something like *.refkills *.mykills > as condition for accepting sperm. My theory is that sexual reproduction will break down without proper sexual selection in a evo sim

Thanks for the input - alas, my lack of familiarity with the coding makes me not really sure how to implement this.

Offline Tilthanseco

  • Bot Builder
  • **
  • Posts: 60
    • View Profile
Re: Best thing ever
« Reply #27 on: July 01, 2012, 12:13:29 AM »
For whate ikke said:

Code: [Select]
' Show I'm fertilized
cond
*.fertilized 0 >
start
' Display my fertilize status
*.fertilized .out1 store
stop

' Sex with unfertilized only
cond
*.eye5 50 >
*.refeye *.myeye =
' Are they fertilized?
*.in1 0 =
start
-8 .shoot store
stop

The in/out pairs are a nice way to communicate for many different things.

For attacking parents and children, you can put in *.robage conditions in the shoot and follow genes. Like shoot and follow only *.refage 10 >
And only shoot and follow when I'm *.robage 10 >

I like ikke's suggestion of making them only sexrepro with sperm they have more kills with.

You probably saw it by now, but the Sysvar page is the best page on the wiki in my opinion. http://wiki.darwinbots.com/w/Sysvar
Undisputed creator of bot Sonar!

Offline southpointingchariot

  • Bot Neophyte
  • *
  • Posts: 22
    • View Profile
Re: Best thing ever
« Reply #28 on: July 01, 2012, 03:52:31 PM »
For whate ikke said:

Code: [Select]
' Show I'm fertilized
cond
*.fertilized 0 >
start
' Display my fertilize status
*.fertilized .out1 store
stop

' Sex with unfertilized only
cond
*.eye5 50 >
*.refeye *.myeye =
' Are they fertilized?
*.in1 0 =
start
-8 .shoot store
stop

The in/out pairs are a nice way to communicate for many different things.

For attacking parents and children, you can put in *.robage conditions in the shoot and follow genes. Like shoot and follow only *.refage 10 >
And only shoot and follow when I'm *.robage 10 >

I like ikke's suggestion of making them only sexrepro with sperm they have more kills with.

You probably saw it by now, but the Sysvar page is the best page on the wiki in my opinion. http://wiki.darwinbots.com/w/Sysvar

Thanks for the help! It seems to be working great.

Your robage idea is interesting - but how would that stop children from attackign parents?

Offline Tilthanseco

  • Bot Builder
  • **
  • Posts: 60
    • View Profile
Re: Best thing ever
« Reply #29 on: July 02, 2012, 01:32:04 PM »
Have the shooting and following gene make sure that it's old enough. That would still let them attack each other in the future.

Maybe for not attack children and parents ever, have them pass down a code.

Have them make a code and put it in 971 (Racial memory)
Code: [Select]
cond
*971 0 =
start
32000 rnd 971 store
stop

Broadcast the code
Code: [Select]
cond
*971 *.out1 !=
start
*971 .out1 store
stop

Then have them check to see if others have that code and if they do, don't shoot or follow.
Code: [Select]
cond
*.eye5 40 >
*.in1 *971 !=
start
'Shoot
stop

That should keep them from killing their children and mom's.

You can probably also use memval and memloc, but I don't have experience with those.
Undisputed creator of bot Sonar!