Register | Sign In


Understanding through Discussion


EvC Forum active members: 60 (9209 total)
3 online now:
Newest Member: Skylink
Post Volume: Total: 919,445 Year: 6,702/9,624 Month: 42/238 Week: 42/22 Day: 9/6 Hour: 1/1


Thread  Details

Email This Thread
Newer Topic | Older Topic
  
Author Topic:   Percy's Alife Project
awinkisas
Inactive Member


Message 9 of 63 (59909)
10-07-2003 11:30 AM
Reply to: Message 1 by Percy
10-06-2003 6:59 PM


Hi Percy,
Sounds like an exhausting but fun project. I was thinking about the temperature gradient problem and I think it might be a good idea to use techniques from compression technology. If you only keep track of the location and value of local maximums/minimums then you can infer the temperature of surrounding cells using a formula. I would suspect that the formula would be along the lines of an inverse square. Depending on the area of interest the algorithm would have to find the closest maxs/mins, determine the distance to each and calculate the temperature. The draw back is that there is a certain loss of granularity due to interpolation.
One would also have to take into account such things as differences in the density of the medium as well as the heat conductivity and turbulence. It might be a good idea to initially assume that the medium is uniform and then introduce additional factors later.
Also, since heat diffuses, there would also need to be a redistribution of the maxs/mins during each cycle. The hotter areas would become cooler and the cooler areas hotter depending on the surrounding values. And have you thought about heat sources? I suppose that cells and other metabolic process could generate heat but there needs to be some incident radiation to keep entropy from running down the system.
I hope this helps and if you need any additional help I would be glad to assist. For me programming is a hobby as well as a job. I've done some work in C++ but have stuck with VB for my bread and butter. Lately in my spare time I've been working on a NLP chatterbot (nothing as sophisticated as the Brad McFall version though).
Regards

This message is a reply to:
 Message 1 by Percy, posted 10-06-2003 6:59 PM Percy has replied

Replies to this message:
 Message 16 by Percy, posted 10-07-2003 1:20 PM awinkisas has replied

  
awinkisas
Inactive Member


Message 21 of 63 (59967)
10-07-2003 3:33 PM
Reply to: Message 16 by Percy
10-07-2003 1:20 PM


I didn't follow the reference to compression technology
Some image compression algorithms average all the colors over a small area and then infer the gradient between adjacent areas when rendering. Smaller areas are used near regions where there are steep gradients i.e. near object edges. A 3D temperature gradient could be treated similarly but using a local max or min rather than averaging.
Ever heard of Leo? Is your chatterbot better?
I hadn't heard of Leo but I checked it out. It's amazing that very simple rules, compounded, can create complex results. If only it was somewhat self-aware (the holy-grail of AI programmers). My bot is more complex but it's only about 1/2 done right now. It can parse pharses and identify subjects and predicates. I'm working on the knowledge representation portion right now, which is orders of magnitude more difficult than parsing.
But back to Cellscape
How do food objects get into cells?
Instead of logically separating food and waste objects, how about making them the same object, say a matter object. This way cells could potentially treat all matter as food. Each matter object could have an energy object bound to it and this would be the maximum amount of energy the cell could extract. The characteristics of the matter could define what cells can consume it. Cells in turn will emit matter objects that they have consumed after modifying its characteristics and removing some or all of the energy. Once a matter object has become depleted of energy it could potentially absorb some from the environment or remain inert.
So many ideas ...

This message is a reply to:
 Message 16 by Percy, posted 10-07-2003 1:20 PM Percy has replied

Replies to this message:
 Message 24 by Percy, posted 10-07-2003 5:22 PM awinkisas has replied

  
awinkisas
Inactive Member


Message 27 of 63 (60081)
10-08-2003 10:34 AM
Reply to: Message 24 by Percy
10-07-2003 5:22 PM


Ultimately I would like to achieve a design in which the properties of the objects emerge without ever having been anticipated by the designers.
You are talking about the program having mutable classes.
I am thinking there would be a base class called CellScapeObject from which all other object classes would derive. This base class would have methods and properties that are common to all objects. Things like position, movement vectors, temperature etc.
Static classes can be derived from the base class but how would new properties be added to create new objects. In post #1 you talked about attaching algorithms to objects. As far as I know C++ does not allow for dynamically adding new methods to classes at runtime. You could have an array of pointers to functions but each function would have to return the same value. This could work if the functions only returned a boolean indicating success but had side-effects on parameters.
The functions that could be called would have to be predefined. I guess the trick lies in creating several simple functions that the objects can combine in novel ways to create new behaviours.
Not sure what you mean by "bound". I'm hoping for a conceptually clean design where objects feel like they have a physical manifestation. Depending upon the conceptualization, some of this disappears if objects can become bound to other objects as if they were properties or attributes.
"Bound" may have been the wrong word. I agree that everything should have a physical analogue. With that in mind, since the program does not model chemical bond energy, and cells get their energy from food, and food could potentially be any item in the CellScape universe, there must be an energy component of each object. This energy component would represent the chemical bond energy that could be extracted from that object when metabolized by cells.
I'll think about this some more and post some pseudocode.

This message is a reply to:
 Message 24 by Percy, posted 10-07-2003 5:22 PM Percy has replied

