Answers.Body: <p>The three questions <em>"1) do you surf on internet? 2) do you play? 3) do you use editing programs?"</em> are a good start, but I think your teacher is right that you need more granularity.</p>
  
  <p>1) What do you use your computer for?</p>
  
  <p>(a) Watching videos [leads to: "Streaming or Downloaded HD?" b/c downloading requires more local volume, and potentially a better video card.]  </p>
  
  <p>(b) Do you play Games [leads to: "High-end video games or simple games?" b/c playing AAA FPS requires much more powerful video cards.  If they play words with friends or Tetris, a low-end card will be sufficient.]</p>
  
  <p>(c) Do you use editing programs? [leads to: "photo editing?  video editing? what size files?" b/c editing HD vid and high resolution photos is onerous with an underpowered system.]  </p>
  
  <p>You might want to ask in general what they use the computer for, because if it's just email, web surfing, Facebook and Youtube, etc., they can probably get by with a Windows surface <em>(I'm a regular critic of MS, but my understanding is you can get the fully functional Office Suite on Surface, which has utility value.)</em></p>
  
  <h2>--------------------------</h2>
  
  <p>I think you're on the right track, but you should step back and think like a Product Manager here, as opposed to a developer.  These questions might help you clarify your intent, and expand your initial template to a more fully featured system your teacher is looking for:</p>
  
  <ul>
  <li>Who is the customer for my system? <br></li>
  <li>What level of technical knowledge will the average user have? <br></li>
  <li>Am I covering every aspect with the proper amount of detail?</li>
  <li>Is the order of my questions correct?  (Why ask price range before monitor size?)</li>
  <li>Is there any mechanism to help a user if they don't know what answer to choose?</li>
  </ul>
  
  <p>Again, these are just some initial thoughts. Only you know what product you want to create, and what the capabilities should be.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-04T20:18:46.780Z
