Poll

Read the post, and decide which one?

Chloroplasts - Idea 1
Chloroplasts - Idea 2
".setveg"
None of them

Author Topic: Chloroplasts  (Read 28579 times)

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Re: Chloroplasts
« Reply #75 on: November 28, 2010, 04:20:11 PM »
You'll still have to wait for Shasta. :p

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Re: Chloroplasts
« Reply #76 on: November 29, 2010, 12:42:00 AM »
I'm not super keen on adding more checkboxes...  The program is pretty obtuse to use as is.

Bots, can you think of a specific reason why you wouldn't want chloroplasts?  They would seem to be transparent to bots that don't look for it, except in cases where bots have special logic for the body size of veggies or things along those lines.

Offline Shasta

  • Administrator
  • Bot Destroyer
  • *****
  • Posts: 231
    • View Profile
Re: Chloroplasts
« Reply #77 on: November 29, 2010, 03:58:08 PM »
I'm also not a big fan of having both the new chloroplasts and the old veges at the same time. Darwinbots is a complex program, and having a toggle between two different energy sources for the simulation will make it much more so. Even your picture there: "Use Chloroplasts" and "Vegetable (autotroph)" is very confusing to someone who hasn't used the program before.

I'm also not too sure on what you are talking about with the leagues. F1 has always been the "Everything goes" league. Chloroplasts make the bot huge and slow; if someone programs around that I see to reason to bar it. If I work on anything in DB2 after this set of changes is done, it will probably be to fix the tournaments and get some kind of auto-running league going on my desktop.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: Chloroplasts
« Reply #78 on: November 29, 2010, 04:19:42 PM »
The reason I want the "veg" option still there is bc It will not work right for F1 mode. There simply won't be any way to set the alga as vegs;
Also, lets say I reprogram the alga, how then do I make findbest not search it w/o more special options?!

I already started implementation:

I decided to avoid putting a respawn per spisies. The eco-system should balance itself out without any artificial respawning.

Here we go, If I missed anything let me know.

Faze1: Intergrate the blnUseChloroplasts variable

Added blnUseChloroplasts to "Type datispecie"

  Veg As Boolean
  blnUseChloroplasts As Boolean 'Flag added by Botsareus for Pandas Chloroplast mode.
  Fixed As Boolean

Added chk to options menu

Private Sub SpecVeg_Click() 'updated by Botsareus to use new UseChloroplasts flag
  If CurrSpec > -1 Then
    TmpOpts.Specie(CurrSpec).Veg = False
    If SpecVeg.value = 1 Then
        TmpOpts.Specie(CurrSpec).Veg = True
        TmpOpts.Specie(CurrSpec).blnUseChloroplasts = False
        chkUseChloroplasts.value = 0
    End If
  End If
End Sub

Private Sub chkUseChloroplasts_Click() 'added by Botsareus to use new UseChloroplasts flag
  If CurrSpec > -1 Then
    TmpOpts.Specie(CurrSpec).blnUseChloroplasts = False
    If chkUseChloroplasts.value = 1 Then
        TmpOpts.Specie(CurrSpec).blnUseChloroplasts = True
        TmpOpts.Specie(CurrSpec).Veg = False
        SpecVeg.value = 0
    End If
  End If
End Sub

added code to SpecList_Click()

  If TmpOpts.Specie(k).blnUseChloroplasts Then 'added by Botsareus to use new UseChloroplasts flag
    chkUseChloroplasts.value = 1
  Else
    chkUseChloroplasts.value = 0
  End If

Added code to save settings

    Write #1, TmpOpts.Specie(t).Veg
    Write #1, TmpOpts.Specie(t).blnUseChloroplasts 'updated by Botsareus to use new UseChloroplasts flag
    Write #1, TmpOpts.Specie(t).Fixed

Added code to  ReadSettFromFile

    Input #1, TmpOpts.Specie(t).Veg
    Input #1, TmpOpts.Specie(t).blnUseChloroplasts
    Input #1, TmpOpts.Specie(t).Fixed

Added code to load simulation

      If Not EOF(1) Then Get #1, , SimOpts.Specie(k).Veg
      If Not EOF(1) Then Get #1, , SimOpts.Specie(k).blnUseChloroplasts
    Next k

Added code to save simulation

      Put #1, , SimOpts.Specie(k).Veg
      Put #1, , SimOpts.Specie(k).blnUseChloroplasts
    Next k

« Last Edit: November 29, 2010, 04:23:37 PM by Botsareus »

Offline Shasta

  • Administrator
  • Bot Destroyer
  • *****
  • Posts: 231
    • View Profile
Re: Chloroplasts
« Reply #79 on: November 29, 2010, 04:38:34 PM »
Per-species respawn is already done and commited to SVN by Panda. (I have changed it a touch, but its pretty much the same)

The whole point of this update is that we don't have to explicitly state what is or is not a veggie. If they produce chloroplasts, they get energy. If they don't have chloroplasts, they don't get energy.

