Body: <p>I understand that I can draw a state-space graph for any problem. However, here is the problem: I can't really figure out how to make production systems.</p>
  <p>I am solving the FWGC (Farmer, Wolf, Goat, Cabbage) River Crossing Puzzle using a state-space search. So, my tasks are that:</p>
  <ol>
  <li><p>Represent the state-space graph (which I know how to do)</p>
  </li>
  <li><p>Write production systems.</p>
  </li>
  </ol>
  <p>My questions: <strong>How do I write production systems?</strong></p>
  <p>The thing that confused me, was the production system example in Rich's book (about the water jug problem), where he has imagined all the states possible and wrote the next state for them.</p>
  <p>Here in the FWGC problem, I see some problems while writing the production system.</p>
  <p>For instance, for a given state, there are multiple possible next states, i.e. a farmer can take Goat, Cabbage, Wolf, or go alone to the other side (assuming that all states are safe, just for the sake of simplicity).</p>
  <p>So, how would I represent the same state going to multiple next states in production systems?</p>
  <p><strong>What I have tried-:</strong></p>
  <p>Then, I googled a pdf</p>
  <p><a href="https://www.cs.unm.edu/%7Eluger/ai-final2/CH4_Depth-.%20Breadth-,%20and%20Best-first%20Search.pdf" rel="nofollow noreferrer">https://www.cs.unm.edu/~luger/ai-final2/CH4_Depth-.%20Breadth-,%20and%20Best-first%20Search.pdf</a></p>
  <p><a href="https://i.sstatic.net/9XbGU.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/9XbGU.png" alt="enter image description here" /></a></p>
  <p>Is that what I call the production system for this case?</p>
  <p><strong>But, here are my reasons why it should not be called a production system:</strong></p>
  <ol>
  <li><p>There might be other possible states as well.</p>
  </li>
  <li><p>It is showing only 1 solution.</p>
  </li>
  </ol>
  <p>So, how do I actually learn to create production rules (I know how to make state-space representation better as I have read that J.Nillison's book which was GOLD in this matter)? And, what would be the production rules in this case?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-09-09T10:17:15.787Z
Comments.Text: I suggest that you simplify this post as much as possible to contain only the information that is needed to answer your question. Also, please, ask your main question immediately at the beginning, so that we understand which one it really is. Is your question 1. "how to make a production system?", 2. "What is a production system?", or maybe something else? It's not very clear. I think this post can be simplified and clarified.
Comments.UserDisplayName: nbro
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-09-09T15:37:07.110Z
Comments.Text: done. i hope it is clear now.
Comments.UserDisplayName: qsaso
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-09-09T16:21:33.810Z
Comments.Text: I am not an expert on the topic, but, if I understand and remember correctly, a production system is composed of the so-called "productions", i.e. "if-then" statements, and a database (or working memory) with facts. Now, in your case, you know that the wolf and goat cannot be together, without the human, otherwise the wolf may eat the goat. So, I think that, in your case, you need to create these _if-then_ statements (or productions) and the _facts_ in the database. Section 2.1 of this paper https://www.doc.ic.ac.uk/~rak/papers/LPS.pdf explains what a production system is, so it may help you.
Comments.UserDisplayName: nbro
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-12-08T21:36:37.313Z
Comments.Text: See also http://refpersys.org/ and the blog of the late Jacques Pitrat on http://bootstrappingartificialintelligence.fr/WordPress3/
Comments.UserDisplayName: Basile Starynkevitch
Tags: <expert-systems><prolog><production-systems>
Title: How do I write production systems?
UserDisplayName: qsaso
ThreadText: # How do I write production systems?
  
  (Asked by: username_0 on 2020-09-08)
  
  I understand that I can draw a state-space graph for any problem. However, here is the problem: I can't really figure out how to make production systems.
  
  I am solving the FWGC (Farmer, Wolf, Goat, Cabbage) River Crossing Puzzle using a state-space search. So, my tasks are that:
  
  1. Represent the state-space graph (which I know how to do)
  2. Write production systems.
  
  My questions: **How do I write production systems?**
  
  The thing that confused me, was the production system example in Rich's book (about the water jug problem), where he has imagined all the states possible and wrote the next state for them.
  
  Here in the FWGC problem, I see some problems while writing the production system.
  
  For instance, for a given state, there are multiple possible next states, i.e. a farmer can take Goat, Cabbage, Wolf, or go alone to the other side (assuming that all states are safe, just for the sake of simplicity).
  
  So, how would I represent the same state going to multiple next states in production systems?
  
  **What I have tried-:**
  
  Then, I googled a pdf
  
  [https://www.cs.unm.edu/~luger/ai-final2/CH4\_Depth-.%20Breadth-,%20and%20Best-first%20Search.pdf](https://www.cs.unm.edu/%7Eluger/ai-final2/CH4_Depth-.%20Breadth-,%20and%20Best-first%20Search.pdf)
  
  [![enter image description here](https://i.sstatic.net/9XbGU.png)](https://i.sstatic.net/9XbGU.png)
  
  Is that what I call the production system for this case?
  
  **But, here are my reasons why it should not be called a production system:**
  
  1. There might be other possible states as well.
  2. It is showing only 1 solution.
  
  So, how do I actually learn to create production rules (I know how to make state-space representation better as I have read that J.Nillison's book which was GOLD in this matter)? And, what would be the production rules in this case?
  
  **Tags:** expert-systems, prolog, production-systems
  > **Comments:**
  > **username_1**: I suggest that you simplify this post as much as possible to contain only the information that is needed to answer your question. Also, please, ask your main question immediately at the beginning, so that we understand which one it really is. Is your question 1. "how to make a production system?", 2. "What is a production system?", or maybe something else? It's not very clear. I think this post can be simplified and clarified.  
  > **username_0**: done. i hope it is clear now.  
  > **username_1**: I am not an expert on the topic, but, if I understand and remember correctly, a production system is composed of the so-called "productions", i.e. "if-then" statements, and a database (or working memory) with facts. Now, in your case, you know that the wolf and goat cannot be together, without the human, otherwise the wolf may eat the goat. So, I think that, in your case, you need to create these _if-then_ statements (or productions) and the _facts_ in the database. Section 2.1 of this paper https://www.doc.ic.ac.uk/~rak/papers/LPS.pdf explains what a production system is, so it may help you.  
  > **username_2**: See also http://refpersys.org/ and the blog of the late Jacques Pitrat on http://bootstrappingartificialintelligence.fr/WordPress3/  
  
  ---
  
  ## 0 answers
  
  