Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 99045
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T00:18:44+00:00 2026-05-11T00:18:44+00:00

Having read up on quite a few articles on Artificial Life (A subject I

  • 0

Having read up on quite a few articles on Artificial Life (A subject I find very interesting) along with several questions right here on SO, I’ve begun to toy with the idea of designing a (Very, very, very) simple simulator. No graphics required, even. If I’ve overlooked a question, please feel free to point it out to me.

Like I said, this will hardly be a Sims level simulation. I believe it will barely reach ‘acceptable freeware’ level, it is simply a learning exercise and something to keep my skills up during a break. The basic premise is that a generic person is created. No name, height or anything like that (Like I said, simple), the only real thing it will receive is a list of ‘associations’ and generic ‘use’, ‘pick up’ and ‘look’ abilities.

My first question is in regards to the associations. What does SO recommend as an efficient way to handle such things? I was thinking a multimap, with the relatively easy set up of the key being what it wants (Food, eat, rest, et cetera) and the other bit (Sorry, my mind has lapsed) being what it associates with that need.

For example, say we have a fridge. The fridge contains food (Just a generic base object). Initially the person doesn’t associate fridge with food, but it does associate food with hunger. So when its hunger grows it begins to arbitrarily look for food. If no food is within reach it ‘uses’ objects to find food. Since it has no known associations with food it uses things willy-nilly (Probably looking for the nearest object and expanding out). Once it uses/opens the fridge it sees food, making the connection (Read: inserting the pair ‘food, fridge’) that the fridge contains food.

Now, I realise this will be far more complex than it appears, and I’m prepared to hammer it out. The question is, would a multimap be suitable for a (Possibly) exponentially expanding list of associations? If not, what would be?

The second question I have is probably far easier. Simply put, would a generic object/item interface be suitable for most any item? In other words, would a generic ‘use’ interface work for what I intend? I don’t think I’m explaining this well.

Anyway, any comments are appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T00:18:45+00:00Added an answer on May 11, 2026 at 12:18 am

    If you were doing this as a hard-core development project, I’d suggest using the equivalent of Java reflection (substitute the language of your choice there). If you want to do a toy project as a starter effort, I’d suggest at least rolling your own simple version of reflection, per the following rationale.

    Each artifact in your environment offers certain capabilities. A simple model of that fact is to ask what ‘verbs’ are applicable to each object your virtual character encounters (including possible dependence on the current state of that object). For instance, your character can ‘open’ a refrigerator, a box of cereal, or a book, provided that each of them is in a ‘closed’ state. Once a book is opened, your character can read it or close it. Once a refrigerator is opened, your character can ‘look-in’ it to get a list of visible contents, can remove an object from it, put an object in it, etc.

    The point is that a typical situation might involve your character looking around to see what is visible, querying an object to determine its current state or what can be done with it (i.e. ‘what-state’ and ‘what-can-i-do’ are general verbs applicable to all objects), and then use knowledge about its current state, the state of the object, and the verb list for that object to try doing various things.

    By implementing a set of positive and negative feedback, over time your character can ‘learn’ under what circumstances it should or should not engage in different behaviors. (You could obviously make this simulation interactive by having it ask the user to participate in providing feedback.)

    The above is just a sketch, but perhaps it can give you some interesting ideas to play with. Have fun! 😉

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 74k
  • Answers 74k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer I've been working it out, and I have managed to… May 11, 2026 at 2:15 pm
  • added an answer ClassDep (from Sun, in the Jini development kit) will do… May 11, 2026 at 2:15 pm
  • added an answer CultureInfo[] cultures = CultureInfo.GetCultures(CultureTypes.SpecificCultures); IEnumerable<string> currencySymbols = cultures.Select<CultureInfo, string>(culture =>… May 11, 2026 at 2:15 pm

Related Questions

Having read the threads Is SqlCommand.Dispose enough? and Closing and Disposing a WCF Service
Having read an existing post on stackoverflow and done some reading around on the
Having read Fowler's Refactoring for a while, I still often catch myself thinking I
After having read that QuickSilver was no longer supported by BlackTree and has since
my goal is to get lots of rows from a translation table. I use
I'm trying to do a huge bulk insert into an SqlCe database (version 3.5,
Having read Setting up Subversion on Windows I am trying to figure out how
I have a series of divs in a pattern of header/body, where a click

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.