If you don't want find best to include autotrophs, just check to see if the bot has a chloroplast. It's not perfect, but it is close enough barring some kind of photoheterotroph.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: Chloroplasts
« Reply #80 on: November 29, 2010, 04:43:35 PM »
If you don't want find best to include autotrophs, just check to see if the bot has a chloroplast. It's not perfect, but it is close enough barring some kind of photoheterotroph.

Not good enough.

Ok planB then

I'll add  "find best do not search robots if there name begins with "alga*" as one of my "optional" changes...

I spent a good 20 minutes on this thing, sucks to be me...

BTW , whats the deal with respawning, and who is going to post the reprogrammed Alga_Minimalis??? I need my alga...(not literally I am not a cow)
« Last Edit: November 29, 2010, 04:45:59 PM by Botsareus »

Offline Shasta

  • Administrator
  • Bot Destroyer
  • *****
  • Posts: 231
    • View Profile
Re: Chloroplasts
« Reply #81 on: November 29, 2010, 04:53:00 PM »
Not good enough.
Why is this method not good enough? It will work for the vast majority of cases, and for when its not, throw in a check box to include bots with chloroplasts. Scanning based the robot name is very unreliable.

Quote
whats the deal with respawning
There is now a box on the speices tab that is the repopulation threshold. If that species gets below the number, more are spawned. (So 0 will disable it)

Quote
who is going to post the reprogrammed Alga_Minimalis?
I can post an example in a couple of hours, I have to run to class.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: Chloroplasts
« Reply #82 on: November 29, 2010, 05:02:00 PM »
Quote
throw in a check box to include bots with chloroplasts.

ok nice, but lets say the robots happen to mutate and use chloroplasts so when I "find best" the general population uses them, then what? Chances are only outcasts will not use a generally excepted mutation, outcasts are not good representation of the best robot. I know, I have been running this thing close to a year now , I might even add I am as good at shvartz at this now. btw where is shvartz, have not seen him in a while. Anyway,

Quote
Scanning based the robot name is very unreliable.

Well as long as no one adds weird named robots to my sim or renames them it should work splendid. Btw I just realized I will need to scan based on robot name anyway for one of my special optional changes, so now I really want to know why it is unreliable.  :huh:

Example as part of Public Sub UpdateBots() (I'll clean it up and make it as optional as possible):

'Need to do this first as NetForces can update bots later in the loop
  For t = 1 To MaxRobs
    If rob(t).exist Then
    If rob(t).FName = "bfb.txt" Then bfbcount = bfbcount + 1 'botschange countA
    If rob(t).FName = "mfb.txt" Then mfbcount = mfbcount + 1 'botschange countB
      If (rob(t).DisableDNA = False) Then EraseSenses t
      If numTeleporters > 0 Then CheckTeleporters t
    End If
  Next t
  'botschange unstable environment
  Dim unste As Double
  If bfbcount <= 4 Then
    unste = 0
  ElseIf mfbcount <= 4 Then
    unste = 1
  Else
    unste = (bfbcount - 3) / (mfbcount - 3)
  End If
   If unste > 1 Then unste = 1
    SimOpts.PhysBrown = unste * 50
  'botschange killfat safetyflux antyflux
    For t = 1 To MaxRobs
    If rob(t).exist Then
        If rob(t).FName = "mfb.txt" Then
            If rob(t).body > 2500 Then KillRobot t
            If (mfbcount - bfbcount) > 0 Then rob(t).nrg = rob(t).nrg - AntiHandycap / (50 ^ 3 / (mfbcount - bfbcount) ^ 3) 'antyflux
        End If
        If rob(t).FName = "bfb.txt" Then 'saftyflux is here
               If (bfbcount - mfbcount) > 0 Then rob(t).nrg = rob(t).nrg - Handycap / (50 ^ 3 / (bfbcount - mfbcount) ^ 3)
        End If
       
    End If
  Next t
 If bfbcount = 0 And Not bfbT Then
  bfbT = True
  MsgBox "WON"
      DisplayActivations = False
      Form1.Active = False
      Form1.SecTimer.Enabled = False
 End If
 If mfbcount = 0 And Not mfbT Then
  mfbT = True
  MsgBox "LOST"
 End If
  'botschange killfat end

Quote
If that species gets below the number, more are spawned


But what about all the funky settings like repopulation cool down period, or vegs per repopulation event? I need them all work the same they do in say 2.44.1 when you setup F1 mode ...

Here is one: Max vegs. How do I limit the maximum number of vegs now?

P.S.

I know you guys are really not that evil, but please do not change the source code specifically to make my changes impossible to implement.  :P
Thats how I fell right now  :blink:
« Last Edit: November 29, 2010, 05:59:54 PM by Botsareus »

Offline Billy

  • Bot Destroyer
  • ***
  • Posts: 175
    • View Profile
Re: Chloroplasts
« Reply #83 on: November 29, 2010, 06:00:20 PM »
How about this?

Instead of having a "Find Best" button, you could have a "Find Best Bot" button and a "Find Best Veg" button. That way, if a bot evolves to make chloroplasts, it becomes a veg, and everything which applies to another veg will also apply to it. You can use the "Find Best Veg" button to find your evolved plants. This isn't necessarily a bad thing. I think one of the most interesting things about adding chloroplasts would be the possible evolution from animal to plant. There could be a checkbox called "Disable chloroplast production" alongside "Make immune to viruses," "Disable voluntary movement", etc. for if you think it is a bad thing.
"I cannot persuade myself that a beneficent and omnipotent God would have designedly created parasitic wasps with the express intention of their feeding within the living bodies of Caterpillars."

-Charles Darwin

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: Chloroplasts
« Reply #84 on: November 30, 2010, 03:14:14 PM »
Chances are it is always going to be '"Find Best Veg". It is not a qustion of filtering out a veg. or not a veg.
Details:

I am actually running three species right now.
Alga set to veg that does not mutate.
"bfb" not set to veg that does not mutate.
"mfb" not set to veg that mutates-crazy.

When all of "bfb"  is dead I use findbest to find the best "mfb", but if vegs are treated just like non-vegs chances are the unmutated alga will be selected as "best."
I am beginning to worm up to the idea that my mfbs will end up using some Chloroplasts...

So, I think my approach is fine...

1.) The new issue here is the respawning:
 I need to know how to limit the max number of vegs.

