Hello,
An introduction on my part would be the easiest way to start. My name is Zachary Tong and I'm an undergraduate biology major, ex-computer-science major. In my spare time I have been developing a biologically realistic, distributed brain evolution project. A fairly complex neural network controls a relatively simple "body", which interacts in a simulated environment. Its come to my attention recently that intelligence is as much a product of environment and interaction with other organisms as it is biologically encoded. This means I need an environment that can hold multiple organisms and allow them to interact in a semi-sophisticated manner. I was originally going to create this simulation environment myself. This not only adds a lot of work to my plate but will also be much less flexible than desired. I stumbled on Second Life, which caught my eye. It (and other virtual worlds) could provide the environment simulation I need. After looking into it, however, I feel it would be more trouble than its worth, trying to hack my project around their system. Croquet looks like a much more appealing option. I had some questions regarding feasibility however. I realize Croquet is young but these are the basic, fundamental requirements I would have: -Is it a persistent world? Can I set up a zone that is dedicated to the project and will persist even when people aren't there? Since Croquet is P2P, where would this reside? Would it be hosted on my server (I'm assuming this is the answer)? -Can external programs interact with Croquet? My project is a C++ project and I would hate to port it to Squeak. Furthermore, I'm not sure it could be ported (requires a local database, and requires an active connection to my server to upload/download genomes). Performance would be an issue as well, my project is very computationally intensive. -Can a single "user" command multiple "entities" in the environment? For instance, could a single client control multiple organisms in an environment? -Is there a way to script simple, persistent "bots" (would be used for vegetation)? Thanks for the help. Croquet looks exceptional and the open framework is a good thing to see after looking into SL. In case anyone is interested, here is my blog on my project: http://distributedneuron.net/blog/category/dneuron/ http://distributedneuron.net/blog/ Thanks again, -Zachary Tong |
Sounds like fun. Answers below, but they assume an introduction to
the core model of Croquet, which can be found at http:// opencroquet.org/index.php/The_Core_Model On Oct 25, 2007, at 12:17 AM, [hidden email] wrote: > Hello, > > An introduction on my part would be the easiest way to start. My > name is Zachary Tong and I'm an undergraduate biology major, ex- > computer-science major. In my spare time I have been developing a > biologically realistic, distributed brain evolution project. A > fairly complex neural network controls a relatively simple "body", > which interacts in a simulated environment. > > Its come to my attention recently that intelligence is as much a > product of environment and interaction with other organisms as it > is biologically encoded. This means I need an environment that can > hold multiple organisms and allow them to interact in a semi- > sophisticated manner. > > I was originally going to create this simulation environment > myself. This not only adds a lot of work to my plate but will also > be much less flexible than desired. I stumbled on Second Life, > which caught my eye. It (and other virtual worlds) could provide > the environment simulation I need. After looking into it, however, > I feel it would be more trouble than its worth, trying to hack my > project around their system. > > Croquet looks like a much more appealing option. I had some > questions regarding feasibility however. I realize Croquet is > young but these are the basic, fundamental requirements I would have: > > -Is it a persistent world? Can I set up a zone that is dedicated > to the project and will persist even when people aren't there? > Since Croquet is P2P, where would this reside? Would it be hosted > on my server (I'm assuming this is the answer)? Yes. There are two ways: 1) You can take a snapshot of the simulation state and any pending simulation messages (e.g., when the last person leaves). The simulation doesn't run when no one is there, and it picks up again exactly where it left off when waking up. That might or might not meet your needs. Now, remember that the router is the sole definition of simulation time. (see core model ref, above) If the router is still running, the first participant to "wake up" from a snapshot will have to execute all the pending messages between "now" and the time the snapshot was made. They run as quickly as the computer can execute them, not real time. Note, though, that the KAT demo, which has such snapshot code, resets the router to the time of the simulation time of the snapshot when waking up. This is done to AVOID having to wait while, e.g., the sky turns to handle what was missed while no one was running the simulation. But if the time that no one is running is fairly short, you can just remove that line that resets the router. 2) You can just make sure that there is someone running the simulation. Start up one machine and then bring down the first. (In the SDK demos, you do have to leave the router running.) The Croquet Collaborative runs a KAT demo router and a participant at all times. (It actually runs both in the same image. Thus the when someone gets an error, the continuity participant gets the error, too, and thus the router image is messed up. If I were doing it over, I would separate these out into two different Squeak instances, even if running on the same box.) > > -Can external programs interact with Croquet? My project is a C++ > project and I would hate to port it to Squeak. Furthermore, I'm > not sure it could be ported (requires a local database, and > requires an active connection to my server to upload/download > genomes). Performance would be an issue as well, my project is > very computationally intensive. Yes. But don't assume it's slow. For many activities, it isn't. Profile and know. However, remember the definition of the core model. The simulation state must be replicated on each participant, such that a snapshot gets everything and such that all computation provides the same answers. Getting C++ to do that is going to be very hard. Very hard. (Note that no one has yet gotten around to rewriting a C++ physics engine to satisfy this requirement.) > > -Can a single "user" command multiple "entities" in the > environment? For instance, could a single client control multiple > organisms in an environment? Sure, why not. > > -Is there a way to script simple, persistent "bots" (would be used > for vegetation)? Yes. See the fish in the underwater world of the big Croquet demo or the KAT demo. (Actually, the fish code is exactly the same in the basic demo. They're just not wearing fish custumes.) > > > Thanks for the help. Croquet looks exceptional and the open > framework is a good thing to see after looking into SL. In case > anyone is interested, here is my blog on my project: > > http://distributedneuron.net/blog/category/dneuron/ > http://distributedneuron.net/blog/ > > Thanks again, > -Zachary Tong |
In reply to this post by zachary-16
Thanks for the fast replies and honest answers! Its very much appreciated.
> If P2P multi-user interaction isn't really a > requirement for your project, then you might want to look elsewhere. Multi-user interaction is a definite requirement. P2P is not ideal as a classical server-client setup would also suffice, but it is also not a negative. My project is distributed in nature. Classical brain simulation is often done on a supercomputer or cluster because of the computational requirements. I've opted to evolve smaller "brains" and distribute the computation to volunteer clients. Each client runs on a volunteer's ordinary PC. Each client runs a small neural network and controls a single organism in the environment. The environment should contain the organisms of other clients so they can interact. Interaction is simple - moving, eating, "sensing" each other (vision, smell, etc), reproducing. I'm much more interested in the multi-user environment of Croquet than the 3D capabilities. Infact, my client most likely won't even show the 3D environment, it eats up valuable processing time. All I need is a place that can hold organisms, allowing them to interact in a spatial manner. > 2) You can just make sure that there is someone running the simulation. After thinking about it, this will happen automatically. The simulation is a product of clients participating, guaranteeing someone will always be inside. > Yes. But don't assume it's slow. For many activities, it isn't. > Profile and know. > > However, remember the definition of the core model. The simulation > state must be replicated on each participant, such that a snapshot gets > everything and such that all computation provides the same answers. > Getting C++ to do that is going to be very hard. Very hard. I think I'm still ok, after reading about the Core model. I can effectively treat my neural network code as a blackbox - feeding it input and receiving output. This output (move, eat, etc) is the "behavior" of the client and what will be sent to other clients. The only computation that needs to be done after receiving a snapshot is updated behavioral messages. Just like real life, organisms only need to know superficial information about others such as their position and appearance. Can Squeak interface with DLLs? I could separate my neural network code into a DLL. Squeak handles all network and environment operations, feeding the neural network DLL inputs (spatial information, vital statistics, etc). The DLL returns behavioral outputs which Squeak sends to other clients. Does this make sense? Is this possible? The biggest reason I don't want to port my code is A) performance worries which may or may not be an issue and B) its a ton of code I'd have to convert. I just don't have time to rewrite 4 months of work :) Unrelated, but the router timestamps may work in my favor. I've been struggling with a way to keep various clients working at the same speed. Your computer may be much faster than mine, meaning your organism can update its behavior more often than mine. This could impart an advantage (such as responding to threats quicker) that is independent of the genome, allowing unfit genomes to survive longer than the should. By controlling the timestamps I could ensure that all clients have equal opportunity to play on the same speed. Thanks again for the help! -Zach |
I would personally suggest that you take an approach where your
simulation code controls an avatar in the Croquet world. In this case, you will need to establish an avatar object that resides in and interacts with other avatars in the croquet world. You will need a protocol with which the avatar can transfer its sensory telemetry to its controller. Likewise, you'll need a protocol in the reverse direction by which the controller can direct the avatar in response to the environmental stimuli. I see two wins for your project by using this approach: 1. You get all of the distributed simulation advantages of Croquet - including interaction with other avatars and a unified physics for the common world; 2. Pretty much for free, you get a visualization of the organisms interacting with each other and their environment. This would be invaluable in both explaining the nature and value of your research and in recruiting additional organism computing host systems. Good luck with the project!! -DMC [hidden email] wrote: > Thanks for the fast replies and honest answers! Its very much appreciated. > >> If P2P multi-user interaction isn't really a >> requirement for your project, then you might want to look elsewhere. > > Multi-user interaction is a definite requirement. P2P is not ideal as a > classical server-client setup would also suffice, but it is also not a > negative. > > My project is distributed in nature. Classical brain simulation is > often done on a supercomputer or cluster because of the computational > requirements. I've opted to evolve smaller "brains" and distribute the > computation to volunteer clients. Each client runs on a volunteer's > ordinary PC. Each client runs a small neural network and controls a > single organism in the environment. The environment should contain the > organisms of other clients so they can interact. Interaction is simple > - moving, eating, "sensing" each other (vision, smell, etc), reproducing. > > I'm much more interested in the multi-user environment of Croquet than > the 3D capabilities. Infact, my client most likely won't even show the > 3D environment, it eats up valuable processing time. All I need is a > place that can hold organisms, allowing them to interact in a spatial > manner. > > >> 2) You can just make sure that there is someone running the simulation. > > After thinking about it, this will happen automatically. The simulation > is a product of clients participating, guaranteeing someone will always > be inside. > > >> Yes. But don't assume it's slow. For many activities, it isn't. >> Profile and know. >> >> However, remember the definition of the core model. The simulation >> state must be replicated on each participant, such that a snapshot gets >> everything and such that all computation provides the same answers. >> Getting C++ to do that is going to be very hard. Very hard. > > I think I'm still ok, after reading about the Core model. I can > effectively treat my neural network code as a blackbox - feeding it > input and receiving output. This output (move, eat, etc) is the > "behavior" of the client and what will be sent to other clients. The > only computation that needs to be done after receiving a snapshot is > updated behavioral messages. Just like real life, organisms only need > to know superficial information about others such as their position and > appearance. > > Can Squeak interface with DLLs? I could separate my neural network code > into a DLL. Squeak handles all network and environment operations, > feeding the neural network DLL inputs (spatial information, vital > statistics, etc). The DLL returns behavioral outputs which Squeak sends > to other clients. > > Does this make sense? Is this possible? The biggest reason I don't > want to port my code is A) performance worries which may or may not be > an issue and B) its a ton of code I'd have to convert. I just don't > have time to rewrite 4 months of work :) > > > Unrelated, but the router timestamps may work in my favor. I've been > struggling with a way to keep various clients working at the same > speed. Your computer may be much faster than mine, meaning your > organism can update its behavior more often than mine. This could > impart an advantage (such as responding to threats quicker) that is > independent of the genome, allowing unfit genomes to survive longer than > the should. By controlling the timestamps I could ensure that all > clients have equal opportunity to play on the same speed. > > Thanks again for the help! > -Zach > > > > > |
Free forum by Nabble | Edit this page |