Darwinbots Forum

Code center => Suggestions => Old Suggestions Awaiting Programming => Topic started by: Shen on April 08, 2005, 10:53:34 AM

Title: Offline FTP thingy
Post by: Shen on April 08, 2005, 10:53:34 AM
Id like to suggest an option that saves and introduces random bots to/from your own HD similar to the FTP internet sharing except offline and more reliable :)

 IMO very useful for Evolution sims and should be fairly easy to implement since half the stuff needed is already availiable from the Net sharing.
Title: Offline FTP thingy
Post by: PurpleYouko on April 08, 2005, 11:33:29 AM
I think you could actually do this now with the existing internet sharing system. Just set the server address to your own PC and it will share files internally. Then you can manually mess around with the files in the specified folder if you like.
Title: Offline FTP thingy
Post by: Shen on April 11, 2005, 05:57:31 PM
IIRC I did figure out how to do it but its well complex, as well as requiring you to have an active net connection and an FTP server on your own computer so that you connect to yourself. All in all to much trouble to sort out.

Would it be possible to look into this or is it to much work for little reward? Personally I think that opening up the ecosystem up like this would do wonders.
Title: Offline FTP thingy
Post by: Carlo on April 11, 2005, 06:16:18 PM
No, you shouldn't need an active connection, just a simple ftp server (I used to run cerberus ftp, try it). When you're not connected to the internet, your address is 127.0.0.1
Anyway, adding the ability to use a local dir would be useful and simple.

Also, I figured out a new way to implement a good internet sharing server. I've been learning php and mysql in the last months, so this is how I would do it now:

DB should pretend to be a web browser, that is, it should communicate with a web server sending http headers and messages (not difficoult to do)
The server would be the web server of darwinbots.com.
DB would talk to the server to require a robot or to request saving of a robot; every request to save something should carry a security code (for example, a hash of the robot dna) to discourage intrusions and misuse.
On the server side, all requestes would be processed by a php script, retrieving and saving robots to a mysql database.

The system would be much more flexible than it is now, allowing a centralized management of the server files, separate groups for each kind of sim, and so on. I could write the php/mysql server part, if someone wants to write the client code.
I definitely think that a good sharing feature should be present in any major future release of DarwinBots.
Title: Offline FTP thingy
Post by: Numsgil on April 11, 2005, 06:27:37 PM
I had a similar idea Carlo but I had no idea how to implement it.  If you could set up such a system, my webspace at darwinbots.com does indeed have a MySQL thingy.
Title: Offline FTP thingy
Post by: Carlo on April 11, 2005, 06:37:58 PM
Well, I should have no problem both with the server part (php and mysql) and with the client part. But I'd be happy to leave this one to you (but I can give you some advice if you need it)
Title: Offline FTP thingy
Post by: Shen on April 11, 2005, 06:46:15 PM
Ive tried out Cerberus FTP, its pretty good. The main problem I had was that when it tried to up/download bot it would fail sometimes and the sim would pause while it waited for the transfer to complete, which of course it never would. It might have been a problem with my setup but obviously a reliable webhost or offline mode would be much better.

There might be a problem with unwanted bots online though, IIRC someone released a load of F1 bots onto the FTP last time a public one was up and of course they destroyed any evo sim being run. How would you sort out the right bots for the right sims?
Title: Offline FTP thingy
Post by: Carlo on April 11, 2005, 07:22:09 PM
Quote
There might be a problem with unwanted bots online though, IIRC someone released a load of F1 bots onto the FTP last time a public one was up and of course they destroyed any evo sim being run. How would you sort out the right bots for the right sims?
My idea is that you should not be able to insert robots in some kinds of sim, just let the original ones evolve.
I see it this way: mr. Newbie downloads his copy of darwinbots3.0. Now he can do three different things: start a new simulation, load a saved sim, and, third, join a simulation on the internet. By choosing to join a simulation, a list of the available simulations is downloaded from the sever: by choosing one, DB downloads the environment, a bunch of robots, and starts simulating. In this type of sim, you cannot insert robots in the sim: you just don't have any control on it. (It would be great to make a screensaver version of it, should be easy.) So, who manages the server also decides which simulations are available, with which settings, which starting robots, and so on. He don't even has to include them in the client, because they are made available just through the server.

Somebody else likes the picture?
Title: Offline FTP thingy
Post by: Numsgil on April 11, 2005, 07:40:06 PM
Yep, I like it alot.  Network Programming isn't my forte.  I can learn it, but it would take a while.  Carlo, if you're willing to throw your hat back in the ring, so to speak, I think we'd all be happy.

If not, it'll have to wait in line with so many other good ideas.  Sigh, so much work to do.  :P
Title: Offline FTP thingy
Post by: PurpleYouko on April 11, 2005, 08:32:53 PM
I will second Numsgil on this. We would all love to have you back onboard both with some of the programming bits and with ideas and suggestions.
Online play would be really great.

I am lucky if I manage to get in a couple of hours a week for implementing my programming ideas.
Title: Offline FTP thingy
Post by: shvarz on April 11, 2005, 11:47:50 PM
That would be extremely useful and fun!
Do we have enough space on our web-site?  In order for it to do what we want it to do, it should be possible to have at least a thousand bots on the server.
Title: Offline FTP thingy
Post by: Numsgil on April 12, 2005, 12:45:04 AM
The server has 500 megs on it, so yeah, I think we have room.

An even cooler but more involved method would link a bunch of sims together so where one ends the other begins.

Like this:

Sim 1 <-> Sim 2 <-> Sim 3

When a bot leaves through the right side of sim 1, it enters into Sim2.  You get the idea.

The world to the bots' point of view would be continuous.  The different cycles/sec on different computers would be very interesting, especially with mutations involved.  I'm not sure the exact effect they'd have, but I think it'd be pretty cool.
Title: Offline FTP thingy
Post by: Endy on April 12, 2005, 02:09:32 AM
DB's response to Tierra Server. :D

Endy B)
Title: Offline FTP thingy
Post by: Shen on April 12, 2005, 06:37:40 AM
The idea im chasing here is effectivly an open ecosystem. With the constant introduction of old bots it would really help natural selection. For example, I ran a sim for  ~5 million cycles last night and saved a bunch of the robots and started a new sim with the mutants and the original bot. The original wiped the floor with them even though its very very basic.

If the original is introduced at intervals you effectively change the closed system of DB into a infinite world where bots can 'migrate' outside the sim and come back at any time. The upshot being that you would always have competition and the best bots would always survive. And if you had a limit on the number of bots saved on the server, the most successful bots would take over the server database by simply being more numerous and thus more likely to be selected for uploading.
Title: Offline FTP thingy
Post by: PurpleYouko on April 12, 2005, 09:16:45 AM
Quote
The idea im chasing here is effectivly an open ecosystem. With the constant introduction of old bots it would really help natural selection. For example, I ran a sim for  ~5 million cycles last night and saved a bunch of the robots and started a new sim with the mutants and the original bot. The original wiped the floor with them even though its very very basic.

If the original is introduced at intervals you effectively change the closed system of DB into a infinite world where bots can 'migrate' outside the sim and come back at any time. The upshot being that you would always have competition and the best bots would always survive. And if you had a limit on the number of bots saved on the server, the most successful bots would take over the server database by simply being more numerous and thus more likely to be selected for uploading.
The easiest way to achieve this will be to add it to the scripts. We just need to set it up to save a robot file at intervals (programable from scripts) then reintroduce either the original bot or one of the saved mutations at other intervals (again programmable from scripts)