Author Topic: Bot Spatial Ecology in DB  (Read 3116 times)

Offline coralcommando

  • Bot Neophyte
  • *
  • Posts: 2
    • View Profile
Bot Spatial Ecology in DB
« on: January 23, 2009, 02:56:31 PM »
Help!

Sorry if I've posted in the wrong area, please feel free to re-post this, or advise me where to re-post it to get help, but I am pretty new to DB.  I noticed that DB can output interesting things like Species Diversity and population numbers over time in a graphical output. Also when setting up a simulation you can vary some spatial aspects of the simulation environment using pond mode. For example have more light at the top than at the bottom, due to sedimentation and light attenuation. This spatial element can cause some interesting zonation in the veggie autotrophs and thus in the carnivores. What I'd really like to do is find a way to output some of this information into a graph format, musch like the diversity and population numbers. For example population per depth over time, density, number of neighbours, proximity to carnivores amongst other things.

So For example, in one simulation I found veggies at the bottom tended to be big and only in small colonies / few neighbours, but at the top they are smaller and grouped with far more neighbours - I'm trying to find a way to out put this in a graph, such as average number of neighbours (of same species) over time.

However I'm no programmer so I have no idea how to go about getting this information out of a DB simulation. I presume it must be possible some how, as its being represented graphically in the pixels and sprites that make up the bots, beautifully whizzing around the screen! So if anyone knows of a spatial analysis package or away to tweek DB to do these things, please could you post it here!

Thank you!

Offline Shasta

  • Administrator
  • Bot Destroyer
  • *****
  • Posts: 231
    • View Profile
Bot Spatial Ecology in DB
« Reply #1 on: January 24, 2009, 01:47:19 AM »
Welcome, you are in the right forum, things are pretty lax around here about where you post stuff, just try to get it in a related section.

Unfortunately, you can't output custom information into a graph/table. You are correct in that the data is there, but unless you want to write some code to collect it yourself, and compile a custom version, you are out of luck, sorry. You could always run it cycle by cycle and do it by hand though

Offline Moonfisher

  • Bot Overlord
  • ****
  • Posts: 592
    • View Profile
Bot Spatial Ecology in DB
« Reply #2 on: January 24, 2009, 09:27:44 AM »
You could write it as a sugestion for DB3...
The current version of DB is developed in VB6 and isn't very structured, and the guy who was focusing on developing new features for DB2 left recently.
So it's hard for others to take over since the code is a bit hard to figure out, with no documentation and litle or no structure or code standard.
So that feature won't eb available for DB2 unless you know soemone willing to make it.
It could be an idea for DB3 though, but you probably need to elaborate on exactly how you want the data collected.

Personaly I think it may be an idea to introduce a scripting language to allow people to collect data based on a simple script. This way it's not just one small feature for one specific purpose, but rather a feature allowing everyone to collect far more detailed data. And if people can't write the script themselves then someone else in here wuold probably be willing to do it as long as it's just a small simple script. (Changing the DB2 source however is a much larger task, especialy for those of us who don't know the source very well)

Offline coralcommando

  • Bot Neophyte
  • *
  • Posts: 2
    • View Profile
Bot Spatial Ecology in DB
« Reply #3 on: January 25, 2009, 09:10:10 AM »
Hey guys, thanks for getting back to me so quickly, and for your kind support. So I'm afraid I don't have a programming background, so how about one of these possible options:

1) Screen captures every few cycles as a sort of sampling strategy, then analyse the set of jpegs with an image analysis program / GIS such as used in remote sensing projects for looking at changes in vegetation index over time. As long as the bot colours were quite distincitive and seperate, each would have a different spectral signal and could be analysed over time with something like fourier analysis, as used in monitoring changes in forest strucuture with satellite pictures from Landsat and MODIS. However this would take quite a while, and seems the long way round.

2) Would it be possible to develop a C++ plugin for an earlier version of Darwinbot that is prior to the scripts and codes the other guy who just left put in? Would be a shame to lose all those other advanced features though.

3) Develop a C++ package that reads the pixel or bot positions on screen every cycle and compiles it into a coordinate x and y list in excel or some sort of a code / C++ way of short cutting point 1).

In the end I know it seems horrible to turn the cool and beautiful graphics output into a dull table of numbers and graphs, but it would be such a cool experiement and powerful tool to explore evolution and ecology mathmatically / statistically.

Any further ideas would be greatly appreciated!

Cheers!!!

CC

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Bot Spatial Ecology in DB
« Reply #4 on: January 25, 2009, 01:01:05 PM »
Interfacing C++ and VB is a huge pain, but possible.  However, if you're willing to do that there's probably an easier way by interfacing with the VB code.  All you really want is the positions of all the veggies/bots every few cycles.