Found something:
1) Set dynamic cost with the desired population
2) reduce the numbers of prey

 :tantrum: Never mind, this will not work either because dynamic cost is not set per species.
Any ideas?




1.)b.) how to tell the program how much vegs to repopulate with? Or better qustion: How will this be set?

 I was not a big fan of "cooldown period" so no need to worry about that one.

2.) moo! alga please moo!  :D
« Last Edit: November 30, 2010, 05:28:21 PM by Botsareus »

Offline Billy

  • Bot Destroyer
  • ***
  • Posts: 175
    • View Profile
Re: Chloroplasts
« Reply #85 on: November 30, 2010, 05:56:19 PM »
Differentiating between what has been veg from the start and what evolved into a veg will just make things complicated. Nothing should be "set as veg." Whether it is veg or not should depend on whether it has chloroplasts or not. Veg should not be treated just like non veg. Perhaps there should also be a "Find Best of This Species" button for situations like yours.
"I cannot persuade myself that a beneficent and omnipotent God would have designedly created parasitic wasps with the express intention of their feeding within the living bodies of Caterpillars."

-Charles Darwin

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Re: Chloroplasts
« Reply #86 on: November 30, 2010, 11:03:19 PM »
Quote
who is going to post the reprogrammed Alga_Minimalis?
I can post an example in a couple of hours, I have to run to class.

I don't think we need a new veg actually...

As I understand it, we still have the "veg feeding method", which defaults to like 20% of energy goes to body (or in the new version, chloroplasts).  That, combined with some way to set the initial 1000 body a bot gets to be the equivalent energy in chloroplasts should be all you need.

Offline Shasta

  • Administrator
  • Bot Destroyer
  • *****
  • Posts: 231
    • View Profile
Re: Chloroplasts
« Reply #87 on: November 30, 2010, 11:21:16 PM »
Right now the old version, (giving energy w/o chloroplasts) is completely gone.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Re: Chloroplasts
« Reply #88 on: December 01, 2010, 01:43:58 AM »
Right now the old version, (giving energy w/o chloroplasts) is completely gone.

That's fine, but the new system just mimics the old "feed veg per kilobody point" feeding method, right?

There's another slider below that in the options panel that controls how the veg gets fed.  It's a slider between body and nrg.  So for a purely realistic sim you might put that all the way to nrg, but if you want your old vegs to work you'd put the slider more towards body, so the vegs get fed 80% in nrg and 20% in body, for instance.

Just replace the body with chloroplast and you should have basically the same thing.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: Chloroplasts
« Reply #89 on: December 01, 2010, 05:07:51 PM »

1.) How do I limit the whole simulation not to have infinite energy? I guess "Set dynamic cost with the desired population" will work?

Quote
That, combined with some way to set the initial 1000 body a bot gets to be the equivalent energy in chloroplasts should be all you need. Just replace the body with chloroplast and you should have basically the same thing.

2.) We are doing:

Quote
I just mean rig up the options in the options panel to make sense with the new system.  So setting something as a veggie will give it chloroplasts instead of body when the simulation starts, but after that they can build body or chloroplasts as they want.

Am I right? If so, problem: if the above is NOT per species then I get my mobile robots behaving just like Alga...

I need the
Quote
put the slider more towards body

to be per species...

can we work that in, or am I missing something else here?

Quote
"Find Best of This Species" button
I like it. I guess we put a setting in settings for what species to search?
3.) How does a robot know what species it came from instead of searching by robot name?

« Last Edit: December 01, 2010, 05:47:59 PM by Botsareus »