Author Topic: A point on movement in Darwin Bots  (Read 11840 times)

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
A point on movement in Darwin Bots
« Reply #15 on: March 15, 2005, 08:46:13 AM »
Could work but you have to include the threshold check at some point otherwise you get diffusion from low to high sometimes.

 :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
A point on movement in Darwin Bots
« Reply #16 on: March 15, 2005, 10:39:10 AM »
How?  Could you explain?
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
A point on movement in Darwin Bots
« Reply #17 on: March 15, 2005, 11:57:52 AM »
In my code above, a particular cell only accepts "bleeding" from an adjacent cell if the value in the adjacent cell is greater than its own. This may or may not save on computing since it requires conditional statements.

In my code I can easily adjust the threshold (cell value difference) so that nothing happens when the two are almost the same or so that nothing happens when they are 10 apart or 100 or whatever. I normally set it to about 2 or 3. This way the e-grid tends to even out a lot better than if a cell grabs a percentage of the value from all surrounding cells regardless of values in them.

Make sense or am I still not explaining it well enough?

 :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
A point on movement in Darwin Bots
« Reply #18 on: March 15, 2005, 12:08:15 PM »
You're basically checking the direction of osmosis.  You don't want to go from low concentration areas to high concentration areas.

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
A point on movement in Darwin Bots
« Reply #19 on: March 15, 2005, 12:51:38 PM »
I don't think it will.  I just don't see how.  If stuff moves in both directions, then by definition more will move from higher concentrations than from lower.

Say you have two cells, A with 300 of something and B with 30 of something.  When one third moves in both directions you get:
30 moves from A to B
3 moves from B to A

Final result:
A: 300-30+3=273
B: 30-3+30=57

If you start with both cells having 30, then it will be:
A: 30-3+3=30
B: 30-3+3=30

So it works.  No nead for threshold conditions.  Am I missing something?

Whether computationally it will be better to exclude from calculations cells with similar values, that I don't know.  You are programmers, you figure it out.
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
A point on movement in Darwin Bots
« Reply #20 on: March 15, 2005, 02:14:13 PM »
Actually you are right. Your idea won't allow stuff to travel from low to high.

The only real problem with it is that it moves too much in one go. Within 10 cycles everything is homogenized pretty well.

My present system only allows a cell to lose 1 point in each of four directions so the rate of osmosis is limited. I deliberately did it this way so that places like black smokers where Sulfer is extremely high will not disipate into the rest of the sim too quickly. Otherwise there really won't ever be any areas of high and low concentrations. Without this difference we might as well not have an e-grid at all.

 :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
A point on movement in Darwin Bots
« Reply #21 on: March 15, 2005, 02:18:27 PM »
What we need is a checkbox in the options screen for the speed of diffusion from cell to cell.

When in doubt, make it an option!  :boing:

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
A point on movement in Darwin Bots
« Reply #22 on: March 15, 2005, 02:30:20 PM »
Yep, 1/3 was just an example.  The real speed would depend on how you view DB - whether it happens in water/air/ground and whether bots are tiny/medium/large.

As for moving only one point per cycle - the speed should depend on the "difference" in concentrations.
« Last Edit: March 15, 2005, 02:31:18 PM by shvarz »
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
A point on movement in Darwin Bots
« Reply #23 on: March 15, 2005, 05:26:35 PM »
It is all built with reference variables so that it can be adjusted from options eventually. That has always been my intention. So far I have connected it through but it will be easy enough to do so when I get around to it.

The difference threshold and the rate of diffusion will both be adjustable.

Maybe the rate can be dependant on the difference. Doesn't matter much either way except that the rate does need to be very low if we want any kind of environmental niches to form.

 :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
