Help With A 'Memory' Program

This is a discussion on Help With A 'Memory' Program within the C Programming forums, part of the General Programming Boards category; Does anyone know how to make an expert system using relatively basic C language? By expert system I mean that ...

  1. #1
    Registered User
    Join Date
    Dec 2005
    Posts
    2

    Help With A 'Memory' Program

    Does anyone know how to make an expert system using relatively basic C language? By expert system I mean that you ask a question, the computer responds with an answer, and if it doesn't know the answer then it stores the answer along with the question in a file. So when you ask the question again, it will know the answer. the tricky part is that, lets say you ask "what color is the sky?" or "the color of the sky is?" - the program should not differentiate those two questions since they are in essence the same question.

  2. #2
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,069
    You'd probably want to look into fairly complex data structures and algorithms to make that. You'd have to have a program differentiate the verbs and nouns in the sentence then store it into a structure and search until it gets all the keywords. Like it would pull out "What" and go to the what questions, then it would go to color, then it would go to sky, see that there are no more real buzz words (like cloud) and give the in that node.

    There may be a really standard data structure to go about this, but right now all I can think of is a Minimax tree like what they use for Chess programs and other AI.
    Last edited by SlyMaelstrom; 12-17-2005 at 11:29 PM.
    Sent from my iPadŽ

  3. #3
    Registered User
    Join Date
    Dec 2005
    Posts
    2
    Hrm, would you know how to create a program in which the user asks the question, and if the CPU doesn't know the answer, it asks for the answer and then stores the Answer and Question in a file. So, if the question was asked again, the CPU just 'printf's the file that has the answer onto the DOS screen.

  4. #4
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,506
    > the program should not differentiate those two questions since they are in essence the same question.
    OK, so you ask
    "What colour is the sky?"
    It doesn't know, so you answer "blue".

    What if your next question is
    "is the sky blue?"
    Are you expecting "yes" in response to this


    > the program should not differentiate those two questions since they are in essence the same question.
    True machine comprehension is still a way off, even for people who've been doing machine cognition for decades.
    Is this a question
    This is the question
    Same words, different order, completely different meaning.

    > Does anyone know how to make an expert system using relatively basic C language?
    The only basic thing you're going to be able to do is use strcmp() to compare the new question with all previous questions and answers. This will not be an expert system. Once you get into any kind of parsing of questions, you're going to lose any idea of making a simple program.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. memory not released after running program
    By lehe in forum Linux Programming
    Replies: 21
    Last Post: 01-01-2011, 02:32 AM
  2. Memory allocation overflow in c program
    By bassam_fci in forum C Programming
    Replies: 6
    Last Post: 05-19-2009, 03:35 PM
  3. Assignment Operator, Memory and Scope
    By SevenThunders in forum C++ Programming
    Replies: 47
    Last Post: 03-31-2008, 06:22 AM
  4. Pointer's
    By xlordt in forum C Programming
    Replies: 13
    Last Post: 10-14-2003, 02:15 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21