Body: <p>I have implemented the Translation algorithm for CILP (Connectionist Inductive Learning and Logic Programming model by Garcez, Lamb and Gabbay) from their book &quot;Neural-Symbolic Cognitive Reasoning&quot;</p>
  <p>The paper which describes the example Neural Network can be found here:</p>
  <p><a href="https://www.staff.city.ac.uk/%7Eaag/papers/cilp.pdf" rel="nofollow noreferrer">https://www.staff.city.ac.uk/~aag/papers/cilp.pdf</a></p>
  <p>My implementation can be found here:</p>
  <p><a href="https://github.com/nravindranath10/CILP_Translation_Algorithm" rel="nofollow noreferrer">https://github.com/nravindranath10/CILP_Translation_Algorithm</a></p>
  <p>While the book claims that the 2 iterations are required for the Neural Network to converge to the final answer which is {B}, in my code the Neural Network seems to take only 1 iteration to converge to the same answer {B}. I have highlighted the &quot;m = 2&quot; line in my attached image from the book.</p>
  <p>I would like to understand if I am going wrong somewhere in my implementation.</p>
  <p>Thanks,
  Ravi<a href="https://i.sstatic.net/VEEyg.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/VEEyg.png" alt="enter image description here" /></a></p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-04-20T11:15:39.617Z
Comments.Text: I don't see any question being asked here. Can you please edit your post to **ask a specific question explicitly** and put it in the title too?
Comments.UserDisplayName: nbro
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-04-23T23:40:45.910Z
Comments.Text: my question was that my code was taking only 1 iteration to reach the answer while the book says that 2 iterations are required to reach the answer. So I wanted to know there was anything wrong with my code logic. However, now I have figured out the fallacy in my code and have made a small modification to the logic of the code. So now my code too requires 2 iterations to reach the answer. So now my implementation is in agreement with author. So, closing this ticket now.
Comments.UserDisplayName: Ravi
Tags: <logic><neurosymbolic-ai>
Title: Translation Algorithm for CILP model (Garcez, Lamb, Gabbay) - why difference in answer between my implementation and the answer from the book?
UserDisplayName: Ravi
ThreadText: # Translation Algorithm for CILP model (Garcez, Lamb, Gabbay) - why difference in answer between my implementation and the answer from the book?
  
  (Asked by: username_0 on 2023-04-17)
  
  I have implemented the Translation algorithm for CILP (Connectionist Inductive Learning and Logic Programming model by Garcez, Lamb and Gabbay) from their book "Neural-Symbolic Cognitive Reasoning"
  
  The paper which describes the example Neural Network can be found here:
  
  [https://www.staff.city.ac.uk/~aag/papers/cilp.pdf](https://www.staff.city.ac.uk/%7Eaag/papers/cilp.pdf)
  
  My implementation can be found here:
  
  <https://github.com/nravindranath10/CILP_Translation_Algorithm>
  
  While the book claims that the 2 iterations are required for the Neural Network to converge to the final answer which is {B}, in my code the Neural Network seems to take only 1 iteration to converge to the same answer {B}. I have highlighted the "m = 2" line in my attached image from the book.
  
  I would like to understand if I am going wrong somewhere in my implementation.
  
  Thanks,
  username_0[![enter image description here](https://i.sstatic.net/VEEyg.png)](https://i.sstatic.net/VEEyg.png)
  
  **Tags:** logic, neurosymbolic-ai
  
  > **Comments:**
  > **username_1**: I don't see any question being asked here. Can you please edit your post to **ask a specific question explicitly** and put it in the title too?  
  > **username_0**: my question was that my code was taking only 1 iteration to reach the answer while the book says that 2 iterations are required to reach the answer. So I wanted to know there was anything wrong with my code logic. However, now I have figured out the fallacy in my code and have made a small modification to the logic of the code. So now my code too requires 2 iterations to reach the answer. So now my implementation is in agreement with author. So, closing this ticket now.  
  
  ---
  
  ## 0 answers
  
  