A point on movement in Darwin Bots
« Reply #24 on: March 15, 2005, 06:29:47 PM »
One thing that we absolutely must have to get niches is bigger sims (what this thread started off) - bots should not be able to go from one side of the screen to the other.  And that ties in with diffusion.  If bots can cross the screen, then diffusion should be able to go over the whole screen fairly quickly too.  Just some numbers to put this in perspective: the size of E.coli is ~ 5 micrometers.  Which means that to get a niche of 5 millimeters wide we need a part of the screen to be 1000-fold larger than the size of a bot. And diffusion would go over that distance quite quickly...
"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
A point on movement in Darwin Bots
« Reply #25 on: March 15, 2005, 08:12:47 PM »
First of all when I seen the vb code PY posted I sayed "wow nice"

***
Quote
In fact, I think that the next challenge will be making a bot that can actually remember things, and pass such knowledge off to children, to the point where in mere generations, the species will have mapped out the entire field.

A.G.P. check this out http://s9.invisionfree.com/DarwinBots_Foru...p?showtopic=146
read the first post about "lessbeef" bot. , ( good idea a.g.p.)

***
PY, the only way to awoid going from intagers to longs for .xpos and .ypos is to have them as arrays (like everything in the Processor brakes into bytes 0,1,0,1, = 5)
Then have somthing like .getposerraylen so the bot will know how mutch intagers its working with just to get .xpos or .ypos
« Last Edit: March 16, 2005, 12:06:10 PM by Botsareus »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
A point on movement in Darwin Bots
« Reply #26 on: March 15, 2005, 11:59:24 PM »
...or actually change the entire memory array into longs.

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
A point on movement in Darwin Bots
« Reply #27 on: March 16, 2005, 09:23:25 AM »
Occams razor applies here I think. (well probably it wasn't intended this way but what the heck)

If you can fix something in a simpe way than why mess about with complex stuff.

Changing all variables from integer to long isn't that difficult and it might even speed up the program since we can lose a lot of limits which at present are set to 32000 only because that is all an integer can handle. It is also quite possible that windows (a 32 bit environment) could well process long variables more efficiently and quicker than integers.

I did a few experiments with running robot memories as longs. It took about 10 minutes to convert and ran just as quick as it does now. The only reason I temporarily abandoned it was because I didn't have time to update every single subroutine that demands an integer input from the call. That would take a couple hours or more.

Bots, that sounds like a scaling system which although it wil work in theory, will cause a shit-load of grief at much larger screen sizes for robots like Ant-Bots who need a precise destination to return to the queen.

As I explained before, in a sim at size 1000 (1000 times bigger than standard), the coordinates would run from 0 to 9,000,000 along the x axis. If we use a scale factor of 1000 to keep the .xpos variable at 9000 then it will eventually become difficult for the ant to find its queen. When the robot is at position x=9,000,000 it will actually have more than 10 robot-widths at that loaction. It may never find the queen at all.

However with longs, it is trivial to return a value of 9,000,000 to .xpos.

 :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
A point on movement in Darwin Bots
« Reply #28 on: March 16, 2005, 09:46:12 AM »
The only possible problem is that it complicates the already increadibly painful mutations system.  If you have a value of 9000000 in a memory location, it could make some really crazy mutations.  If we can keep all the memory locations at about the same range I think mutations would run easier.

I still like my idea of returning the Egrid location.  I'll have to play with it a bit when I have the chance.

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
A point on movement in Darwin Bots
« Reply #29 on: March 16, 2005, 10:13:51 AM »
Returning the e-grid location has a number of benefits and a number of pitfalls too.

I know I keep on about the ant-bots but it does bring home a point. It is absolutely essential for an anaimal to be able to return to the exact same location that it was born.

Salmon go to the same river. Sea turtle go to the same beach. Ants go back to their nest.

Using the e-grid system would allow for almost infinite size playing fields but anything over about size 20 would screw up homing instincts. The queen ant is pretty big so you would only need to return to a position within a couple of hundred twips of it but it will soon become impossible to find her at large sizes.

 :D  PY  :D
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D