Answers.LastActivityDate: 2018-06-04T20:18:46.780Z
Answers.UserDisplayName: DukeZhou
Answers.Body: <p>We cannot do homework for students in this network, however I can suggest that several items affecting cost and several usage patterns are missing and the number of rules is shy by an order of magnitude.  I wholeheartedly agree with the educational directives you received.</p>
  
  <p>Consider first developing your lists further to include peripherals like DVD burner, USB devices, and audio.  Whether the user does scientific programming, watches movies on the monitor, develops software, and other specific usage scenarios is also more specific and therefore will produce a better tailored system than the answer to the question of whether the user is a professional.</p>
  
  <p>It is not the metric of the number of rules that is of most importance.  It is the number of operations contained in the rule set that is the guiding metric.  This is because rules in Prolog can be aggregated.  The rough estimate of rule operator count to complete a system is sqrt(i*o)/4, where i is the number of input permutations and o is the number of output permutations.</p>
  
  <p>(This is the application of Shannon Information Theory, that number of bits n = log<sub>2</sub> (P'/P), where P' and P are the <em>a posteriorii</em> and <em>a priori</em> probabilities respectively.  The divisor of four is because there are about 16 = 2<sup>4</sup> operators normally used.)</p>
  
  <p>You may end up with thirty or forty rules.</p>
  
  <p>Create some use cases that exercise the extremes as well as some of the typical cases from among the permutations in inputs and outputs.  Run your system on those cases and observe the system behavior.  Learn how to debug by outputting intermediate results or stepping through rule execution.</p>
  
  <p>There are no shortcuts to researching and developing other than not wasting time worrying about how much time it will take.  You can also optimize your homework time by learning the tools and then stepping back, taking a deep breath, and saying, "I can do this!"</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-06T20:38:15.437Z
Answers.Text: Although my answer may have been more in line with what the OP was looking for--pure luck, imo--this answer deserves recognition (I certainly upvoted) for the technical points you make re Prolog and Shannon.  Thanks for contributing!
Answers.UserDisplayName: DukeZhou
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-08T19:33:32.737Z
Answers.Text: @DukeZhou I've panicked when not sure of myself with regard to academic assignments at the university. In this specific case, I read between the lines, supported what the professor was doing (which seemed to be in the best interest of the student), and provided a wider context to understand what appeared to be the assignment. I am interested in what you mean when you say the author of the question was looking for an answer involving pure luck. Can you expound?
Answers.UserDisplayName: Douglas Daseeco
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-05T21:00:28.590Z
Answers.Text: Just that I took a shot in the dark that the list of questions itself needed to be supplemented, without thinking much about the underlying mechanics.  (It seems to me "level of use" is the primary question these days re: computer purchase--with the rise of the tablet, only PC gamers and techs really need PCs anymore, outside of an office setting.  That said, my answer doesn't involve AI!)
Answers.UserDisplayName: DukeZhou
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-04T20:39:17.897Z
Answers.LastActivityDate: 2018-06-04T20:39:17.897Z
Answers.UserDisplayName: Douglas Daseeco
Body: <p>I'm doing a project for my last university examination but I'm having some troubles! I'm making an expert system who should be able to assemble a computer after asking some questions to the user. It works but according to my teacher I need to define more rules, could you give me some suggestions please? I have facts like these:</p>
  
  <pre><code>processor(P, Proc_price, Price_range),
  motherboard(M, Motherboard_price, Price_range),
  ram(R, Ram_price, Price_range),
  case(C, Case_price, Price_range),
  ali(A, Ali_price, Price_range),
  video_card(V, Vga_price, Price_range),
  ssd(S, Ssd_price, Price_range),
  monitor(D, Monitor_price, Price_range),
  hdd(H, Hdd_price, Price_range).
  </code></pre>
  
  <p>I ask these questions to the user: 1) choose the price range 2) choose the display size 3) choose hard disk size Then I ask 3 questions about computer utilization to define the user: 1) do you surf on internet? 2) do you play? 3) do you use editing programs?</p>
  
  <pre><code>use(gaming) :- ask("Do you play games? (y/n)").
  
      use(editing) :- ask("Do you use editing programs? (y/n)").
  
      use(surfing) :- ask("Do you surf internet?(y/n)").
  
      user(base) :-
          use(surfing),  \+ use(gaming), \+ use(editing).
  
      user(gamer) :-
          use(gaming), use(surfing), \+ use(editing).
  
      user(professional) :-
          use(editing), \+ use(gaming), use(surfing).
  </code></pre>
  
  <p>I should make more questions about user definition to make user definition more complex too and add some rules. Please help me, I'm desperate</p>
  
