Author Topic: Stupid Question  (Read 3765 times)

Offline kage

  • Bot Neophyte
  • *
  • Posts: 49
    • View Profile
Stupid Question
« on: November 29, 2006, 03:32:46 PM »
With things such as viruses, they tell you to store specific valuese in given areas, such as .shoot.

How do we access these?


Oh, and would there be a way to make a bot that the instant another bot ties to it, it reproduces all its energy into a new bot?
« Last Edit: November 29, 2006, 03:37:40 PM by kage »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Stupid Question
« Reply #1 on: November 29, 2006, 04:15:00 PM »
Quote from: kage
With things such as viruses, they tell you to store specific valuese in given areas, such as .shoot.

How do we access these?

Viruses act exactly like any other gene.  The only difference is usually a specific condition that prevents them from firing when they're not in the right bot.

So to read back the value in something a virus as muddled with, such as .shoot, you can either do *.shoot or .shoot *

Quote
Oh, and would there be a way to make a bot that the instant another bot ties to it, it reproduces all its energy into a new bot?

a gene like this would work:

cond
*.tiepres 0 !=
start
99 .repro store
stop

I think 99% is as high as you can reproduce, so that's where the 99 comes from.

Offline kage

  • Bot Neophyte
  • *
  • Posts: 49
    • View Profile
Stupid Question
« Reply #2 on: November 29, 2006, 04:46:15 PM »
Quote from: Numsgil
Viruses act exactly like any other gene.  The only difference is usually a specific condition that prevents them from firing when they're not in the right bot.

So to read back the value in something a virus as muddled with, such as .shoot, you can either do *.shoot or .shoot *
a gene like this would work:

cond
*.tiepres 0 !=
start
99 .repro store
stop

I think 99% is as high as you can reproduce, so that's where the 99 comes from.


Thank you once more for helping me  

I'm sorry but I just don't understand where I read the .shoot and stuff (sorry if I am asking something completely obvious)
« Last Edit: November 29, 2006, 06:34:30 PM by kage »

Offline Jez

  • Bot Overlord
  • ****
  • Posts: 788
    • View Profile
Stupid Question
« Reply #3 on: November 30, 2006, 09:45:10 AM »
Are you asking where you read .shoot or where the bot reads .shoot?

You can see any locations value in the bot console (r click on bot in sim and 'open console') when the sim is running. '? .shoot' would give you the value of location 7 (shoot) for that cycle of the bot's life, easiest done when the simulation is paused.

Otherwise,

Bots read values of locations using the * so *.shoot (or .shoot *) would return the value of shoot for that bot in that cycle at that point of the dna.

For instance, if the following genes were at the end of the bots dna it would read the value of shoot for that cycle and take appropriate actions;

cond
*.shoot 1 =
start
10 .up store
stop

cond
*.shoot 2 =
start
10 .dn store
stop

etc etc.

You could also use the value of shoot later on in the gene;

cond
start
*.shoot 10 mult .up store
stop

Just gene examples that aren't really practical but I hope that helps.  
« Last Edit: November 30, 2006, 09:46:04 AM by Jez »
If you try and take a cat apart to see how it works, the first thing you have in your hands is a non-working cat.
Douglas Adams

Offline kage

  • Bot Neophyte
  • *
  • Posts: 49
    • View Profile
Stupid Question
« Reply #4 on: November 30, 2006, 03:39:47 PM »
Quote from: Jez
Are you asking where you read .shoot or where the bot reads .shoot?

You can see any locations value in the bot console (r click on bot in sim and 'open console') when the sim is running. '? .shoot' would give you the value of location 7 (shoot) for that cycle of the bot's life, easiest done when the simulation is paused.

Otherwise,

Bots read values of locations using the * so *.shoot (or .shoot *) would return the value of shoot for that bot in that cycle at that point of the dna.

For instance, if the following genes were at the end of the bots dna it would read the value of shoot for that cycle and take appropriate actions;

cond
*.shoot 1 =
start
10 .up store
stop

cond
*.shoot 2 =
start
10 .dn store
stop

etc etc.

You could also use the value of shoot later on in the gene;

cond
start
*.shoot 10 mult .up store
stop

Just gene examples that aren't really practical but I hope that helps.  


thanks,  I just wanted to know WHERE it was, so thanks alot