Author Topic: You can double click on Teleporters...  (Read 1984 times)

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
You can double click on Teleporters...
« on: October 27, 2006, 04:38:33 PM »
I'll wire up right click one of these days but for now if you want to change a teleporter's properties or see how many bots it's teleported, double click it.
Many beers....

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
You can double click on Teleporters...
« Reply #1 on: October 27, 2006, 06:17:47 PM »
While we are on topic of teleporters...

Could you clarify quickly how those would work if targeted to the same folder by the same program:

The outbound teleporters save any bot that they encounter into a folder.

The inbound teleporter brings the bot from this folder, but when?  Immediately, after certain period of time or when some event happens?  Does it leave a copy in the folder or when bot is copied into a sim the file is deleted?

I could probabloy figure it out myslef, but I have not touched DB for a while.  I am thinking about starting a sim with fairly small size/small number of bots, but have teleporters save a bunch of bots and load copies from time to time.  Basically, I want to have a small sim with a large population size.  Is that possible?
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
You can double click on Teleporters...
« Reply #2 on: October 27, 2006, 07:48:58 PM »
Right now, inbound teleporters check every cycle for bots in the inbound directory and bring in a max of 10 bots per cycle per teleporter.  I could probably save some file I/O and get some perf improvements by checking only every N cycles, but right now it's every cycle.

Inbound teleporters delete the bot file in the inbound directory after the bot has suceessfuly been introduced to the sim.  Note that there is a delay between those two events so it is possible to have bot duplications if you have more than one teleporter reading from the same directory (the two inbound teleporters would have to be in different sims, either on the same machine or on different machines since VB is single threaded and thus serializes teleporters in the same sim).  Both could open and read a bot file before either deletes it.  In such cases I just fail the second delete attempt silently as I do several other strange file access race issues but while dups are possible, I'm almost certain it's impossible for a bot to get lost during teleportation unless DB crashes.

It's possbile to use teleporters to save off bots that never get reloaded of course - kind of a poor man's bot archive - just don't have an inbound teleporter point at that directory.  But right now there isn't a way to change the inbound rate or the number brought in per cycle so what you want to do won't work at present unless you manually create and delete the inbound teleporter every so often or change it to intrasim for awhile or something like that.  But having control over the inbound rate is a cool feature that could help perf too, so I will add it shortly and drop a buddy in a day or two.

You can sort of do what you want today by using two teleporter connected sims, one really big with lots of bots that runs slow and a small one that runs fast.  Playing with different costs in each, maybe put a whole bunch of shapes in the big one to limit bot interactions... can result in some really different worlds...  

Note that if bot files build up in the folder, the order they will be teleported in is based on the ordering of the dir command.  Bots of the same species (same original bot file txt file name) from the same sim will be brought in FIFO I think, but bots from different sims or of different species names will be bunched together alphabeticaly I think.

Note also that teleporting a whole bunch of bots into a sim all at once can swamp the sim and spike CostX, giving you population explosions and discontinious cost events....
Many beers....

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
You can double click on Teleporters...
« Reply #3 on: October 27, 2006, 08:03:29 PM »
I should point out that I did things this way to keep it simple for now.  Any file server can be used as a teleporter share point and sharing on a LAN does not require a special server process, special locking files, special directory structure, etc.   Just wanted to keep it simple for now.

Advanced features like not teleporting bots into the sim from which they were just teleported out, guarenteeing that bots don't get duped and so on is for future work.

I have a vision of using the teleporter paradym to let us all share one big virtual connected sim over the internet, allowing for a real-time, running all the time bot league of connected machines running on everyone's desktops with automatically updated web pages for current overall population statistics by species and author, etc.  This is why I'm working towards making DB a screen saver for example - so we can all use everyone elses cycles at night.  The whole package will probably take me a while, but teleporters are a start...
Many beers....

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7713
    • View Profile
You can double click on Teleporters...
« Reply #4 on: October 27, 2006, 11:28:02 PM »
I'd like the same thing, I think it would be neat.  We have alot of spare MySQL databases we could use for this sort of thing on the server, but I never could figure out how to interface an application with the internet in this way.

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
You can double click on Teleporters...
« Reply #5 on: October 28, 2006, 03:55:52 PM »
Hmm, OK.  

Adjusting rates of input and output would be nice and would save some CPU resourses.  It might also be handy to have a "target number" for stored bots, since if you have only rates then the number of saved files may grow very large.
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline Henk

  • Bot Destroyer
  • ***
  • Posts: 110
    • View Profile
    • http://www.henkx.net
You can double click on Teleporters...
« Reply #6 on: October 29, 2006, 05:41:40 AM »
Could an 'Teleport bots' option be added to the teleporter menu so we could create veg-only or corpse-only teleporters?
cond
*.DBbugs 0 =
start
.rejoice inc
stop

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
You can double click on Teleporters...
« Reply #7 on: October 29, 2006, 06:54:03 PM »
Quote from: Henk
Could an 'Teleport bots' option be added to the teleporter menu so we could create veg-only or corpse-only teleporters?
Done.  In 2.42.9, I've added an explicit 'Teleport Heterotrophs' option.  Unchecking this causes the teleporter to ignore heterotrophs.  This combined the the existing 'Teleport Autotrophs' and 'Teleport Corpses' checkboxes should give you the flexability to do what you are asking.
Many beers....

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
You can double click on Teleporters...
« Reply #8 on: October 30, 2006, 02:35:00 PM »
Quote from: shvarz
Adjusting rates of input and output would be nice and would save some CPU resourses.  It might also be handy to have a "target number" for stored bots, since if you have only rates then the number of saved files may grow very large.

FYI, 2.42.8d now has inbound teleporter throttling.

When I have time, I plan to add an outbound backpressure feature so that outbound teleportation will cease if the number of files in the outbound directory exceeds a threshold.
Many beers....

Offline Henk

  • Bot Destroyer
  • ***
  • Posts: 110
    • View Profile
    • http://www.henkx.net
You can double click on Teleporters...
« Reply #9 on: October 31, 2006, 02:39:15 AM »
Quote from: EricL
Done.  In 2.42.9, I've added an explicit 'Teleport Heterotrophs' option.  Unchecking this causes the teleporter to ignore heterotrophs.  This combined the the existing 'Teleport Autotrophs' and 'Teleport Corpses' checkboxes should give you the flexability to do what you are asking.

Thx  
cond
*.DBbugs 0 =
start
.rejoice inc
stop