Tags: <prolog><expert-systems><r>
Title: Defining rules for an expert system
UserDisplayName: Mark
ThreadText: # Defining rules for an expert system
  
  (Asked by: username_0 on 2018-06-04)
  
  I'm doing a project for my last university examination but I'm having some troubles! I'm making an expert system who should be able to assemble a computer after asking some questions to the user. It works but according to my teacher I need to define more rules, could you give me some suggestions please? I have facts like these:
  
  ```
  processor(P, Proc_price, Price_range),
  motherboard(M, Motherboard_price, Price_range),
  ram(R, Ram_price, Price_range),
  case(C, Case_price, Price_range),
  ali(A, Ali_price, Price_range),
  video_card(V, Vga_price, Price_range),
  ssd(S, Ssd_price, Price_range),
  monitor(D, Monitor_price, Price_range),
  hdd(H, Hdd_price, Price_range).
  
  ```
  
  I ask these questions to the user: 1) choose the price range 2) choose the display size 3) choose hard disk size Then I ask 3 questions about computer utilization to define the user: 1) do you surf on internet? 2) do you play? 3) do you use editing programs?
  
  ```
  use(gaming) :- ask("Do you play games? (y/n)").
  
      use(editing) :- ask("Do you use editing programs? (y/n)").
  
      use(surfing) :- ask("Do you surf internet?(y/n)").
  
      user(base) :-
          use(surfing),  \+ use(gaming), \+ use(editing).
  
      user(gamer) :-
          use(gaming), use(surfing), \+ use(editing).
  
      user(professional) :-
          use(editing), \+ use(gaming), use(surfing).
  
  ```
  
  I should make more questions about user definition to make user definition more complex too and add some rules. Please help me, I'm desperate
  
  **Tags:** prolog, expert-systems, r
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2018-06-04. Score: 0 | Accepted answer
  
  The three questions *"1) do you surf on internet? 2) do you play? 3) do you use editing programs?"* are a good start, but I think your teacher is right that you need more granularity.
  
  1) What do you use your computer for?
  
  (a) Watching videos [leads to: "Streaming or Downloaded HD?" b/c downloading requires more local volume, and potentially a better video card.]
  
  (b) Do you play Games [leads to: "High-end video games or simple games?" b/c playing AAA FPS requires much more powerful video cards. If they play words with friends or Tetris, a low-end card will be sufficient.]
  
  (c) Do you use editing programs? [leads to: "photo editing? video editing? what size files?" b/c editing HD vid and high resolution photos is onerous with an underpowered system.]
  
  You might want to ask in general what they use the computer for, because if it's just email, web surfing, Facebook and Youtube, etc., they can probably get by with a Windows surface *(I'm a regular critic of MS, but my understanding is you can get the fully functional Office Suite on Surface, which has utility value.)*
  
  ## --------------------------
  
  I think you're on the right track, but you should step back and think like a Product Manager here, as opposed to a developer. These questions might help you clarify your intent, and expand your initial template to a more fully featured system your teacher is looking for:
  
  * Who is the customer for my system?
  * What level of technical knowledge will the average user have?
  * Am I covering every aspect with the proper amount of detail?
  * Is the order of my questions correct? (Why ask price range before monitor size?)
  * Is there any mechanism to help a user if they don't know what answer to choose?
  
  Again, these are just some initial thoughts. Only you know what product you want to create, and what the capabilities should be.
  
  
  ---
  
  ### Answer by username_2 on 2018-06-04. Score: 2
  
  We cannot do homework for students in this network, however I can suggest that several items affecting cost and several usage patterns are missing and the number of rules is shy by an order of magnitude. I wholeheartedly agree with the educational directives you received.
  
  Consider first developing your lists further to include peripherals like DVD burner, USB devices, and audio. Whether the user does scientific programming, watches movies on the monitor, develops software, and other specific usage scenarios is also more specific and therefore will produce a better tailored system than the answer to the question of whether the user is a professional.
  
  It is not the metric of the number of rules that is of most importance. It is the number of operations contained in the rule set that is the guiding metric. This is because rules in Prolog can be aggregated. The rough estimate of rule operator count to complete a system is sqrt(i\*o)/4, where i is the number of input permutations and o is the number of output permutations.
  
  (This is the application of Shannon Information Theory, that number of bits n = log2 (P'/P), where P' and P are the *a posteriorii* and *a priori* probabilities respectively. The divisor of four is because there are about 16 = 24 operators normally used.)
  
  You may end up with thirty or forty rules.
  
  Create some use cases that exercise the extremes as well as some of the typical cases from among the permutations in inputs and outputs. Run your system on those cases and observe the system behavior. Learn how to debug by outputting intermediate results or stepping through rule execution.
  
  There are no shortcuts to researching and developing other than not wasting time worrying about how much time it will take. You can also optimize your homework time by learning the tools and then stepping back, taking a deep breath, and saying, "I can do this!"
  
  > **Comments:**
  > **username_1**: Although my answer may have been more in line with what the OP was looking for--pure luck, imo--this answer deserves recognition (I certainly upvoted) for the technical points you make re Prolog and Shannon.  Thanks for contributing!  
  > **username_2**: @username_1 I've panicked when not sure of myself with regard to academic assignments at the university. In this specific case, I read between the lines, supported what the professor was doing (which seemed to be in the best interest of the student), and provided a wider context to understand what appeared to be the assignment. I am interested in what you mean when you say the author of the question was looking for an answer involving pure luck. Can you expound?  
  > **username_1**: Just that I took a shot in the dark that the list of questions itself needed to be supplemented, without thinking much about the underlying mechanics.  (It seems to me "level of use" is the primary question these days re: computer purchase--with the rise of the tablet, only PC gamers and techs really need PCs anymore, outside of an office setting.  That said, my answer doesn't involve AI!)  
  
  ---
  
  