Author Topic: 5 Questions re DB opns  (Read 11445 times)

Offline AZPaul

  • Bot Builder
  • **
  • Posts: 76
    • View Profile
5 Questions re DB opns
« on: March 24, 2005, 03:13:16 PM »
Howdy 'gin folk,

Some simple inquiries to facilitate my understanding:

1.  Console

Usefull debug tool. Console window says "type help." Do that...nothing happens.
Can we see a bot's specific memory values thru console? Also, would like ability to expand that window some to see more.  My DNA is (as am I) quite verbose.

2.  Specific to memloc/memval

Do we have to "shoot" .eye5 to gain these values? I've looked for an example, not extensively tho since I'm being somewhat lazy this week, and can't find one.  If I shoot a memloc thru .eye5 does the target bot have to "shoot" back the memval? (I hope not). Any code example (some specific bot in the library)?

3.  Criteria for "Saving Best Bot"

Is this based soley on # offspring produced (I would assume) and what is the tiebreaker when you have 30 bots with same # of prodgeny?

4.  Organism vs DNA save

Say what? So once the best is saved I have to go back retrieve it into a sim and capture the DNA? The DNA is the organism, yes? Why not just save the bot's DNA in the usual .txt format? There is a reason, I'm sure. What is it? What am I missing?

5.  DNA limits

In building my base evo sim bots I am throwing all code efficiency to the cows.  I am purposely breaking gene conditionals into separate genes using switches/triggers for control. When .sexrepro is working well enough the gene swap routines will produce copious variability. I have a base herbivore now that goes out looking to cuddle up to a mate (proximity sets off the .repro gene) and I haven't even built in the sex selection criteria yet. She just gets close enough to any other of her species and drops the kid. Already up to 30+ genes. What are the limits? # of genes? overall DNA length?

OK, I lied, again. 6 questions.

6.  Racial memory

The racial memory is passed onto junior one location per cycle after the 20-cycle birth tie is severed?  Even if mom & junior are in the process of swimming away from each other? Is this intended to be the "nurture" side of the "nurture vs nature" duality? No, I'm not complaining. I can make use of this.  Just curious.

I gotta tell ya, I love this thing. Not just the academic exercise. It's down right fun.

One of the first areas to be "mutated" is often that "break birth tie" logic (at least that's the one most immeadiatly visible). The result can be hilarious (I'm easily entertained).  I had a cluster of 16 cells all linked and thrashing about like a tenticled anemone enveloping one of those cabbages (alga_minimalis).  Even though no mutated code showed any coordinated action, when a delta came up to take a nibble the "arms" seemed to fold around it and each cell shot the ever-livin bejesus out if it. One dead delta. This happened atleast a dozen times.  Eventually, about 6 deltas all found it all at once and ripped it to shreds. The thing lasted a good 20,000 cycles.

Enough for now. Gotta go.

Thanks, as always.

-P
« Last Edit: March 24, 2005, 03:48:33 PM by AZPaul »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
5 Questions re DB opns
« Reply #1 on: March 24, 2005, 03:47:02 PM »
I'll answer what I can, but some of this I never use, so I don't know how it works.

1.  What are you typing exactly.

Type exactly what I put on the line beneath this one and hit enter
help

that should tell you all about various console commands.

The widow that shows DNA should have a slider on it.  It's uinfortunate that each bit is given it's own line.  Makes the DNA very long.

2.  Okay, memval works exactly like the ref variables.  It returns whatever is in the memory location memloc of the robot in eye5.  There aren't any shots involved, it's all automatic.

memloc likes to reset in 2.35, so make sure you're resetting it the turn before you're reading it.  I have this at the start of my DNA, takes care of everything:

cond
*.memloc .yourvalue !=
start
.yourvalue .memloc store
stop

where .yourvalue is the memory location you want.

3.  Yep, most numerous offspring, though I'm playing with the idea of returning the bot who has the most vested energy between it and it's offspring.

So it's whichever species can retain the most energy, not necessarily number of individuals.

But that's all for later of course.

4.  No idea.  I just copy and paste DNA from the console to a text file.

5.  In 2.35, the number of genes is like 300 I think and the DNA length is 1000 I think.  The DNA length in the newer version will be removed, but I think the gene limit is still there.

6.  
Quote
The racial memory is passed onto junior one location per cycle after the 20-cycle birth tie is severed

Close, it's:
The racial memory is passed onto junior one location per cycle after the 20-cycle if the birth tie isn't severed.

Offline AZPaul

  • Bot Builder
  • **
  • Posts: 76
    • View Profile
5 Questions re DB opns
« Reply #2 on: March 24, 2005, 04:25:39 PM »
Whoa, that was quick, Nums. Thanks.

1. Console

Yes, just

help

in the console window and I get zip. Not even character feedback.
The console is not "running" at the time.
Again curious, what are the "nose" and "hand" for?

2. Memloc/memval

Excellent answer! Just what I needed. You coded this just for me and my strange peccadillos, didn't you. Excellent answer, indeed.

3. Best bot offspring

So what does the code in 2.35 do now when there are numerous bots with the same # offspring?

4.  Organism vs DNA

Not that there isn't enough on the programmers' plates, but, maybe consider changing this. Unless there is real reason it is the DNA code we want to look at on these mutants. Might as well save a step and write best bot to .txt  

I'm not sure how an "organism" is defined in DB. We save the color, display size, that little gene display in the center, mem locations and values? Doesn't really matter. Unless there is some hidden need unknown to us both?

5. So after the 20-cycle period, [you]if the birth tie is still there[/you], the transfer will take place one location per cycle? I thought DB disolved the tie automatically at 20 cycles, no?