Replies to this message:
 Message 28 by Percy, posted 10-08-2003 11:25 AM awinkisas has replied

  
awinkisas
Inactive Member


Message 29 of 63 (60251)
10-09-2003 10:14 AM
Reply to: Message 28 by Percy
10-08-2003 11:25 AM


Hi Percy,
C++ classes are not mutable and I don't know of anyway to do it short of redefining the language. In any case I don't think I read your first post very well because I now realize that you are talking about storing your algorithms and objects as data and not as code. You have to bear with me, I'm a little slow
I did some research and found that java as well as languages using the .NET framework expose a compiler class. If the algorithms are written using any of these languages they can be compiled on the fly and executed. The compilers they implement are probably better than anything we could come up with. Ideally the algorithms would be compiled once and only recompiled if they are modified. Something to think about.

This message is a reply to:
 Message 28 by Percy, posted 10-08-2003 11:25 AM Percy has replied

Replies to this message:
 Message 30 by Percy, posted 10-09-2003 10:46 AM awinkisas has not replied

  
awinkisas
Inactive Member


Message 33 of 63 (60263)
10-09-2003 11:51 AM
Reply to: Message 31 by Dr Jack
10-09-2003 10:57 AM


I'm a big fan of C# and it is similar enough to C++ to require little or no learning curve. There is even an open source version of the .NET framework available for other platforms, but I don't know if it's complete yet: Home | Mono There is even competing GNU project for those adverse to MS: DotGNU Project
C# under the .NET framework gets compiled to MSIL (Microsoft Intermediate Language) similiar to java's bytecode. This gets JIT'd at runtime to native code. It won't run as fast as C++ but it is machine independant. As long as the target platform has a .NET CLR then the app will run.

This message is a reply to:
 Message 31 by Dr Jack, posted 10-09-2003 10:57 AM Dr Jack has not replied

  
awinkisas
Inactive Member


Message 36 of 63 (60296)
10-09-2003 3:30 PM
Reply to: Message 35 by NosyNed
10-09-2003 1:39 PM


IMO the major programmatic issue that needs to be resolved early in the process is how to interpret/compile the algorithms attached to objects. It will take a lot of time and effort to create an interpreter. I did some work in this area in university and it is not trivial. We could save a lot of time if the algorithms could be written in an established language and dynamically compiled when needed by an existing compiler. To this end Java and any .NET framework language will do the trick. C++ cannot do this unless you use Managed Extensions for C++ which brings it into the .NET realm.
This raises another issue around how the algorithms get modified. The program would have to know how to program. It would need to know about looping, branching, declarations, etc. Or would we go for a sort of GA approach where random changes are made to the code? If it compiles it is a successful mutation otherwise the algorithm is destroyed. Whether the change is beneficial or not will be left up to the success of the organism.
There might be a way to eliminate the need for dynamic compilation altogether. I propose that we create a set of simple algorithms, encoded as functions/methods, that can be used in combination to perform more complex tasks. Similar to the 4 base pairs of DNA that can be ordered differently to create different proteins. This way we don’t have to worry about recompiling modified algorithms. Instead larger algorithms are built up out of the smaller base set of predefined algorithms. Sort of like a RISC computing approach. The ordering of the base set algorithms could be modified using the GA paradigm as described above.
Any thoughts?

This message is a reply to:
 Message 35 by NosyNed, posted 10-09-2003 1:39 PM NosyNed has not replied

Replies to this message:
 Message 37 by Percy, posted 10-09-2003 5:21 PM awinkisas has replied

  
awinkisas
Inactive Member


Message 45 of 63 (60427)
10-10-2003 12:56 PM
Reply to: Message 37 by Percy
10-09-2003 5:21 PM


The proper definition of the primitive functions will directly affect the amount of variation that the organisms allow. Since the model you are proposing is roughly based on a molecular/protein level the actions that the primitives perform should be roughly analogous to actions that small molecules can perform. Large molecules/proteins would be represented by groups of objects each enacting their own action script. I think stateless functions i.e. functions that take no parameters, would be most representative of reality, plus they don't require any external storage. So I was thinking of something a little more high level such as:
  • MoveXPos - moves in the x axis one unit positively
  • MoveYNeg - moves in the x axis one unit negatively
  • Same for Y and Z axes
  • Spawn - object creates a copy of itself, useful for cell growth
  • AttachAdjacent - object attaches itself to adjacent object
  • ConsumeAdjacent - consumes adjacent object, useful for metabolic objects
  • DestroyAdjacent - destroys adjacent object
  • Seek - object moves towards the closest object
  • AbsorbEnergy - object absorbs some energy from adjacent object, use for metabolic objects
  • GoDormant - object no longer processes actions
  • ActivateAdjacent - object "wakes up" adjacent object (enzymes?)

Objects would use a certain amount of energy for each action. When the object has no more energy left it could either become dormant or destroy itself.
This is of course a preliminary list and I assumed that certain metabolic processes will be allowed. There are tons of questions regarding how some of these actions would work with respect to each other.
What do you think?

This message is a reply to:
 Message 37 by Percy, posted 10-09-2003 5:21 PM Percy has not replied

  
Newer Topic | Older Topic
Jump to:


Copyright 2001-2023 by EvC Forum, All Rights Reserved

™ Version 4.2
Innovative software from Qwixotic © 2024