Author Topic: Simulation tools Part 2  (Read 7728 times)

Offline AZPaul

  • Bot Builder
  • **
  • Posts: 76
    • View Profile
Simulation tools Part 2
« on: April 20, 2005, 03:03:47 PM »
It's my own *^%# fault. I just assumed. Almost a religious zeal of surity.

I've gotten around the issue of .sexrepro and have a basic sim with just the right veggie count, energy count, bot count, field size, working DNA, does what I want in the way I want it done. I can run a million cycles maintaining a stable population under selection pressures with no halts, crashes, finger pokin' repopulates. No messiness. I'm ready.

Then reality hits. Bummer.

Hypothesis

Certain sexual selection criteria will inevitably lead to "runaway" overexpression of those attributes upon which the criteria are based. Bird tail length being the attribute in my sims.

Female selection of mates based upon the males tail length is set within a certain range. Not too big, not too short. Random shifts in available males together with random shifts in female preferences would seem to produce a random mix of population over the generations.

Except:

There is a restraining wall to the left side of the curve. You cannot have negative tail length. There is only one direction for the "random" shifts to populate over time and that is to the right side of the curve (larger length/preference). Over generations, therefore, the base average tail length will move right (get bigger). Then, with female preference for longer tails and more males with longer tails, the selection scope becomes a self-enforcing cycle and will, in theory, lead to explosive growth in even longer female preference and male tail length.

This is an experiment to test the hypothesis. As you well know, in experiment you strictly control all variables except the ones you wish to test. DBII mutation control is too varied. It turnes ".tail_length" into ".mkvirus" or memloc "981" into ".up" or "*.sex 1 =" into "*.repro 1 =" and so on. You end up with females mating with females and androgenes creatures mating with everyone, including veggies.  Not very realistic in this instance.

Through the free memory values I can "simulate" mutations of my test variables more closely and more realistically.

I had assumed snapshot would give the bots DNA and memory values. I could then import to Excel and manipulate the data. Wrong!

I can't get to the data!  I refuse to go through one bot at a time recording memory values from the console for 600 bots.

May I have access to Bot memory, please? Preferably from within a .txt file like Snapshot? Please?

-P

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Simulation tools Part 2
« Reply #1 on: April 20, 2005, 03:13:39 PM »
Quote
May I have access to Bot memory, please? Preferably from within a .txt file like Snapshot? Please?

Now that is one of the most well thought out requests for a long time.  B)

Shouldn't be too hard. I will see what I can do.
« Last Edit: April 20, 2005, 03:15:11 PM by PurpleYouko »
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Simulation tools Part 2
« Reply #2 on: April 20, 2005, 03:29:26 PM »
OK I thought aboput it a bit and came up with a bit of a problem with using memory values in Excel.

Excel can only have a maximum of 256 columns so it becomes a little tricky to upload 1000 memlocs for each bot. For one thing, you couldn't use the regular method of opening the file or else you will get memlocs wrapping around onto different lines all over the place and making a right old mess.

This will take a bit more thought than I thought, I think  :wacko:
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
Simulation tools Part 2
« Reply #3 on: April 20, 2005, 03:49:06 PM »
It also seems that an idea I had way back in January might be of use here if well implemented.

I had considered adding NOTMUTABLE/MUTABLE sections to the DNA.  Mutations could be turned on or off in different sections of the DNA to allow you to strictly monitor and control where mutations may occur, for experiments like you describe.

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
Simulation tools Part 2
« Reply #4 on: April 20, 2005, 04:27:44 PM »
Yes, I think Nums' idea would actually help AZ a lot more than the "memory snapshot".
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Simulation tools Part 2
« Reply #5 on: April 20, 2005, 05:05:21 PM »
Instead of making it "cama dilaighted(for lack of good spelling)"

Make it chr(13) & chr(10) dilaighted and desplay it using notepad.

If you still hung up on exsel no problem there:

Whats the proper format over there to get rows instead of columns, the ammount of rows should be alomst infinate, ( I think its also chr(13) & chr(10)  not sure)

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Simulation tools Part 2
« Reply #6 on: April 20, 2005, 05:18:58 PM »
It's "comma deliminated" (more or less, that may be misspelled too).

I think I read in the old forum that PY tried rows too, and there was something wrong with that.

I'd recommend making each 10 or so memory locations its own field.  Play around with formatting, I'm sure you can figure out something, PY.

Offline AZPaul

  • Bot Builder
  • **
  • Posts: 76
    • View Profile
Simulation tools Part 2
« Reply #7 on: April 21, 2005, 02:02:09 AM »
Quote
Excel can only have a maximum of 256 columns so it becomes a little tricky to upload 1000 memlocs for each bot. For one thing, you couldn't use the regular method of opening the file or else you will get memlocs wrapping around onto different lines all over the place and making a right old mess.

This will take a bit more thought than I thought, I think