-P

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
5 Questions re DB opns
« Reply #3 on: March 24, 2005, 04:42:10 PM »
4.  When you save organism, you save the whole thing, even if it is multicellular.  And I beleive you save everything, including all memloc values, energy and stuff.  For multibots you also save the relative positions of all bots in the organism.
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
5 Questions re DB opns
« Reply #4 on: March 24, 2005, 05:08:45 PM »
Quote
5. So after the 20-cycle period, if the birth tie is still there, the transfer will take place one location per cycle? I thought DB disolved the tie automatically at 20 cycles, no?

No you got that wrong.

Birth ties last 100 cycles.
Ties that robots attach themselves remain soft and pliable for 20 cycles before hardening.

 :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
5 Questions re DB opns
« Reply #5 on: March 24, 2005, 05:21:08 PM »
I don't know why you're console help isn't working.

Here's what it says:

Quote
This console works as an input/output interface for a single robot.
It could be used for robot debugging and manipulation.
One of the most useful features of the r.c. is that it shows
which parts of the dna are executed in each cycle. Just press the single
cycle button to try. To watch the entire dna, just click the button at
the extreme right in the console.

Other commands are:
printeye : prints the eye cells status
printtouch : prints the touch cells status
printtaste : prints the taste (hit) cells status
printmem (or ?) (.var|n): prints value of .var or location n
set (.var|n) value : stores value in variable .var or location n
energy e : sets the robot's energy at e
cycle n : executes n cycles
execrob : executes all robots without doing a cycle
showdna : brings up the robot details window showing the robot's dna

Are you typing it into the command line?

Here's what it looks like:

___________________________
|.............................................|
|.............................................|
|....DON't TYPE HERE................|
|.............................................|
|.............................................|
|.............................................|
|__________________________|
|......TYPE HERE........................|
___________________________
« Last Edit: March 24, 2005, 05:21:19 PM by Numsgil »

Offline AZPaul

  • Bot Builder
  • **
  • Posts: 76
    • View Profile
5 Questions re DB opns
« Reply #6 on: March 25, 2005, 02:30:51 AM »
Nums, PY, shvars,

Excellent, Gents. Excellent indeed.

One outstanding:  Best bot -- when multiple bots have the same # kids what criteria does the program use to select which one for autosave? The red one? Something with "42" in it since 42 is the answer to...well, you know.

As for the remainder:

Got it all. Everything is copacetic. I have seen the error of my ways. I am armed with copious correct information. I go forth now knowing that the true answers are mine. I am content.

For the moment.

Thanks, all, again.

-P

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
5 Questions re DB opns
« Reply #7 on: March 25, 2005, 08:48:27 AM »
The best bot issue has been raised a number of times before. It is really a big problem for us to actually figure out who the best bot really is.

There are chunks of code in the program that are made to find things like oldest survivor, most offspring, most health and a whole bunch of others. the trouble is that they are not linked to anything.

It may be an idea at some point to add a list of options to the menu so that you can specify which kind of best you actually want.

To be quite honest it isn't an area of the code that has received a great deal of attention. I have no idea what haopens in your scenario but I guess I can find out and let you know.

 :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 shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
5 Questions re DB opns
« Reply #8 on: March 25, 2005, 10:20:56 AM »
The only reasonable way to find the best bot is to look at the frquency of different genotypes.  The one most frequent is the best.  In case you don't know: The snapshot feature that PY made together with the excel sorting utility do the trick nicely.
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline Old Henk

  • Bot Destroyer
  • ***
  • Posts: 229
    • View Profile
5 Questions re DB opns
« Reply #9 on: March 25, 2005, 11:27:32 AM »
Quote
4.  No idea.  I just copy and paste DNA from the console to a text file.
You can also right-click a bot, and select "Save Robot DNA as".
This way, those "----------1, ----------2" lines aren't there.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
5 Questions re DB opns
« Reply #10 on: March 25, 2005, 11:32:19 AM »
Shvartz: "excel sorting utility "

Shvartz , Witch virsion of excel you have? , Were is it?, I like to try this one...


P.S.
I think corrently the best bot looks at the robot with the most offspring, for my evo. sims I did resently it worked very well...
« Last Edit: March 25, 2005, 11:34:31 AM by Botsareus »

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
5 Questions re DB opns
« Reply #11 on: March 25, 2005, 12:05:59 PM »
The file is right here: http://utenti.lycos.it/darwinbots/snapshot.xls

I have Office 2003, but I am pretty sure it works in Office 2000 as well.  Don't know about earlier versions.

Choosing a bot with the most off-spring is a pretty good approximation for the most frequent genotype, unless there is something wrong with it's reproduction strategy (for example it can have a messed-up repro gene, which causes it to reproduce frequently, but give tiny amounts of energy to it's babies).
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
5 Questions re DB opns
« Reply #12 on: March 25, 2005, 12:33:46 PM »
But then I think it works on surviving decendents rather than total offspring so that filters out dodgy repro genes after a while.
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
5 Questions re DB opns
« Reply #13 on: March 25, 2005, 12:37:47 PM »
Good Point PY

Ok , thx shvartz
« Last Edit: March 25, 2005, 12:39:36 PM by Botsareus »

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
5 Questions re DB opns
« Reply #14 on: March 25, 2005, 12:42:07 PM »
Quote
I have Office 2003, but I am pretty sure it works in Office 2000 as well. Don't know about earlier versions.

Should work on pretty much any version. I wrote it in excel 2000 but there is nothing Earth shatteringly complex about the macros.
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D