After reading quite a few articles about artificial life (a topic that I find very interesting) along with a few questions right here on SO, I started playing with the idea of developing a (very, very, very) simple simulator. Graphics are not required, even. If I missed a question, please feel free to tell me.
As I said, this is unlikely to be a Sims level simulation. I think that he will hardly reach the level of “acceptable free”, it’s just a training exercise and something to maintain his skills during the break. The basic premise is that a common person is created. There is no name, height or anything like that (as I said, simply), the only real thing that he will get is a list of “associations” and common opportunities to “use”, “pick up” and “watch”.
My first question relates to associations. What does SO recommend as an effective way to deal with such things? I was thinking about a multimap, and the relatively easy key setting was what she wanted (food, food, rest, etc.), and the other part (sorry, my mind has already expired) is that it is associated with this need.
For example, let's say we have a refrigerator. The refrigerator contains food (just a common base). Initially, a person does not associate a refrigerator with food, but he associates food with hunger. Therefore, when hunger rises, it begins to arbitrarily search for food. If food is not within reach, it “uses” items to search for food. Since he does not know the association with food, he uses things willingly (perhaps looking for the nearest object and expanding). When he uses / opens the refrigerator, he sees the food, making the connection (read: insert the pair “food, refrigerator”) that the refrigerator contains food.
Now I understand that it will be much harder than it sounds, and I am ready to pull it out. The question is, will a multimap be suitable for an (possibly) exponentially expanding list of associations? If not, what would it be?
The second question I probably have a lot easier. Simply put, would a universal object / element interface be appropriate for most elements? In other words, will a common “use interface” be used for what I intend to? I don’t think I’ll explain it well.
In any case, any comments are welcome.