That would indeed be a mess, but please don't let that get in the way.  I've already started writing a small utility to contract a .txt to a usable form for Excel. All I need is the raw data. Nothing fancy.

botID1,botName,mem1,mem2,mem3,...,mem999,end
botID2,botName,mem1,mem2,mem3,...,mem999,end
.
.
.
botIDn,botName,mem1,mem2,mem3,...,mem999,end

Include veggies if it's easier. I can throw those away in processing. I can take all "Alpha" (from botName), pull the memory locations I want and write them to another file.

I know this is a "one off" type of request.  And, yes, I realize that we are talking about a file in excess of 2 meg for the typical sim (you will not want to add this to the present "Snapshot").  Not many will ever use this capability. Please don't go through a lot of headache with options, includes, excludes and the like.  Just a raw, here it is, do what you want, now go away, kinda file.

As always, I appreciate the effort.

Thanks all.

-P

Oooh, Hey! I got stars! Wow! Maybe I'm spending too much time here?  :clap:
« Last Edit: April 21, 2005, 02:04:24 AM by AZPaul »

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Simulation tools Part 2
« Reply #8 on: April 21, 2005, 09:10:08 AM »
Quote
Oooh, Hey! I got stars! Wow! Maybe I'm spending too much time here? 

Wait till you get 5 or 6 of them and then tell us you are spending too much time here.
This place gets addictive.  :rolleyes:

I can easily enough get you a file with all the memlocs in it and I don't think it will be quite as big as you think, particularly as it will be saved as a text file.

I plan to add it to the end of the snapshot function as a extra option.

eg.

"Snapshot successfully saved. Would you like to save a memory snapshot too?" yes/no

I was also planning to save it sideways such that the robot ID would go along the top and the memory locations would go down the side. Figured it would be easier to do this way and I could also split the robots into groups of 256 to prevent wrapping around in Excel

Let me know what format would be the best for you though.
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline AZPaul

  • Bot Builder
  • **
  • Posts: 76
    • View Profile
Simulation tools Part 2
« Reply #9 on: April 22, 2005, 03:46:44 PM »
Quote
Wait till you get 5 or 6 of them and then tell us you are spending too much time here.
This place gets addictive.

I have experienced that.

Quote
I can easily enough get you a file with all the memlocs in it and I don't think it will be quite as big as you think, particularly as it will be saved as a text file.

No way around the numbers. 1000 mem locations x 1000 bots for raw data then double for comma delimited. 2 meg.+

Quote
I was also planning to save it sideways such that the robot ID would go along the top and the memory locations would go down the side. Figured it would be easier to do this way and I could also split the robots into groups of 256 to prevent wrapping around in Excel

Let me know what format would be the best for you though.

Straight forward flat file:

botID1,botName,mem1,mem2,mem3,...,mem999,end
botID2,botName,mem1,mem2,mem3,...,mem999,end
.
.
.
botIDn,botName,mem1,mem2,mem3,...,mem999,end

I've already built the utility to crunch it down to the data I will need and import properly into Excel.  All I need do is recode one handle for the specific format of the file you provide and I can be in staticstical heven.

Just think of it! The data! The charts! The graphs! Means, medians, modes, standard deviations! Ohhh I get all bubbly!  God help me I do love it so!

I gotta get out more.

And PY, what happened to your Avatar? A white box with a little red x? Have you gone sans avatrea? A political statement perhaps? A protest of the ever growing reach of the New World Order? Early onset senility? Is there great cosmic meaning to this sudden turn in the way you want the world to see you, or actually, not see you?

I do need to get out more.
« Last Edit: April 22, 2005, 04:06:40 PM by AZPaul »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Simulation tools Part 2
« Reply #10 on: April 22, 2005, 03:56:27 PM »
Perhaps you should just select a range of memlocs you're interested in?

Select memory snapshot.  A menu pops up.  You input the range of memory you're interested in.  Maybe like the print menu in windows.

ie: like this:
2,5,9-12,15

then all robots' 2,5,9,10,11,12,15 memory locations are put into a file.  That way the file stays managable in size, and you get only what you're interested in anyway.

Offline AZPaul

  • Bot Builder
  • **
  • Posts: 76
    • View Profile
Simulation tools Part 2
« Reply #11 on: April 22, 2005, 04:09:20 PM »
Quote
Perhaps you should just select a range of memlocs you're interested in?

Select memory snapshot. A menu pops up. You input the range of memory you're interested in. Maybe like the print menu in windows.

ie: like this:
2,5,9-12,15

then all robots' 2,5,9,10,11,12,15 memory locations are put into a file. That way the file stays managable in size, and you get only what you're interested in anyway.

SOLD!

When can I have it?

Is Tuesday OK?

-P

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Simulation tools Part 2
« Reply #12 on: April 22, 2005, 04:10:30 PM »
Actually this wouldn't be too hard to set up, since the snapshot function is already there.  You just have to modify a few things.  I can look at it tonight even (unless I have something more fun to do :P).